API

Payment chooser API

Use the chooser when the customer should pick among configured providers on a VenPays hosted page.


Generate transaction

POST /payment-chooser/generate-transaction
X-API-KEY: <key>
FieldTypeDefault
amountnumberrequired (> 0.001)
currencystringBHD
additional_dataobjectoptional

Response (typical)

{
  "success": true,
  "track_id": "...",
  "redirect_url": "https://…/payment-page?track_id=...",
  "supported_providers": ["mastercard", "benefit"],
  "amount": 10.0
}

Supported providers

POST /payment-chooser/supported-providers
X-API-KEY: <key>

Returns providers enabled for the merchant profile.


Public page data / initiate

Hosted pages call:

  • POST /payment-chooser/payment-data with { "track_id" }
  • POST /payment-chooser/initiate-payment with { "track_id", "payment_provider" } where provider is benefit or mastercard for the chooser path

These endpoints support the hosted checkout experience and are not typically called from merchant backends.