PromptPay
Features
Processing currencies | THB |
---|---|
Settlement currencies | USD |
Minimum transaction amount | 1 THB |
Maximum transaction amount | 7,000 THB |
Refunds | ❌ |
Partial Refunds | ❌ |
Multiple partial refund | ❌ |
Chargeback | ❌ |
Payment flow
Integration Method
promptpay
1.
2.
Direct API
How to integration
{
"amount":1000,
"currency":"THB",
"confirm":true,
"payment_method_data" : {
"type":"promptpay"
},
"return_url":"https://your.website"
}
{
"id": "pi_1664208234002513920",
"object": "payment_intent",
"created": 1685613137000,
"currency": "THB",
"amount": 1000,
"status": "requires_action",
"livemode": false,
"client_secret": "pi_1664208234002513920_secret_tzDL9JipXe0RE3qGTkNVty9j",
"next_action": {
"type": "promptpay_handle_redirect",
"promptpay_handle_redirect": {
"url": "https://apitest.wooshpay.com/v1/receives/c12/pay/pi_1664208234002513920"
}
},
"payment_method_types": [
"promptpay"
],
"confirmation_method": "automatic",
"return_url": "https://your.website",
"payment_method": "pm_1664208233880879104",
"capture_method": "automatic"
}
Checkout
Create a seesion
{
"cancel_url": "www.wooshpay.com",
"mode": "payment",
"success_url": "https://wooshpay.com/",
"payment_method_types": [
"promptpay"
],
"line_items": [
{
"price_data": {
"currency": "THB",
"unit_amount": 100,
"nickname": "apple",
"product_data": {
"name": "apple"
},
"billing_scheme": "testscheme",
"lookup_key": "test_lookup_key"
},
"quantity": 1
}
]
}
{
"id": "cs_1676158633408200704",
"object": "checkout.session",
"created": 1688462334000,
"livemode": false,
"currency": "THB",
"customer": "",
"mode": "payment",
"status": "open",
"url": "https://checkouttest.wooshpay.com/pay/cs_test_1676158633408200704?key=pk_test_NTE2NzQzMzIzODEyNTI4MTY4OTYxOjEyVWdaRjhhSGpqOFZhRDZvaFRyc1RZbzE2ODgwMjY5MjU5NTk",
"cancel_url": "www.wooshpay.com",
"line_items": {
"object": "list",
"data": [
{
"id": "li_1676158633437560832",
"object": "item",
"currency": "THB",
"description": "apple",
"price": {
"id": "price_1676158633450143744",
"object": "price",
"created": 1688462334000,
"livemode": false,
"active": true,
"currency": "THB",
"nickname": "apple",
"product": {
"id": "prod_1676158633462726656",
"object": "product",
"created": 1688462334000,
"livemode": false,
"active": true,
"name": "apple",
"updated": 1688462334000
},
"type": "one_time",
"unit_amount": 100,
"billing_scheme": "per_unit",
"lookup_key": "test_lookup_key"
},
"quantity": 1,
"amount_subtotal": 100,
"amount_total": 100
}
]
},
"payment_intent": "pi_1676158633626304512",
"payment_method_types": [
"promptpay"
],
"payment_status": "unpaid",
"success_url": "https://wooshpay.com/",
"amount_subtotal": 100,
"amount_total": 100,
"billing_address_collection": "auto",
"expires_at": 1688548734385,
"payment_link": "",
"client_secret": "pi_1676158633626304512_secret_JbvbX6yCPEBB886Z46Rs5vw8"
}
Next step
Create a Webhook
Modified at 2024-03-11 02:07:12