Payment Link
1. Introduction
Why is this beneficial for you?
1.
2.
3.
4.
How does the Payment Link API solve these pain points?
2. Integration Steps
Create a payment link
To create payment link via API, please refer to this API specification Create payment link. Once the payment link is successfully created, it will respond back as a JSON object, and there is a propery Sample response
payment_link
represent the full link of the url which you can share with your customer.{
"data": {
"id": "UD/8Hl***Ht1xQdhlw==",
"title": "Test curl 001",
"image": {
"image": "",
"filename": "",
"size": 0
},
"amount": "0.03",
"currency": "USD",
"status": "OPEN",
"description": "Payment link created from curl",
"payment_limit": 5,
"total_amount_org": 0,
"total_refund": 0,
"total_amount": 0,
"total_trxn": 0,
"created_at": "2023-04-13 03:43:30",
"updated_at": "2023-04-13 03:43:30",
"expired_date": 1681357409,
"return_url": "https://domain.com",
"merchant_ref_no": "ref00001",
"outlet_id": "xknY***QfbOCJA==",
"outlet_name": "Book Store",
"payout": [],
"payment_link": "https://dpayment-euat.payway.com.kh/JT4630l"
},
"status": {
"code": "00",
"message": "Success!"
},
"tran_id": 1681357410
}
Handle the payment notification
Once a successful payment is made on the payment link, PayWay will send a payment notification through your Sample pushback notification response
tran_id
Payment transaction ID generated by the payment gateway.
status
Status of the request.
merchant_ref_no
Your payment link reference number.
To get the details of the payment, use Check transaction with the
return_url
. Your return_url
shall accept POST
method and Content-Type
as application/json
.{
"tran_id": "123456789",
"status": "00",
"merchant_ref_no": "ref0001"
}
string
Payment transaction ID generated by the payment gateway.
string
Status of the request.
string
Your payment link reference number.
tran_id
value from the response above.