Callback
Setelah user melakukan pembayaran melalui channel yang dipilih, maka WinPay akan mengirimkan request ke URL Listener Merchant. Request yang dikirim berupa string json dengan tipe request POST. URL Listener Merchant harus memberikan response berupa string “ACCEPTED” (tanpa tanda petik), jika WinPay tidak menerima response “ACCEPTED” maka akan diulang sebanyak 3 kali.
Spesification
Nama API | Callback |
Http Method | POST |
Path | {your path callback} |
Request
berikut adalah body request yang akan dikirim:
Parameter | Tipe | Deskripsi |
---|---|---|
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": "customer@pdam-sby.winpay.id",
"phone": "1172164"
}
}
}
Response
ACCEPTED