POST
/
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": 100,
  "currency": "SGD",
  "payment_methods": [
    "<string>"
  ],
  "email": "jsmith@example.com",
  "name": "<string>",
  "phone": "<string>",
  "wifi_terminal_id": "<string>",
  "staff_id": "98888a24-d6b2-430d-9063-d2be76d443cd",
  "location_id": "9dd07721-d215-4947-9c79-2b8ec25f69db",
  "purpose": "<string>",
  "reference_number": "<string>",
  "redirect_url": "https://www.google.com",
  "webhook": "https://www.google.com",
  "allow_repeated_payments": "false",
  "expiry_date": "<string>",
  "expires_after": "5 minutes",
  "add_admin_fee": "false",
  "send_email": "false",
  "send_sms": "true",
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "country": "<string>",
    "state": "<string>",
    "postal_code": "<string>"
  },
  "generate_qr": false
}'
"{\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}"

Headers

X-BUSINESS-API-KEY
string
required
Example:

"b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d"

Body

application/json
amount
number
required

It's required field. Amount related to the payment. Example: 2500

Required range: 0.3 <= x <= 999999999.99
Example:

100

currency
string
required

It's required field. Currency related to the payment. Example:

Maximum length: 3
Example:

"SGD"

payment_methods
string[]

They're available payment methods supported on your account.(Example: paynow_online , card, wechat, alipay, grabpay_direct, grabpay_paylater, shopee_pay ... etc.). If we don't pass, use the available methods

email
string

Buyer’s email

name
string

Buyer’s name

phone
string

Buyer’s phone number

wifi_terminal_id
string

It's terminal id and it's required if payment method is wifi_card_reader

staff_id
string

It's active staff id from the dashboard

Example:

"98888a24-d6b2-430d-9063-d2be76d443cd"

location_id
string

The active location belongs to business.

Example:

"9dd07721-d215-4947-9c79-2b8ec25f69db"

purpose
string

Purpose of the Payment request.

Maximum length: 255
reference_number
string

Arbitrary reference number that you can map to your internal reference number. This value cannot be edited by the customer

Maximum length: 255
redirect_url
string

URL where we redirect the user after a payment. Query arguments reference (payment request id) and status are sent along

Maximum length: 1028
Example:

"https://www.google.com"

webhook
string

URL where our server do POST request after a payment If done

Example:

"https://www.google.com"

allow_repeated_payments
enum<string>
default:false

If set to true, multiple payments can be paid on a payment request link. Default value is false

Available options:
true,
false
expiry_date
string

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

expires_after
string

E.g "30 mins" Other supported keys are "mins", "hours", "days"

Example:

"5 minutes"

add_admin_fee
enum<string>
default:false

If set to true, the admin fee will be included in total.

Available options:
true,
false
send_email
enum<string>
default:false

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

Available options:
true,
false
send_sms
enum<string>
default:true

It's "true" or "false". If set to "true", SMS will be sent to the customer after the payment is completed. Default is false

Available options:
true,
false
address
object
generate_qr
boolean
default:false

Only valid for paynow_online, qrph_netbank, doku_qris and shopee_pay if generate_qr was true

Response

200
application/json
200
id
string
Example:

"974ee233-bc3e-4aac-a212-15af0d155133"

name
string
Example:

"Buyer_Name_1663650582"

email
string
Example:

"buyer_1663650582@gmail.com"

phone
string
Example:

"+6539393939"

amount
string
Example:

"900,000.00"

currency
string
Example:

"SGD"

status
string
Example:

"pending"

purpose
string
Example:

"Testing"

reference_number
string
Example:

"12345678"

payment_methods
string[]
url
string
Example:

"https://securecheckout.sandbox.hit-pay.com/payment-request/@ban/974ee233-bc3e-4aac-a212-15af0d155133/checkout"

redirect_url
string
Example:

"https://hit-pay.postman.co/"

webhook
string
Example:

"https://hit-pay.postman.co/"

send_sms
boolean
default:true
Example:

true

send_email
boolean
default:true
Example:

true

sms_status
string
Example:

"pending"

email_status
string
Example:

"pending"

allow_repeated_payments
boolean
default:true
Example:

false

expiry_date
string
Example:

"2022-10-10T01:01:01"

created_at
string
Example:

"2022-09-20T13:09:42"

updated_at
string
Example:

"2022-09-20T13:09:42"

staff_id
string | null
Example:

"98888a69-2d7a-4695-811d-6df8cee30264"

business_location_id
string | null
Example:

"9dd07721-d215-4947-9c79-2b8ec25f69db"