Conventions

Content type

Error format (ProblemDetails)

Failed requests return a ProblemDetails object:
{
  "type": "VPAY_001",
  "title": "Sesión de pago ya existe",
  "status": 422,
  "detail": "The payment session already exists.",
  "instance": "correlation-guid"
}
  • type — Vpay error code (e.g. VPAY_001) when applicable
  • status — HTTP status code
  • Validation 400 responses may include an errors dictionary keyed by field name
See Error codes.

Shared payment fields

Start payment (POST /pay/api/start-payment)

FieldTypeRequiredNotes
callbackSuccessUrlstringYesRedirect after successful payment
callbackFailUrlstringYesRedirect after failed payment
callbackBackUrlstringNoRedirect when payer cancels / goes back
totalTransactionAmountdecimalYesMust be greater than 0
currencyCodestringYesISO currency (e.g. CRC, USD)
terminalNumberstringNoResolved from JWT client_id if omitted
transactionReferenceNumberstringYesUnique merchant reference
generalPurchaseDescriptionstringNoShown on checkout
userEmailstringNoPayer email
culturestringNoUI locale hint (e.g. es, en)
additionalChargesarrayNoSee below
itemsarrayNoLine items (optional)
additionalCharges[]
FieldType
chargeNamestring
chargeAmountdecimal
chargeCurrencyCodestring — must match request currencyCode when charges are present
items[]
FieldType
itemCodestring
quantityinteger
descriptionstring
amountdecimal
currencyCodestring — must match request currencyCode when items are present

Generate payment link (POST /pay/api/generate-payment-link)

Same monetary and line-item fields as start payment, without callback URLs. Additional required fields:
FieldRequired
generalPurchaseDescriptionYes
userEmailYes (valid email)
cultureYes

JSON API vs browser routes

Documented as API (server-to-server):
  • POST /api/public/security/auth
  • POST /pay/api/start-payment
  • POST /pay/api/generate-payment-link
  • GET /pay/api/payment/{checkoutSessionId}
Browser-only (hosted UI, not JSON API):
  • GET /pay/checkout-payment/{checkoutSessionId}
  • GET /pay/link/{id}
  • POST /pay/process-payment (form submission from checkout page)
Integrate using the JSON API from your backend; redirect payers to hosted checkout URLs.

Idempotency and references

  • transactionReferenceNumber must be unique per terminal for a new payment session.
  • Reusing a reference for an in-flight or completed session returns VPAY_001.

Start payment

Generate payment link