Docs Log in

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": {}
}

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.

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

StatusMeaning
openWaiting for the payer. A failed attempt leaves it open.
paidPaid. paid_at is set and net_amount is in your balance (live mode).
expiredNot paid in time. Nothing more can be paid on it.

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.