v2

latestOpenAPI 3.1.12026-08-06856719.6 KB

Create the invoice

Create the invoice

post/v1/invoices

Headers

X-BUSINESS-API-KEYstring required
Example:b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d

Request body

customer_idstring

Customer id and it's required field if the customer's email and name are not present/

invoice_datestring required

The format(Y-m-d) is 2024-12-21

due_datestring

Invoice Due Date, format Y-m-d. Example: 2024-12-21

auto_invoice_numberstring

auto_invoice_number

invoice_numberstring

Invoice Number, required if auto_invoice_number set 0

currencystring required

Invoice currency

payment_methodsstring[]

The available payment methods support on your account and currency.

amountnumber double required

Invoice amount, only required for payment by amount

subtotalnumber double

The subtotal field is required when payment by is amount.

payment_bystring required

Payment is by product or amount

tax_settingstring

Tax id

send_emailinteger

HitPay to send email receipts to the customer. Default value is 0

webhookstring

Optional URL value to which HitPay will send a POST request when there is a new charge or if there is an error charging the card

referencestring

Invoice Description

footerstring

Invoice Footer

allow_partial_paymentsstring

allow partial payment of invoice (0 or 1)

Example request

{
  "customer": {
    "address": {
      "name": "160 Paya Lebar Road 07-08 Orion Industrial ",
      "city": "Singapore",
      "state": "Singapore",
      "postal_code": "367903",
      "country": "sg"
    }
  },
  "payment_methods": [
    "paynow_online"
  ]
}

Response

200