Skip to content
Paybob

Payment

Webhook

Get a POST request on your server with the payment's details when its status changes.

HOOKPOST → your webhook URL

Set a webhook_url when you call Create Payment. Paybob then sends a POST request with a JSON body to that URL with the payment's details: the same fields that Verify Payment returns.

Use the webhook as a signal, not as proof. Take the pp_id from the body and call Verify Payment with your API key before you deliver the order, so a forged request can't mark an order as paid.

Payload

  • pp_idstring

    The payment's ID.

  • full_namestring

    Customer's full name.

  • email_addressstring

    Customer's email address.

  • mobile_numberstring

    Customer's mobile number.

  • gatewaystring

    Name of the payment method the customer used, e.g. Bkash Personal.

  • amountstring

    Amount charged, as a decimal string with 8 decimal places.

  • feestring

    Fee added to the payment, as a decimal string.

  • discount_amountstring

    Discount applied, as a decimal string.

  • net_totalnumber

    Total after fee and discount, as a number.

  • currencystring

    Currency code, upper case, e.g. BDT.

  • metadataobject

    The metadata you sent with Create Payment, returned unchanged.

  • senderstring

    The account the customer paid from, e.g. their wallet number.

  • transaction_idstring

    The payment method's transaction ID.

  • statusstring

    Payment status, e.g. refunded.

  • datestring

    When the payment was made, e.g. Sep 7, 2026 08:28 PM.

Handling a webhook

  1. Read the JSON body and take the pp_id.
  2. Call Verify Payment with that pp_id and your API key. Use the payment it returns, not the webhook body.
  3. Find your order, for example from metadata.order_id, and check that status, amount and currency match before you deliver it.
  4. Make your handler safe to run twice for the same pp_id: only update an order whose status actually changed.