Benefit Payment Gateway for Payment Setup API
Last updated: April 30, 2026
To accept Benefit Payment Gateway (PG) payments, you must:
- Create a payment setup.
- Confirm the payment.
- Redirect the customer to Benefit PG.
Call the Create a payment setup endpoint.
Information
Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see API endpoints.
post
https://{prefix}.api.checkout.com/payments/setups
1{2"amount": 1000,3"currency": "BHD",4"reference": "ORD-5023-4E89",5"processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4",6"settings": {7"success_url": "https://example.com/payments/success",8"failure_url": "https://example.com/payments/failure"9}10}
In the request body, provide the following:
| Field | Description |
|---|---|
number | The payment amount, in the minor currency unit. |
string | Three-letter ISO 4217 currency code. |
string | The processing channel's unique identifier. |
string | A unique reference for the payment. Must be a unique alphanumeric value. |
object | Settings for the payment. |
string | The URL to redirect the customer to if the payment fails. |
string | The URL to redirect the customer to after a successful payment. |
string | A description of the payment. |
1{2"id": "set_rcmepwrchqab2wsergcafvijfy",3"processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4",4"amount": 1000,5"currency": "BHD",6"payment_type": "Regular",7"reference": "ORD-5023-4E89",8"description": "Benefit Payment Gateway payment",9"payment_methods": {10"benefit": {11"status": "ready",12"flags": []13}14},15"available_payment_methods": [16"benefit"17],18"settings": {19"success_url": "https://example.com/payments/success",20"failure_url": "https://example.com/payments/failure"21}22}
The response returns a payment_methods object, which contains the payment methods enabled on your account.
Providing all required fields sets the payment_methods.benefit object to a ready status.
Confirm the payment by calling the Confirm a payment setup endpoint and provide:
- The payment setup
idas the{id}path parameter. benefitas the{payment_method_name}path parameter.
post
https://{prefix}.api.checkout.com/payments/setups/{id}/confirm/benefit
1{2"id": "pay_qexughhq5l2unjpevzxovl5ksu",3"status": "Pending",4"reference": "ORD-5023-4E89",5"_links": {6"self": {7"href": "https://{prefix}.api.checkout.com/payments/pay_qexughhq5l2unjpevzxovl5ksu"8},9"redirect": {10"href": "https://www.benefit-gateway.bh/payment/paymentpage.htm?PaymentID=145202215328911475"11}12}13}
Redirect the customer to the redirect.href URL from the confirm response. The customer completes the payment on the Benefit PG page and is then redirected back to your settings.success_url or settings.failure_url.