Skip to main content

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 NameCallback
Http MethodPOST
Path{your path callback}

Request

The following is the request body that will be sent:

ParametersData TypeDescription
uuidstringinvoice uuid
created_atdate time iso 8061date time created invoice
refstringinvoice ref
channelstringinvoice paid with
amountintegerinvoice amount
feeintegerinvoice fee
nett_amountintegeramount - fee
productsarray of objectlist of product
products[].namestringproduct name
products[].qtystringproduct quantity
products[].pricestringproduct price
invoiceobjectinvoice detail
invoice.uuidstringinvoice uuid
invoice.refstringinvoice ref
invoice.urlstringinvoice page url
invoice.customerobjectinvoice customer detail
invoice.customer.namestringinvoice customer name
invoice.customer.emailstringinvoice customer email
invoice.customer.phonestringinvoice 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