Skip to main content

Accept Qatari-issued cards

All debit cards issued in Qatar are branded with NAPS. It is implemented by Qatar Central Bank (QCB) and offers high security for payments. When the customer selects NAPS during checkout, they must be redirected to a hosted checkout. After they make the payment, they are redirected back to your website.

info

This payment method does not have a Sandbox version. To test your integration, we recommend understanding the payment flow and paying with small amounts.

Integration Steps

  1. Create a payment using the Create Payments API with the method parameter set to ”naps”

Request

curl --location --request POST 'https://api.dibsy.one/v2/payments' \
--header 'Authorization: Bearer sk_test_mpmEeSyDEnRkabhjbgswr' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": {
"value": "2.00",
"currency": "QAR"
},
"description": "Order #86346",
"method": "naps",
"redirectUrl": "https://example.com/order/86346",
"webhookUrl": "https://example.com/webhook/86346",
"metadata": {
"order_id": "86346"
}
}'

Response

HTTP/1.1 201 Created
Content-Type: application/hal+json

{
"id": "pt_oN4NPMdAj2w7W7ZlQY",
"resource": "payment",
"mode": "live",
"amount": {
"value": "2.00",
"currency": "QAR"
},
"description": "Order #86346",
"method": "creditcard",
"redirectUrl": "https://example.com/order/86346",
"webhookUrl": "https://example.com/webhook/86346",
"status": "open",
"organizationId": "300000",
"sequenceType": "oneoff",
"metadata": {
"order_id": "86346"
},
"createdAt": "2021-12-26T21:09:32.225554757",
"expiresAt": "2021-12-26T21:24:32.148",
"_links": {
"self": {
"href": "http://api.dibsy.one/v2/payments/pt_oN4NPMdAj2w7W7ZlQY",
"type": "application/hal+json"
},
"checkout": {
"href": "https://redirect.dibsy.one/creditcard/red_EF6PZGQE1MnQqT1ySX",
"type": "text/html"
},
"dashboard": {
"href": "https://dashboard.dibsy.one/payments/pt_oN4NPMdAj2w7W7ZlQY",
"type": "text/html"
},
"documentation": {
"href": "https://api.dibsy.dev/#operation/Create%20Payment",
"type": "text/html"
}
}
}
  1. Redirect the customer to the checkout URL (present in _links.checkout).
  2. The customer completes the payment, you receive a webhook notification and the customer is redirected back to your website.