Docs Log in

Developers

Webhooks

A webhook is a request QuickPay sends to your server when something happens, such as a paid checkout. Use it to mark orders paid without polling the API.

Add an endpoint

  1. In the dashboard, open Developers, then the Webhooks tab, and press Add endpoint.
  2. Enter your server's URL. It must be https, such as https://shop.example/webhooks/quickpay.
  3. Tick the Events you want, then press Add.
  4. QuickPay shows the endpoint's signing secret once. Copy it into your server's configuration, then press I saved it.
The Add an endpoint form on the Webhooks tab: the URL field and a checkbox for each event
Developers → Webhooks → Add endpoint.

Each endpoint can be Disabled and enabled again, and Rotate secret makes a new signing secret. The old secret stops working at once, so put the new one on your server right away.

Events

Every delivery is a POST with a JSON body like this:

{
  "id": "evt_5f0c3a9e1b7d2c4a6e8f0b1d",
  "type": "checkout.paid",
  "created_at": "2026-11-17T03:10:42Z",
  "livemode": true,
  "data": { ... }
}
EventWhendata
checkout.paidA checkout was paid.The checkout
checkout.expiredA checkout expired unpaid.The checkout
checkout.extra_paymentA payer paid a checkout that was already paid. The money is in your balance too.checkout and payment
withdrawal.requestedA withdrawal was made.The withdrawal
withdrawal.paidA withdrawal arrived.The withdrawal
withdrawal.failedA withdrawal failed; the amount is back in your balance.The withdrawal
withdrawal.rejectedQuickPay refused a withdrawal; the amount is back in your balance.The withdrawal
payout_account.changedA payout account was added, changed or deleted.The account's id, the action, the bank and the last 4 digits

checkout.paid

{
  "id": "evt_5f0c3a9e1b7d2c4a6e8f0b1d",
  "type": "checkout.paid",
  "created_at": "2026-11-17T03:10:42Z",
  "livemode": true,
  "data": {
    "id": "cs_8Q2M4X7RJK1V9TNC3H6PWZ5D",
    "object": "checkout",
    "livemode": true,
    "status": "paid",
    "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": "2026-11-17T03:10:41Z",
    "source": "api",
    "created_at": "2026-11-17T03:04:05Z",
    "metadata": {"order_id": "1001"},
    "payer": {"name": "Juan dela Cruz", "email": "[email protected]"}
  }
}

checkout.expired

{
  "id": "evt_0a1b2c3d4e5f60718293a4b5",
  "type": "checkout.expired",
  "created_at": "2026-11-17T04:04:30Z",
  "livemode": true,
  "data": {
    "id": "cs_8Q2M4X7RJK1V9TNC3H6PWZ5D",
    "object": "checkout",
    "livemode": true,
    "status": "expired",
    "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": {}
  }
}

checkout.extra_payment

A second payment arrived for a checkout that was already paid, for example when a payer scanned the QR twice. It is credited to your balance; refund the payer yourself if you need to.

{
  "id": "evt_9e8d7c6b5a4f3e2d1c0b9a87",
  "type": "checkout.extra_payment",
  "created_at": "2026-11-17T03:12:09Z",
  "livemode": true,
  "data": {
    "checkout": { "id": "cs_8Q2M4X7RJK1V9TNC3H6PWZ5D", "object": "checkout", "status": "paid", ... },
    "payment": {
      "id": 48213,
      "channel": "gcash",
      "amount": 150000,
      "amount_display": "₱1,500.00",
      "fee": 1500,
      "fee_display": "₱15.00",
      "net_amount": 148500,
      "net_amount_display": "₱1,485.00",
      "paid_at": "2026-11-17T03:12:08Z"
    }
  }
}

withdrawal.requested, withdrawal.paid, withdrawal.failed, withdrawal.rejected

All four carry the withdrawal as it is after the change. Here is withdrawal.paid:

{
  "id": "evt_1f2e3d4c5b6a798817263544",
  "type": "withdrawal.paid",
  "created_at": "2026-11-17T05:21:16Z",
  "livemode": true,
  "data": {
    "id": "wd_6M3K9Q2X7V1T8N4C5R0JHPWZ",
    "object": "withdrawal",
    "livemode": true,
    "status": "paid",
    "amount": 100000,
    "amount_display": "₱1,000.00",
    "fee": 1500,
    "fee_display": "₱15.00",
    "net_amount": 98500,
    "net_amount_display": "₱985.00",
    "currency": "PHP",
    "destination": {
      "payout_account_id": "pa_2H7W4N9K1Q6X3M8V5T0CRJZP",
      "bank_id": 27,
      "bank_name": "GCash (GC)",
      "account_name": "Juan dela Cruz",
      "account_number_masked": "*******1234"
    },
    "payout_reference": null,
    "failure_reason": null,
    "created_at": "2026-11-17T05:20:02Z",
    "paid_at": "2026-11-17T05:21:15Z",
    "updated_at": "2026-11-17T05:21:15Z"
  }
}

On withdrawal.requested the status is pending; on withdrawal.failed and withdrawal.rejected it is failed or rejected and failure_reason says why.

