Skip to content

Webhook payload of Notify Payment Result

Webhooks are requests from GUPAY services to an HTTPS endpoint of your choice. there requests POST Method containing a data payload for action to endpoint URL of your choosing.

NameData TypeDescriptionExample
Header parameter
content-typestringtype of content as application/jsonapplication/json
Body parameter
idstringCharge unique identifier define each reqeust from GUPAYchg_klpr1MySQ0Jxxxxxx
objectstringThe String chargecharge
merchant_idstringMerchant identifier. This ID will be provided by GUPayer_OkFBdWxxxxxxxx
service_idstringservice identifier. This ID will be provided by GUPay1234
statusstringstatus of payment. one of successful , pending, failedsuccessful
created_atdatetimeUTC datetime of create charge payment in format ISO 8601 (YYYY-MM-DDThh:mm:ssZ)2022-01-25T06:11:40Z
updated_atdatetimeUTC datetime of update charge payment status in format ISO 8601 (YYYY-MM-DDThh:mm:ssZ)2022-01-25T06:11:40Z
paidbooleanstatus charge has been capturedtrue
amountintegerAmount of transaction. Must be positive number100
currencycurrencyCurrency for charge. use 3 letter follow ISO 4217 code.thb
descriptionstringitem/credit detail provided by merchantขำระการสั่งซื้อ gold
failure_codestringcode of failure status. please see more detail in Status Codenull
failure_messagestringdetail of failure status. please see more detail in Status Codenull
livemodebooleanstatus of live servicetrue
merchant_reference_idstringID to uniquely define each reqeust from partnerref_3Qc23iFf8UCGhKaKjgja6ynCvAVA6
merchant_customer_idstringID of your customer or user ID. It can be text, number or emailBud81@gmail.com
redirect_urlstringRedirect URL to payment pagehttps://gateway.gupay.co/xxxxx/xxxx/
return_urlstringRedirect URL after user payment provided by merchanthttps://merchant.redirect.com/result
paid_atdatetimeUTC datetime of charge payment in format ISO 8601 (YYYY-MM-DDThh:mm:ssZ)2022-01-25T06:11:40Z
ipstringIP of payment charge requestffff:10.7.5.188
flowstringtype of payment flowredirect
typestringtype of payment`truemoneywallet
payment_transaction_idstringpayment referent id provided by GUPay0bc28cbb-c3c1-429d-88b1-e997709435bc
payment_reference_idstringpayment reference id from Payment Onwer10302358
mobile_numberstringmobile number of user0871492xxxx
serial_nostringserial number of cashcard payment
pin_nostringpin number of cashcard payment

Example

Details
js
{
    "id": "chg_klpr1MySQxxxxx",
    "object": "charge",
    "merchant_id": "mer_OkFBdWwwsZYxxxxx",
    "service_id": 1234,
    "status": "successful",
    "created_at": "2022-01-25T06:11:40Z",
    "updated_at": "2022-01-25T06:11:40Z",
    "paid": true,
    "amount": 5,
    "currency": "thb",
    "description": "ขำระการสั่งซื้อ gold",
    "failure_code": null,
    "failure_message": null,
    "livemode": true,
    "merchant_reference_id": "ref_1K4Tpk1YdWMYMHrmyyYci5Yjxxxxx",
    "merchant_customer_id": "Stewart45@gmail.com",
    "redirect_url": "https://gateway.gupay.co/truemoneywallet/form/60c5c82a-e24d-40cc-a2c0-dd7f312xxxxx",
    "return_url": "",
    "paid_at": null,
    "ip": "::ffff:10.7.5.xxx",
    "flow": "redirect",
    "type": "truemoneywallet",
    "payment_transaction_id": null,
    "payment_reference_id": null,
    "mobile_number": "",
    "serial_no": null,
    "pin_no": null
}