For the complete documentation index, see llms.txt. This page is also available as Markdown.

Invoices

Retrieve invoices for specific orders.

get

The output contains the binary code for invoices in the PDF file format, Base64 encoded (Base64 is used to represent binary data in the ASCII string format).

Path parameters
OrderReferencestringRequired

Reference number for approved/paid orders.

Example: 1234567
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
filenamestringOptionalExample: invoice_BV12333333.pdf
datastringOptionalExample: application/pdf;base64,BASE_64_DATA
get/invoices/{OrderReference}/
GET /rest/6.0/invoices/{OrderReference}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
{
  "filename": "invoice_BV12333333.pdf",
  "data": "application/pdf;base64,BASE_64_DATA"
}

Resend a shopper invoice

post

Queues an asynchronous resend of the shopper invoice email for an order. By default, the invoice is sent to the shopper's email address on file. Optionally, you can send it to a different recipient by providing the email property in the request body. The override applies to this send only and is never saved as the contact email of the order or of the account.

Only shopper invoices are supported (merchant invoices are not). The order must belong to the authenticated account.

The email is sent asynchronously, by a background worker. A successful response (202 Accepted) confirms only that the resend was queued, not that the email was delivered.

Available in API 6.0 over REST, JSON-RPC (resendInvoice) and SOAP (resendInvoice).

Path parameters
OrderReferencestringRequired

Reference number for approved/paid orders.

Example: 1234567
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Body
emailstring · emailOptional

Recipient override for this send only. It is never saved as the contact email of the order or of the account. If omitted, the invoice is sent to the shopper's email address on file.

Responses
202

Accepted. The resend was queued. This does not confirm that the email was delivered.

application/json
statusstringOptional

Always "queued" when the resend was accepted.

Example: queued
post/invoices/{OrderReference}/resend/
POST /rest/6.0/invoices/{OrderReference}/resend/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Content-Type: application/json
Content-Length: 35

{
  "email": "jonathan.smith@mail.com"
}
{
  "status": "queued"
}

Retrieve invoices for specific refunds.

get

The output contains the binary code for invoices in the PDF file format, Base64 encoded (Base64 is used to represent binary data in the ASCII string format).

Path parameters
OrderReferencestringRequired

Reference number for approved/paid orders.

Example: 1234567
TypestringRequired

One of the following: sale or refunds.

Example: refunds
CountnumberRequired

Choose a specific item out of multiple invoices.

Example: 0
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
filenamestringOptionalExample: invoice_BV12333333.pdf
datastringOptionalExample: application/pdf;base64,BASE_64_DATA
get/invoices/{OrderReference}/{Type}/{Count}/
GET /rest/6.0/invoices/{OrderReference}/{Type}/{Count}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
{
  "filename": "invoice_BV12333333.pdf",
  "data": "application/pdf;base64,BASE_64_DATA"
}

Last updated

Was this helpful?