Skip to main content

Webhook Integration

Webhooks refers to a combination of elements that collectively create a notification and reaction system within a larger integration. ChaiPay uses webhooks to notify your application when an event happens in your account. Webhooks are particularly useful for asynchronous events like when the status of a payment transaction gets updated.

Webhook Configuration#

  • Create a webhook endpoint on your server with POST method.
  • Register the webhook endpoint on CHAIPort Merchant portal in API Settings > Webhooks.

CHAIPort Webhooks#

Currently following webhook types are supported on CHAIport

PAYIN - Payment Status Update#

This webhook gets triggered whenever the status of the payment transaction gets updated at payment channel's end. Refer following sample payload received in Webhooks.

"currency": "IDR",
"amount": 50000,
"order_ref": "24VGYLpS7HdmI6IzHE7dru5JlmY",
"channel_order_ref": "",
"merchant_order_ref": "Merchant1643708386598",
"country_code": "VN",
"status": "Expired",
"channel_key": "XENDIT_ID",
"method_name": "WALLET",
"channel_logo": "",
"method_sub_type": "WALLET",
"buyer_name": "Cus66",
"buyer_email": "",
"buyer_phone": "+918959893980",
"buyer_address1": "address",
"buyer_address2": "address_2",
"buyer_city": "VND",
"buyer_country": "VN",
"signature_hash": "8DNdqmuNlbDcgJQyx0vvdgeRkc/eFnieLZsubDU0Luw=",
"status_code": "4020",
"status_channel_reason": "",
"date": "2022-02-01 15:09:46.647541 +0530 IST",
"is_refund_allowed": false,
"is_multi_refund_allowed": false,
"refund_completed": false,
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9",
"ip_address": "::1",
"description": "comem test transaction",
"link_order_ref": "",
"payment_link_ref": "",
"source": "api",
"payment_method_used": "",
"recon_status": "",
"channel_name": "XENDIT",
"environment": "sandbox"

During testing you can use FOSS Webhook server to setup webhook endpoint. Create a sample webhook at