Checkout
Send customers to the hosted checkout page, and handle their return safely.
Checkout is PayTaka's hosted payment page. You never build a payment form.
- Your server creates a Payment and receives
checkout_url. - You send the customer there — an HTTP redirect on the web, or opening the URL from a mobile app.
- The customer chooses bKash or Nagad, enters their number if needed, and pays.
- If you supplied a
return_url, checkout offers a Return to merchant button (or Return to app for native links). It never redirects automatically. - Your server learns the outcome from a webhook or by retrieving the payment.
return_url#
Use an absolute https:// URL for websites, or your app's link for native apps: a custom scheme (myapp://payment-return, com.example.shop://done) or an https App Link / Universal Link. javascript:, data:, file: and intent: are always rejected. Any query parameters you include are preserved.
PayTaka appends two parameters:
| Parameter | Value |
|---|---|
paytaka_payment_id | The Payment id. |
paytaka_status | PAID or CANCELLED. |
Correct handling, in any language:
on return with paytaka_status=PAID:
refresh the order/payment from YOUR backend ← never fulfil hereYour backend confirms with GET /v1/payments/{id}, or by having received the verified payment.paid webhook.
If the customer never comes back#
Closing the tab, pressing back, or a killed app does not mean the payment failed — they may have already paid. Don't mark anything failed and don't tell the customer to pay again; wait for the webhook, or ask your backend for the payment's status.
Test checkout#
A test payment's checkout shows a TEST MODE — No real money will be moved banner, a fake receiving number (01XXXXXXXXX), and buttons to simulate success or cancellation. See Testing.