Overview#
This example helps you generate a hosted payment page using DOKU Checkout API, so your customer can pay via payment channels provided on Checkout Page, learn more here.No complexity. Just follow these 3 steps. Are you ready? let's start.What You Need Before Starting✅ A tool like Postman or cURL
No OAuth token needed — this API uses HMAC-SHA256 Signature in the headers to protect each request.Use Case#
Accepting a Payment with Checkout
You want to send an invoice of MYR 100.25 to a customer, and let them pay via Checkout API.Step 1: Generating Signature#
You can refer to these page for generating signature.Step 2: Prepare the Payload#
As an example, we're gonna use the Checkout API. You can see the full API Documentation here.Step 3: Send the Request#
If the transaction is success, you’ll get this:Final Step: Redirect Your Customer#
Send the customer to the checkout_url.
They’ll see a secure page where they can pay via payment channels provided.You just created your first DOKU Checkout payment!1.
Cards: Use test card5120910000000012, any future expiry date, and CVV 100.
2.
Other Payment Methods: Continue to the end of the payment flow and choose success or failure.
What’s Next?#
1.
Setup your Notification Endpoint URL to get notified when payment is completed. Learn more here 2.
Try other amounts and invoice numbers.
4.
Ready to go live? Just swap to Production credentials.
Modified at 2026-11-02 08:21:10