Create Payment Request
/v1/payment-requests
curl --request POST \
--url https://api.sandbox.hit-pay.com/v1/payment-requests \
--header 'Content-Type: application/json' \
--header 'X-BUSINESS-API-KEY: <x-business-api-key>' \
--data '{
"amount": 0,
"currency": "<currency>"
}'
{
"status": "200",
"example": "{\n \"id\": \"974ee233-bc3e-4aac-a212-15af0d155133\",\n \"name\": \"Buyer_Name_1663650582\",\n \"email\": \"buyer_1663650582@gmail.com\",\n \"phone\": \"+6539393939\",\n \"amount\": \"900,000.00\",\n \"currency\": \"SGD\",\n \"status\": \"pending\",\n \"purpose\": \"Testing\",\n \"reference_number\": \"12345678\",\n \"payment_methods\": [\n \"card\"\n ],\n \"url\": \"https://securecheckout.sandbox.hit-pay.com/payment-request/@ban/974ee233-bc3e-4aac-a212-15af0d155133/checkout\",\n \"redirect_url\": \"https://hit-pay.postman.co/\",\n \"webhook\": \"https://hit-pay.postman.co/\",\n \"send_sms\": true,\n \"send_email\": true,\n \"sms_status\": \"pending\",\n \"email_status\": \"pending\",\n \"allow_repeated_payments\": false,\n \"expiry_date\": \"2022-10-10T01:01:01\",\n \"created_at\": \"2022-09-20T13:09:42\",\n \"updated_at\": \"2022-09-20T13:09:42\"\n}"
}
Authorizations
Headers
Body
If set to true, multiple payments can be paid on a payment request link. Default value is false
It's required field. Amount related to the payment. Example: 2500
It's required field. Currency related to the payment. Example: SGD
Buyer’s email
E.g "30 mins" Other supported keys are "mins", "hours", "days"
Time after which the payment link will be expired(time in SG with YYYY-MM-DD HH:mm:ss format). Applicable for repeated payments. Default is Null
Buyer’s name
Payment method type (paynow_online , card, wechat, alipay, grabpay_direct, grabpay_paylater, shopee_pay, zip, fpx). If we don't passe, use the avilable methods
Buyer’s phone number
Purpose of the Payment request.
URL where we redirect the user after a payment. Query arguments reference (payment request id) and status are sent along
Arbitrary reference number that you can map to your internal reference number. This value cannot be edited by the customer
It's "true" or "false". If set to true, an email receipt will be sent to the customer after the payment is completed. Default is false
It's "true" or "false". If set to "true", SMS will be sent to the customer after the payment is completed. Default is false
URL where our server do POST request after a payment If done
Response
curl --request POST \
--url https://api.sandbox.hit-pay.com/v1/payment-requests \
--header 'Content-Type: application/json' \
--header 'X-BUSINESS-API-KEY: <x-business-api-key>' \
--data '{
"amount": 0,
"currency": "<currency>"
}'
{
"status": "200",
"example": "{\n \"id\": \"974ee233-bc3e-4aac-a212-15af0d155133\",\n \"name\": \"Buyer_Name_1663650582\",\n \"email\": \"buyer_1663650582@gmail.com\",\n \"phone\": \"+6539393939\",\n \"amount\": \"900,000.00\",\n \"currency\": \"SGD\",\n \"status\": \"pending\",\n \"purpose\": \"Testing\",\n \"reference_number\": \"12345678\",\n \"payment_methods\": [\n \"card\"\n ],\n \"url\": \"https://securecheckout.sandbox.hit-pay.com/payment-request/@ban/974ee233-bc3e-4aac-a212-15af0d155133/checkout\",\n \"redirect_url\": \"https://hit-pay.postman.co/\",\n \"webhook\": \"https://hit-pay.postman.co/\",\n \"send_sms\": true,\n \"send_email\": true,\n \"sms_status\": \"pending\",\n \"email_status\": \"pending\",\n \"allow_repeated_payments\": false,\n \"expiry_date\": \"2022-10-10T01:01:01\",\n \"created_at\": \"2022-09-20T13:09:42\",\n \"updated_at\": \"2022-09-20T13:09:42\"\n}"
}