Skip to content
Guarantee Pay Docs

API

Webhooks

Guarantee Pay sends an HTTP POST with a JSON body to the webhook_url you passed at create time.

When a webhook is sent

No webhook is sent if the payment was created without a webhook_url.

Request

POST https://shop.example.com/hooks/guaranteepay
Content-Type: application/json

{
  "pp_id": "k3J9x…",
  "full_name": "Rahim Uddin",
  "email_address": "rahim@example.com",
  "mobile_number": "01700000000",
  "gateway": "bKash",
  "amount": "500.00",
  "fee": "0.00",
  "discount_amount": "0.00",
  "total": "500.00",
  "local_net_amount": "500.00",
  "currency": "BDT",
  "local_currency": "BDT",
  "metadata": { "order_id": "ORD-1001" },
  "sender": "01711111111",
  "transaction_id": "BK7A2C9XQ1",
  "status": "completed",
  "date": "Oct 01, 2026 10:24 AM"
}

The body has exactly the same fields as the verify-payment response.

Delivery & retries

Handling rules

  1. Webhooks are not signed. Never fulfil straight from the webhook body. Call verify-payment with the pp_id and use that response.
  2. Webhooks can arrive more than once, and at the same moment as the customer's return. Make your handler idempotent: lock the order, check it is not already paid, then mark it paid.
  3. Return 200 quickly. Do slow work, such as sending emails, after responding or in a queue.

See Code examples for a complete handler.