payout_account.changed

{
  "id": "evt_7a6b5c4d3e2f1a0b9c8d7e6f",
  "type": "payout_account.changed",
  "created_at": "2026-11-17T02:00:00Z",
  "livemode": true,
  "data": {
    "id": "pa_2H7W4N9K1Q6X3M8V5T0CRJZP",
    "action": "created",
    "bank_name": "GCash (GC)",
    "number_last4": "1234"
  }
}

action is created, updated or deleted. Payout accounts serve both modes, so this event is always "livemode": true. Do not drop it for being live. If you did not make the change, sign in and check your account.

Check livemode before you act

Test events go to the same endpoints, signed with the same secret, with "livemode": false. Before you ship an order on checkout.paid, fetch the checkout with your live key (GET /api/v1/checkouts/{id}) and check that it is paid and that the amount is what you expect. Anyone with a test key can make a test checkout with your order's reference.

Check the signature

Every delivery has two headers:

QuickPay-Signature: t=1763348645,v1=5f2b8c...e9
QuickPay-Event-Id: evt_5f0c3a9e1b7d2c4a6e8f0b1d

t is the Unix time QuickPay sent it. v1 is the hex HMAC-SHA256 of t, a dot and the raw request body, keyed with your endpoint's signing secret. To check it:

  1. Read the raw body, exactly as received, before you parse the JSON.
  2. Compute HMAC-SHA256 of t + "." + body with your secret, as lowercase hex.
  3. Compare it with v1 in constant time.
  4. Refuse a t more than 5 minutes from your clock, so an old delivery cannot be sent to you again.

Node.js

const crypto = require('node:crypto')

function verify(secret, header, rawBody) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=', 2)))
  const t = Number(parts.t)
  if (!Number.isInteger(t) || !parts.v1) return false
  if (Math.abs(Date.now() / 1000 - t) > 300) return false
  const want = crypto.createHmac('sha256', secret).update(`${parts.t}.`).update(rawBody).digest('hex')
  const a = Buffer.from(want), b = Buffer.from(parts.v1)
  return a.length === b.length && crypto.timingSafeEqual(a, b)
}

// With Express, take the body raw:
app.post('/webhooks/quickpay', express.raw({ type: 'application/json' }), (req, res) => {
  if (!verify(process.env.QUICKPAY_WEBHOOK_SECRET, req.get('QuickPay-Signature') || '', req.body)) {
    return res.sendStatus(400)
  }
  const event = JSON.parse(req.body)
  res.sendStatus(200) // answer first, then do the slow work
  handle(event)
})

Python

import hashlib
import hmac
import time


def verify(secret: str, header: str, body: bytes, now: float | None = None) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(",") if "=" in p)
    ts, sig = parts.get("t", ""), parts.get("v1", "")
    if not ts.isdigit() or not sig:
        return False
    if abs((time.time() if now is None else now) - int(ts)) > 300:
        return False
    want = hmac.new(secret.encode(), ts.encode() + b"." + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(want, sig)


# With Flask, use the raw body:
# @app.post("/webhooks/quickpay")
# def quickpay_webhook():
#     if not verify(os.environ["QUICKPAY_WEBHOOK_SECRET"],
#                   request.headers.get("QuickPay-Signature", ""), request.get_data()):
#         abort(400)
#     event = json.loads(request.get_data())
#     ...
#     return "", 200

Go

import (
	"crypto/hmac"
	"crypto/sha256"
	"encoding/hex"
	"strconv"
	"strings"
	"time"
)

func verify(secret, header string, body []byte, now time.Time) bool {
	var ts, sig string
	for _, part := range strings.Split(header, ",") {
		k, v, _ := strings.Cut(part, "=")
		switch k {
		case "t":
			ts = v
		case "v1":
			sig = v
		}
	}
	t, err := strconv.ParseInt(ts, 10, 64)
	if err != nil || sig == "" {
		return false
	}
	if d := now.Sub(time.Unix(t, 0)); d > 5*time.Minute || d < -5*time.Minute {
		return false
	}
	mac := hmac.New(sha256.New, []byte(secret))
	mac.Write([]byte(ts + "."))
	mac.Write(body)
	want := hex.EncodeToString(mac.Sum(nil))
	return hmac.Equal([]byte(want), []byte(sig))
}

Answer with 2xx

Retries

Any other answer (another status, a timeout, a refused connection) is retried: after 30 seconds, then 1, 2, 4 minutes and so on, doubling up to every 6 hours, for 72 hours from when the event was made. After that the delivery is marked Failed.

A disabled endpoint is sent nothing. Its deliveries wait, and resume if you enable it again within those 72 hours.

Deliveries and replay

Press Deliveries on an endpoint to see each delivery: the event, its status (Pending, Delivered or Failed), the status code your server answered, the number of attempts and when it was made. Replay sends a delivery again, with the same event and the same id, for example after you fixed a bug in your receiver.

An endpoint's deliveries: event, status, response code, attempts, time and a Replay button for each
An endpoint's deliveries, with Replay.

To try your receiver, create a test checkout and simulate a payment: your endpoint gets checkout.paid with "livemode": false.