Callback
After the user makes a payment through the selected channel, WinPay will send a request to the merchant's URL listener. The sent request is in the form of a JSON string with a POST request type. The merchant's URL listener must respond with the string “ACCEPTED“ (without quotation marks); if WinPay does not receive an “ACCEPTED“ response, it will retry up to three times.
Spesification
API Name | Callback |
Http Method | POST |
Path | {your path callback} |
Request
The following is the request body that will be sent:
Parameters | Data Type | Description |
---|---|---|
uuid | string | invoice uuid |
created_at | date time iso 8061 | date time created invoice |
ref | string | invoice ref |
channel | string | invoice paid with |
amount | integer | invoice amount |
fee | integer | invoice fee |
nett_amount | integer | amount - fee |
products | array of object | list of product |
products[].name | string | product name |
products[].qty | string | product quantity |
products[].price | string | product price |
invoice | object | invoice detail |
invoice.uuid | string | invoice uuid |
invoice.ref | string | invoice ref |
invoice.url | string | invoice page url |
invoice.customer | object | invoice customer detail |
invoice.customer.name | string | invoice customer name |
invoice.customer.email | string | invoice customer email |
invoice.customer.phone | string | invoice customer phone |
Reqeuest Sample
{
"uuid": "40777df1-ad3d-4572-b0a3-6c90574330fa",
"created_at": "2022-11-14T10:48:00+07:00",
"ref": "21125",
"channel": "BSI",
"amount": 18940,
"fee": 0,
"nett_amount": 18940,
"products": [
{
"name": "1172164",
"qty": 1,
"price": 18940
}
],
"invoice": {
"uuid": "f6bd0574-56ca-4926-849c-8c332694966c",
"ref": "1172164-1668397659",
"url": "https://checkout.winpay.id/ilhwj3z75x5",
"customer": {
"name": "TUTIANxxxxxx",
"email": "[email protected]",
"phone": "1172164"
}
}
}
Response
ACCEPTED