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>
| Field | Type | Default |
|---|---|---|
amount | number | required (> 0.001) |
currency | string | BHD |
additional_data | object | optional |
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-datawith{ "track_id" }POST /payment-chooser/initiate-paymentwith{ "track_id", "payment_provider" }where provider isbenefitormastercardfor the chooser path
These endpoints support the hosted checkout experience and are not typically called from merchant backends.