Developers
Your First Checkout
A checkout is one request for payment, with a payment page that QuickPay hosts. Your server creates it, sends the payer to its url, and learns that it was paid from a webhook or by reading it back.
You need a test API key with the Read and Checkouts permissions (see API Keys). Replace qp_test_… below with your key.
1. Create a checkout
curl https://quickpayph.com/api/v1/checkouts \
-H "Authorization: Bearer qp_test_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1001" \
-d '{
"amount": 150000,
"reference": "order-1001",
"description": "2 x T-shirt",
"success_url": "https://shop.example/thanks",
"cancel_url": "https://shop.example/cart",
"metadata": {"order_id": "1001"}
}'
The answer is 201 Created with the checkout:
{
"id": "cs_8Q2M4X7RJK1V9TNC3H6PWZ5D",
"object": "checkout",
"livemode": false,
"status": "open",
"amount": 150000,
"amount_display": "₱1,500.00",
"fee": 1500,
"fee_display": "₱15.00",
"net_amount": 148500,
"net_amount_display": "₱1,485.00",
"currency": "PHP",
"reference": "order-1001",
"description": "2 x T-shirt",
"url": "https://quickpayph.com/c/cs_8Q2M4X7RJK1V9TNC3H6PWZ5D",
"expires_at": "2026-11-17T04:04:05Z",
"paid_at": null,
"created_at": "2026-11-17T03:04:05Z",
"metadata": {"order_id": "1001"},
"payer": {}
}
amountis in centavos and must be whole pesos:150000is ₱1,500. An amount with centavos, such as150050, is refused with400 invalid_input(“The amount must be in whole pesos, without centavos.”), because the payment channels take whole pesos only. The amount must be from ₱100 to ₱50,000 (your account may have other limits).- The fee (1% of the amount, ₱5 minimum) comes out of the amount: the payer pays exactly
amountand your balance getsnet_amount. The payer never sees the fee. - The checkout stays open for 60 minutes by default. Set
expires_in_minutes(5 to 10080) to change that. - Add
"collect": ["name", "mobile", "email"](any of them) to have the page ask the payer for those details. They come back inpayer. - Every field is in the API Reference.
Retry safely with the Idempotency-Key
The Idempotency-Key header is required. Use a value that is unique for the order, such as your order id. If your call timed out, send the same request again with the same key: QuickPay answers the checkout it already made, with 200 OK and the header Idempotent-Replayed: true, and makes nothing new.
curl -i https://quickpayph.com/api/v1/checkouts \
-H "Authorization: Bearer qp_test_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1001" \
-d '{
"amount": 150000,
"reference": "order-1001",
"description": "2 x T-shirt",
"success_url": "https://shop.example/thanks",
"cancel_url": "https://shop.example/cart",
"metadata": {"order_id": "1001"}
}'
The same key with a different body answers 409 idempotency_mismatch.
Fixed and open amounts
A checkout made with the API always has a fixed amount: amount is required (400 amount_required without it). When the payer should type the amount, such as a tip or a donation, use a payment link with Payer enters amount. The checkouts its payers make show up in the API too (GET /api/v1/checkouts with a live key), and until the payer enters the amount, amount, fee, net_amount and their _display strings are null:
{
"id": "cs_5T1N8C3K6W9QZ2X7V4M0RJHP",
"object": "checkout",
"livemode": true,
"status": "open",
"amount": null,
"amount_display": null,
"fee": null,
"fee_display": null,
"net_amount": null,
"net_amount_display": null,
"currency": "PHP",
...
}
The fee is fixed when the amount is: at creation for a fixed amount, and when the payer enters it for an open amount.
2. Send the payer to the payment page
Redirect the payer's browser to the checkout's url, or show it as a link or a QR code. The payer chooses how to pay, scans the QR in their GCash, Maya or bank app, and pays. Once it is paid, the page thanks the payer and, if you gave a success_url, takes them there after a few seconds. If the checkout expires unpaid, the page offers a button back to your cancel_url.
- Always use the
urlQuickPay gives you; never build it yourself. It may be on your own checkout domain. - Do not treat the visit to your
success_urlas proof of payment: anyone can open that address. Wait for thecheckout.paidwebhook, or read the checkout. - To show the QR in your own page instead, add
"channel": "gcash"(ormaya,gotyme,grabpay,shopeepay,banks,qrph) to the request: the answer also has aqrobject with the QR payload (emv), animageand adeeplink. See the reference.
3. Simulate a test payment
A test checkout's page says Test mode, and no real app can pay it. Decide its result yourself with the checkout's id:
curl https://quickpayph.com/api/v1/checkouts/cs_8Q2M4X7RJK1V9TNC3H6PWZ5D/simulate \
-H "Authorization: Bearer qp_test_…" \
-H "Content-Type: application/json" \
-d '{"result": "paid"}'
The answer is the checkout, now "status": "paid" with paid_at set. Everything happens as for a real payment: the payment page shows it as paid, the dashboard (in Test mode) lists it, and your webhooks get checkout.paid with "livemode": false. Use {"result": "failed"} to try a failed attempt: the checkout stays open and the payer can try again. Simulating with a live key answers 403 test_mode_only.
4. Read a checkout
curl https://quickpayph.com/api/v1/checkouts/cs_8Q2M4X7RJK1V9TNC3H6PWZ5D \
-H "Authorization: Bearer qp_test_…"
Or list your checkouts, newest first:
curl "https://quickpayph.com/api/v1/checkouts?status=paid&limit=20" \
-H "Authorization: Bearer qp_test_…"
The list answers {"items": [...], "has_more": true}. For the next page, add starting_after= and the last id you got.
Checkout statuses
| Status | Meaning |
|---|---|
open | Waiting for the payer. A failed attempt leaves it open. |
paid | Paid. paid_at is set and net_amount is in your balance (live mode). |
expired | Not paid in time. Nothing more can be paid on it. |
expires_atcan move later once a payer has started paying, because a QR code stays payable for its whole window. Cancel your order on thecheckout.expiredwebhook, not on your own timer.- If a payer pays a checkout that is already paid, you get
checkout.extra_payment; that money is credited to your balance too.
Go live
When your test checkouts, webhooks and order updates work, create a live key and use it instead of the test key. Nothing else changes. Live checkouts take real money and cannot be simulated.