PSE via Widget

This page includes the steps necessary to integrate PSE using the payment widget.

Use the V1 endpoint for the PSE widget integration.

📘

For more information, refer to the Payments API.

Integrate PSE with the widget

V1 purchases require an existing order before processing a payment.

1. Create an order_token

To make a purchase, you must create a DEUNA order.

Make a request to the Create an Order endpoint.

The API returns an order_token, which is used throughout the entire flow.

2. Create user

Create a user with DEUNA to get an authorization token to perform the purchase later.

Make a request to the Create a User endpoint.

📘

The user document can be any of the available Colombian documents such as: CC, CE, TI, PP, NIT, RC and DE.

The API returns a user token, which is required to follow the next steps.

📘

OTP is recommended to get a new token each time a customer confirms the code through SMS or email. You can use an External authorization login to manage the user auth tokens by your own without the OTP. Talk to your Sales Engineer for further guidance.

If the email does not exist, then a new user is created.

If the email used already exists:

  1. The API returns the message user already exists.
  2. Make a request to the Send an OTP endpoint and obtain a OTP.
  3. Make a request to the log in with OTP endpoint and obtain a fresh user token.
  4. You can now use thetoken for the next steps.

3. Make a PSE purchase

Make a request to the V1 create payment endpoint.

The PSE purchase must have the information collected from the PSE form filled by the user, such as:

  • Full name
  • Document number
  • Document type
  • Phone number
  • Person type (natural or legal)
  • Bank
  • Callback URL to redirect the user to your page

4. Redirect the user

After performing the purchase, the API responds with a redirection URL in the authorization_bank_transfer node.

Redirect users to this URL to complete the PSE purchase.