Start payment
Creates a payment session for integrated checkout and returns acheckoutSessionId to redirect the payer.
Request
/pay/api/start-paymentAuthorization: Bearer {token} — role VpayTerminal
Body
| Field | Type | Required | Description |
|---|---|---|---|
callbackSuccessUrl | string | Yes | Success redirect URL |
callbackFailUrl | string | Yes | Failure redirect URL |
callbackBackUrl | string | No | Cancel / back URL |
totalTransactionAmount | decimal | Yes | Must be > 0 |
currencyCode | string | Yes | e.g. CRC, USD |
terminalNumber | string | No | Defaults from JWT terminal |
transactionReferenceNumber | string | Yes | Unique merchant reference |
generalPurchaseDescription | string | No | Purchase description |
userEmail | string | No | Payer email |
culture | string | No | es or en |
additionalCharges | array | No | Extra charges |
items | array | No | Line items |
Response 200
| Field | Type | Description |
|---|---|---|
checkoutSessionId | string | Redirect to /pay/checkout-payment/{id} |
internalTransactionReferenceNumber | string | Vpay internal reference |
Errors
| Status | Type | Description |
|---|---|---|
400 | — | Validation errors |
401 | — | Unauthorized |
422 | VPAY_001 | Duplicate transactionReferenceNumber |
422 | VPAY_005 | Terminal not registered |
500 | — | Internal error |

