Accept your first payment in 10 minutes
Create a test payment link with your secret key, send a customer through hosted checkout, and confirm the result — using nothing but the REST API.
Before you start
A BINKPAY account and your test sk_test_… key from Settings → Developers
. No card details ever touch your servers.
Steps
Create a payment
~2 min
Call POST /merchant/payments with an amount in minor units and a currency. The response carries a payUrl — a hosted checkout link.
curl https://api.binkpay.net/merchant/payments \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"amountMinor": "5000",
"currency": "EGP",
"description": "Test order #1042"
}'Redirect your customer
~1 min
Send the customer to the returned payUrl. They pay on BINKPAY-hosted checkout, so card data never reaches your servers and your integration stays out of PCI scope.
Confirm the result
~5 min
Listen for the payment.completed webhook, or poll GET /merchant/payments/:id while you are still building.
{
"id": "pay_8f2a1c",
"reference": "BINK-8F2A1C",
"status": "PAID",
"amountMinor": "5000",
"currency": "EGP",
"paidAt": "2026-07-08T14:22:03.000Z"
}Payment statuses
A payment moves through these states. Only PAID means the money is yours.
| Status | Meaning | What to do |
|---|---|---|
| PENDING | Payment created, customer has not finished checkout | Wait |
| PAID | Funds authorised and captured | Fulfil the order |
| FAILED | Customer abandoned or the authorisation was declined | Offer a retry |
| EXPIRED | The link was not used before it lapsed | Create a new payment |
Next
Was this page helpful?
