Movii (PSE Avanza) via Direct API
Integrate Movii (PSE Avanza) in your application through the DEUNA direct API, redirect the buyer to their bank, and verify the final payment status.
On this page
Overview#
With the direct API, you create the PSE payment from your backend and redirect the buyer to the bank portal from your own checkout. DEUNA verifies the result with Movii and updates the payment status.
With DEUNA, Movii (PSE Avanza) is available as a bank transfer (bank_transfer) payment method with the movii_pse processor.
Requirements#
- Available in Colombia.
- Currency:
COP. - Movii (PSE Avanza) enabled for your merchant and connected in Admin. See Connect Movii (PSE Avanza).
- The Movii webhook configured to notify DEUNA. See Configure the Movii webhook.
Configure the Movii webhook#
DEUNA confirms payments with the notifications Movii sends. Movii configures these notifications, not DEUNA.
- Ask your DEUNA account team for the DEUNA notification URL for each environment: sandbox and production.
- Ask Movii to register that URL as a webhook on your Movii account in each environment.
- Confirm with Movii that the webhook is active before you start processing payments.
Purchase V2#
V2 purchases create the order and start the payment in a single endpoint. The flow is:
- You call
POST v2/merchants/order/purchasewith the order information, the selected bank, and the payer data. - DEUNA validates the fields and sends the payment to Movii.
- DEUNA returns the bank URL in the
next_actionnode. - You redirect the buyer to the bank to complete the payment.
- DEUNA verifies the status with Movii and updates the payment status.
Integrate Movii (PSE Avanza) by API#
1. Make a purchase with Movii (PSE Avanza)
Send a request to the Purchase V2 endpoint. DEUNA validates the following fields before sending the payment to Movii.
| Field | Description | Restriction |
|---|---|---|
payment_source.method_type | Payment method type | bank_transfer |
payment_source.processor | Processor | movii_pse |
payment_source.method_type_specific_fields.pse.financial_institution | Code of the bank selected by the buyer | Maximum 5 characters |
order.billing_address.identity_document_type | Document type | CC, RC, TI, CE, PP, or NIT |
order.billing_address.identity_document | Document number | Maximum 15 characters |
order.billing_address.first_name and order.billing_address.last_name | Payer name | Maximum 64 characters in total |
order.billing_address.phone | Phone number | 10 digits, without +57 |
order.billing_address.address1 and order.billing_address.address2 | Address | Maximum 64 characters in total |
order.billing_address.email | Maximum 120 characters | |
order.currency | Currency | COP only |
order.total_amount | Order amount | Up to 14 digits, in cents |
order.total_tax_amount | Tax amount | Up to 14 digits, in cents |
order.description | Order description | Maximum 80 characters, including the order_id |
order.callback_urls.on_success | URL to return the buyer to after payment | Maximum 512 characters |
Request example
{
"order_type": "DEUNA_NOW",
"payer_info": {
"email": "shopper@example.com"
},
"payment_source": {
"method_type": "bank_transfer",
"processor": "movii_pse",
"method_type_specific_fields": {
"pse": {
"financial_institution": "1022",
"financial_institution_name": "BANCO UNION COLOMBIANO"
}
}
},
"order": {
"order_id": "7e264a9e-b7c9-434c-ac17-d2de8e10a692",
"currency": "COP",
"description": "Test purchase",
"market_type": "ecommerce",
"callback_urls": {
"on_success": "https://your-store.com/checkout/result"
},
"items": [
{
"id": "00ab2d23-f44a-4782-aa7c-bb4fadeddfe3",
"name": "Item #1",
"description": "Description Item #1",
"total_amount": {
"original_amount": 1190000,
"amount": 1190000,
"total_discount": 0,
"currency": "COP",
"currency_symbol": "$"
},
"unit_price": {
"amount": 1000000,
"currency": "COP",
"currency_symbol": "$"
},
"tax_amount": {
"amount": 190000,
"currency": "COP",
"currency_symbol": "$"
},
"quantity": 1,
"taxable": true
}
],
"sub_total": 1000000,
"tax_amount": 190000,
"total_tax_amount": 190000,
"total_amount": 1190000,
"store_code": "all",
"billing_address": {
"first_name": "Andres",
"last_name": "Perez",
"email": "shopper@example.com",
"address1": "Carrera 7 # 71-21",
"address2": "Torre B, Oficina 502",
"zipcode": "110231",
"city": "Bogotá",
"state_name": "Bogotá D.C.",
"country_code": "CO",
"identity_document": "1234567890",
"identity_document_type": "CC",
"phone": "3001234567"
}
}
}2. Redirect the buyer to the bank
Once the purchase starts, the API responds with the payment in pending status and the bank URL in the next_action node.
| Field | Description |
|---|---|
next_action.action | authorization_bank_transfer |
next_action.authorization_bank_transfer.redirect_url | URL of the bank's PSE portal where you redirect the buyer |
Response example
{
"next_action": {
"action": "authorization_bank_transfer",
"authorization_bank_transfer": {
"redirect_url": "https://pse-portal-url/..."
}
}
}- Redirect the buyer to
redirect_url, or open it in a new window. - Show a waiting view in your checkout while the buyer pays.
- Let the buyer go back and choose another payment method.
3. Verify the payment
Read the status in order.payment.data.status from your webhooks or by querying the order.
payment.data.status | Final | Meaning | Action |
|---|---|---|---|
pending | No | The buyer has not finished at the bank. | Do not fulfil the order. |
processed | Yes | The PSE transaction was completed. The order is succeeded. | Complete the order. |
denied | Yes | The PSE transaction was not completed. | Do not mark the order as paid. Show the rejected-payment page. |
DEUNA always verifies the transaction status with Movii before changing the order to a final status.
Testing#
Test in the DEUNA sandbox (https://api.sandbox.deuna.io) with a Colombian merchant enabled for Movii (PSE Avanza).
- Ask Movii for test credentials for your merchant. Connect them in Admin, and ask Movii to configure the test webhook with the DEUNA sandbox notification URL. See Configure the Movii webhook.
- Create a purchase in
COP. Use a different document number for each test payment. - Redirect the buyer to
redirect_url. The PSE sample frontend opens, using the simulator described in PSE testing data. - Set the final state of the transaction in the simulator, run it, and return to the merchant.
- Verify that
order.payment.data.statushas the expected value.
Test these scenarios before going live:
| Scenario | What to verify |
|---|---|
| The buyer completes the payment | order.payment.data.status is processed, and the order is succeeded. |
| The bank rejects the payment | order.payment.data.status is denied. It is not marked as paid, and your site shows the rejected-payment page. |
| The payment stays pending | order.payment.data.status is pending. Your site does not fulfil the order until DEUNA reports a final status. |
| The buyer closes the bank window | Your site does not fulfil the order. Wait for the final status from DEUNA. |
Limitations#
- Available only in Colombia and in
COP. - Only Purchase is supported. Authorization, Capture, and Cancel (Void) are not supported.
- Refunds are not supported. Movii does not publish a refund endpoint.
- Recurring payments are not supported.