Webhook Guides

PipraPay sends real-time updates about payment status through webhooks. Integrate this API to automatically process payments, refunds, and transaction events.

Headers Info

Header NameValue
Method:POST
Content-Type:application/json

Request Payload

The webhook sends a JSON payload for each transaction. Here's a sample payload:

{
  "pp_id": "349452200706799329851862826",
  "full_name": "Rasel Islam",
  "email_address": "[email protected]",
  "mobile_number": "01300000000",
  "gateway": "Bkash Personal",
  "amount": "6",
  "fee": "0.68",
  "discount_amount": "0.34",
  "total": 6.34,
  "local_net_amount": "774.99",
  "currency": "USD",
  "local_currency": "BDT",
  "metadata": {
    "invoice_id": "518917606497522107418488315457"
  },
  "sender": "01300000000",
  "transaction_id": "LSKDJCVNNVHG",
  "status": "completed",
  "date": "Jan 30, 2026 07:01 PM"
}

Handling Webhook

Here’s a simple PHP example to handle the BillPax webhook:

<?php
  $data = json_decode(file_get_contents('php://input'), true);

  http_response_code(200);

  if ($data) {
      $status = $data['status'] ?? 'unknown';
      $pp_id = $data['pp_id'] ?? null;

      echo json_encode(['status' => 'ok']);
  } else {
      echo json_encode(['status' => 'error', 'message' => 'Invalid payload']);
  }

HTTP Response Code

CodeDescription
200Webhook received successfully