Overview
ThePseClient provides utilities for PSE (Pagos Seguros en Línea) payments, including:
- Listing available Colombian banks for PSE
- Creating PSE swap orders with automatic payment execution
bloque.swap.pse.
Constructor
ThePseClient is automatically initialized as part of the SwapClient.
Methods
banks()
Retrieves the list of financial institutions available for PSE payments.Returns
Example
create()
Creates a PSE swap order with optional automatic payment execution.Parameters
PSE order parameters
Returns
Example
PSE Payment Flow
The PSE payment flow involves the following steps:- Find rates: Use
swap.findRates()to get available exchange rates - List banks: Use
pse.banks()to get available banks - Create order: Use
pse.create()with payment args to create and auto-execute the order - Redirect: Redirect the user to the PSE checkout URL returned in
execution.result.how.url - Complete payment: User completes payment on the PSE platform
- Callback: PSE notifies Bloque of payment completion via webhook
- Funds deposited: Funds are deposited to the specified account URN
Fee Structure for PSE
PSE orders include multiple fee components:Webhook Notifications
You can specify awebhookUrl to receive order status updates:
- Order ID
- Status updates
- Transaction details
Error Handling
Related Types
Bank- PSE bank detailsListBanksResult- Result of listing banksCreatePseOrderParams- Parameters for creating PSE ordersCreatePseOrderResult- Result of creating PSE orderPsePaymentArgs- PSE payment argumentsPseCustomerData- Customer data for PSEDepositInformation- Deposit account detailsSwapOrder- Swap order detailsExecutionResult- Auto-execution result