B2B API Specification

Version 3.2.26

production
sandbox

Invoice

The Email Invoice endpoint extends the Trace AR Checkout suite by allowing integrators to generate payment requests directly to a customer's inbox, encompassing financial details, customer identification, and specific transaction behavior. It also allows for control over the checkout experience by defining how the payer can interact with the invoice, and manages the lifecycle of the invoiceusing an expiration timestamp. This feature provides a cohesive visual identity for merchant invoices, containing a secure link that seamlessly transitions the recipient to the hosted payment interface to complete their transaction.

Create invoice

post /v3/invoice
Parameters
X-Integrator-Id
Type
string
Maximum Length
12

Loading...

X-Permalinks
Type
string
Maximum Length
4

Loading...

Request Schema
silent_post
Type
string
Range
1 to 2083 characters
Example
https://example.com/payment-response

Loading...

terms_conditions_link
Type
string
Range
1 to 2083 characters
Example
http://example.com/terms-redirect-link

Loading...

payment_approved_link
Type
string
Range
1 to 2083 characters
Example
http://example.com/payment-approved-link

Loading...

payment_declined_link
Type
string
Range
1 to 2083 characters
Example
http://example.com/payment-declined-link

Loading...

return_method
Type
string
Default
HYPERLINK
Enum
HYPERLINK

Loading...

email_required
Type
boolean
Example
true

Loading...

billing_address_required
Type
boolean
Example
true

Loading...

csc_required
Type
boolean
Example
true

Loading...

merchant_id required
Type
integer
Example
12345

Loading...

invoice_amount
Type
number
Minimum
0

Loading...

is_amount_editable
Type
boolean

Loading...

transaction_type required
Type
string
Enum
SALEAUTHORIZATIONCREATE_CUSTOMERMODIFY_CUSTOMERSALE_AND_CUSTOMER

Loading...

invoice_number
Type
string

Loading...

is_invoice_number_editable
Type
boolean

Loading...

expire_at
Type
string

Loading...

returning_customer_login
Type
boolean
Default
false

Loading...

customer_label
Type
string

Loading...

customer_id
Type
integer
Example
12345671

Loading...

send_email
Type
boolean
Default
false

Loading...

email_details
Type
object

Loading...

Example Request
{
  "silent_post": "https://example.com/payment-response",
  "terms_conditions_link": "http://example.com/terms-redirect-link",
  "payment_approved_link": "http://example.com/payment-approved-link",
  "payment_declined_link": "http://example.com/payment-declined-link",
  "return_method": "HYPERLINK",
  "email_required": true,
  "billing_address_required": true,
  "csc_required": true,
  "merchant_id": 12345,
  "invoice_amount": "number",
  "is_amount_editable": "boolean",
  "transaction_type": "SALE",
  "invoice_number": "string",
  "is_invoice_number_editable": "boolean",
  "expire_at": "string",
  "returning_customer_login": false,
  "customer_label": "string",
  "customer_id": 12345671,
  "send_email": false,
  "email_details": {
    "recipient_email": [
      "recipient_1@abc.com",
      "recipient_2@abc.com"
    ],
    "reply_email": "reply_to@abc.com",
    "cc": [
      "cc_1@abc.com",
      "cc_2@abc.com"
    ],
    "from_name": "Sender Name",
    "bcc": [
      "bcc_1@abc.com",
      "bcc_2@abc.com"
    ],
    "message": "Please find your invoice for this month attached.",
    "attachment": "data:application/pdf;base64,JVBERi0xLjQKJ..."
  }
}
Example Response
201 Successful Response
422 Validation Error

Get checkout URL

get /v3/invoice/checkout-link/{invoice_id}
Parameters
invoice_id required
Type
string

Loading...

merchant_id required
Type
integer

Loading...

X-Integrator-Id
Type
string
Maximum Length
12

Loading...

X-Permalinks
Type
string
Maximum Length
4

Loading...

Example Response
200 Successful Response
422 Validation Error

Get invoice

get /v3/invoice/{invoice_id}
Parameters
invoice_id required
Type
string

Loading...

merchant_id required
Type
integer

Loading...

include_attachment
Type
boolean
Default
false

Loading...

X-Integrator-Id
Type
string
Maximum Length
12

Loading...

X-Permalinks
Type
string
Maximum Length
4

Loading...

Example Response
200 Successful Response
422 Validation Error

Search invoices

post /v3/invoices/{merchant_id}
Parameters
merchant_id required
Type
integer

Loading...

X-Integrator-Id
Type
string
Maximum Length
12

Loading...

X-Permalinks
Type
string
Maximum Length
4

Loading...

Request Schema
invoice_id
Type
string
Example
6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b

Loading...

status
Type
string
Enum
INITIATEDIN_PROGRESSEXPIREDCOMPLETEDINVALID
Example
PENDING

Loading...

start_date
Type
string
Example
2025-01-09T00:00:00

Loading...

end_date
Type
string
Example
2025-01-11T00:00:00

Loading...

Example Request
{
  "invoice_id": "6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b",
  "status": "PENDING",
  "start_date": "2025-01-09T00:00:00",
  "end_date": "2025-01-11T00:00:00"
}
Example Response
200 Successful Response
422 Validation Error

Delete batch invoices

post /v3/invoice/batch/delete
Parameters
X-Integrator-Id
Type
string
Maximum Length
12

Loading...

X-Permalinks
Type
string
Maximum Length
4

Loading...

Request Schema
invoices required
Type
array

Loading...

Example Request
{
  "invoices": {
    "invoice_id": "string",
    "merchant_id": 12345
  }
}
Example Response
200 Successful Response
422 Validation Error

Contact Us

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.