Appearance
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.
| Name | Data Type | Description | Example |
|---|---|---|---|
| Header parameter | |||
| content-type | string | type of content as application/json | application/json |
| Body parameter | |||
| id | string | Charge unique identifier define each reqeust from GUPAY | chg_klpr1MySQ0Jxxxxxx |
| object | string | The String charge | charge |
| merchant_id | string | Merchant identifier. This ID will be provided by GUPay | er_OkFBdWxxxxxxxx |
| service_id | string | service identifier. This ID will be provided by GUPay | 1234 |
| status | string | status of payment. one of successful , pending, failed | successful |
| created_at | datetime | UTC datetime of create charge payment in format ISO 8601 (YYYY-MM-DDThh:mm:ssZ) | 2022-01-25T06:11:40Z |
| updated_at | datetime | UTC datetime of update charge payment status in format ISO 8601 (YYYY-MM-DDThh:mm:ssZ) | 2022-01-25T06:11:40Z |
| paid | boolean | status charge has been captured | true |
| amount | integer | Amount of transaction. Must be positive number | 100 |
| currency | currency | Currency for charge. use 3 letter follow ISO 4217 code. | thb |
| description | string | item/credit detail provided by merchant | ขำระการสั่งซื้อ gold |
| failure_code | string | code of failure status. please see more detail in Status Code | null |
| failure_message | string | detail of failure status. please see more detail in Status Code | null |
| livemode | boolean | status of live service | true |
| merchant_reference_id | string | ID to uniquely define each reqeust from partner | ref_3Qc23iFf8UCGhKaKjgja6ynCvAVA6 |
| merchant_customer_id | string | ID of your customer or user ID. It can be text, number or email | Bud81@gmail.com |
| redirect_url | string | Redirect URL to payment page | https://gateway.gupay.co/xxxxx/xxxx/ |
| return_url | string | Redirect URL after user payment provided by merchant | https://merchant.redirect.com/result |
| paid_at | datetime | UTC datetime of charge payment in format ISO 8601 (YYYY-MM-DDThh:mm:ssZ) | 2022-01-25T06:11:40Z |
| ip | string | IP of payment charge request | ffff:10.7.5.188 |
| flow | string | type of payment flow | redirect |
| type | string | type of payment | `truemoneywallet |
| payment_transaction_id | string | payment referent id provided by GUPay | 0bc28cbb-c3c1-429d-88b1-e997709435bc |
| payment_reference_id | string | payment reference id from Payment Onwer | 10302358 |
| mobile_number | string | mobile number of user | 0871492xxxx |
| serial_no | string | serial number of cashcard payment | |
| pin_no | string | pin 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
}