PUT
/
v1
/
invoices
/
{invoice_id}
curl --request PUT \
  --url https://api.sandbox.hit-pay.com/v1/invoices/{invoice_id} \
  --header 'Content-Type: application/json' \
  --header 'X-BUSINESS-API-KEY: <x-business-api-key>' \
  --data '{
  "customer_name": "<string>",
  "customer_email": "<string>",
  "invoice_date": "<string>",
  "due_date": "<string>",
  "auto_invoice_number": "<string>",
  "invoice_number": "<string>",
  "currency": "<string>",
  "amount": 123,
  "payment_by": "<string>",
  "tax_setting": "<string>",
  "send_email": 123,
  "webhook": "<string>",
  "reference": "<string>",
  "footer": "<string>",
  "allow_partial_payments": "<string>",
  "partial_payments": {
    "0": {
      "amount": 123,
      "due_date": "<string>"
    },
    "1": {
      "amount": 123,
      "due_date": "<string>"
    }
  },
  "products": {
    "0": {
      "product_id": "<string>",
      "quantity": "<string>",
      "variation_id": "<string>",
      "discount": "<string>"
    },
    "1": {
      "product_id": "<string>",
      "quantity": "<string>",
      "variation_id": "<string>",
      "discount": "<string>"
    }
  },
  "stackable_discounts": {
    "0": {
      "name": "<string>",
      "discount": "<string>",
      "percentage_discount": "<string>",
      "order": "<string>"
    },
    "1": {
      "name": "<string>",
      "discount": "<string>",
      "percentage_discount": "<string>",
      "order": "<string>"
    }
  },
  "recipients": {
    "0": {
      "email": "<string>",
      "customer_id": "<string>"
    }
  }
}'

Headers

X-BUSINESS-API-KEY
string
required

Path Parameters

invoice_id
string
required

It's required field

Body

application/json
customer_name
string
required

Customer's email

customer_email
string
required

Customer's name

invoice_date
string
required

The format is 31/12/2022

due_date
string

Invoice Due Date, format d/m/Y. Example: 31/12/2022

auto_invoice_number
string

auto_invoice_number

invoice_number
string

Invoice Number, required if auto_invoice_number set 0

currency
string
required

Invoice currency

amount
number
required

Invoice amount, only required for payment by amount

payment_by
string
required

Payment is by product or amount

tax_setting
string

Tax id

send_email
integer
default: 0

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

webhook
string

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

reference
string

Invoice Description

footer
string

Invoice Footer

allow_partial_payments
string

allow partial payment of invoice (0 or 1)

partial_payments
object
products
object
stackable_discounts
object
recipients
object