Invoice Link API Reference
This API reference outlines methods for creating, retrieving, and deleting invoice links. These links facilitate hosted invoice management, enabling the receipt of payments and loans, and supporting the approval process within embedded API workflows.
The InvoiceLink model
Invoice Links serve as a convenient means for customers to access and interact with specific invoices. Generated with the invoice ID, these links enable customers to view, approve, or make payments directly. Streamlining the invoicing process, Invoice Links enhance communication and provide a user-friendly experience for customers engaging with their invoices.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the invoice link.
- Name
url
- Type
- string
- Description
The URL of the invoice link.
- Name
expiry_date
- Type
- string
- Description
The expiry date of the invoice link.
List all invoice links
This endpoint allows you to retrieve a paginated list of all links associated with the given invoice.
Parameters
- Name
limit
- Type
- integer
- Description
A limit on the number of invoice links to be returned on a single page.
- Name
page
- Type
- integer
- Description
Page number (for pagination).
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v2/invoices/9aae0110-a4d6-4552-99de-4b4d3e3432f8/links" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
Response
{
"data": [
{
"id": "9ab7fb83-847a-4293-8cb9-f55eb29ab2d9",
"url": "https://payments.your-domain.com/public/invoices/view/9ab7fb83-847a-4293-8cb9-f55eb29ab2d9?
signature=e33c035bd56b9951f5191f6803fb5e03d46c1a014134b3a394dd80ca94665e43",
"expiry_date": "1689565444",
"invoice_id": "9aae0110-a4d6-4552-99de-4b4d3e3432f8",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
},
{
"id": "9990ee27-2ce2-46a4-87b8-545aea88cc55",
"url": "https://payments.your-domain.com/public/invoices/view/9990ee27-2ce2-46a4-87b8-545aea88cc55?
signature=e33c035bd56b9951f5191f6803fb5e03d46c1a014134b3a394dd80ca94665e43",
"expiry_date": "1689565444",
"invoice_id": "9aae0110-a4d6-4552-99de-4b4d3e3432f8",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
]
}
Create an invoice link
This endpoint allows you to create new invoice link.
Parameters
- Name
invoice_id
- Type
- string
- Description
The id of the invoice.
Optional Parameters
- Name
expiry_date
- Type
- string
- Description
The expiry date of the invoice link.
Request
curl --request POST \
"https://payments.your-domain.com/api/v2/invoices/9aae0110-a4d6-4552-99de-4b4d3e3432f8/links" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data '{"expiry_date": "1689565444"}' \
Response
{
"data": {
"id": "9ab7fb83-847a-4293-8cb9-f55eb29ab2d9",
"url": "https://payments.your-domain.com/public/invoices/view/9ab7fb83-847a-4293-8cb9-f55eb29ab2d9?
signature=e33c035bd56b9951f5191f6803fb5e03d46c1a014134b3a394dd80ca94665e43",
"expiry_date": "1689565444",
"invoice_id": "9aae0110-a4d6-4552-99de-4b4d3e3432f8",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
}
Retrieve an invoice link
This endpoint allows you to retrieve an existing invoice link.
Parameters
- Name
invoice_id
- Type
- string
- Description
The id of the invoice.
- Name
invoice_link_id
- Type
- string
- Description
The id of the invoice link.
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v2/invoices/9aae0110-a4d6-4552-99de-4b4d3e3432f8/links/9ab7fb83-847a-4293-8cb9-f55eb29ab2d9" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
Response
{
"data": {
"id": "9ab7fb83-847a-4293-8cb9-f55eb29ab2d9",
"url": "https://payments.your-domain.com/public/invoices/view/9ab7fb83-847a-4293-8cb9-f55eb29ab2d9?
signature=e33c035bd56b9951f5191f6803fb5e03d46c1a014134b3a394dd80ca94665e43",
"expiry_date": "1689565444",
"invoice_id": "9aae0110-a4d6-4552-99de-4b4d3e3432f8",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
}
Delete an invoice link
This endpoint allows you to delete a specific invoice link
Parameters
- Name
invoice_id
- Type
- string
- Description
The id of the invoice.
- Name
invoice_link_id
- Type
- string
- Description
The id of the invoice link.
Request
curl --request DELETE \
"https://payments.your-domain.com/api/v2/invoices/9aae0110-a4d6-4552-99de-4b4d3e3432f8/links/9ab7fb83-847a-4293-8cb9-f55eb29ab2d9" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
Response
{
"id": "9ab7fb83-847a-4293-8cb9-f55eb29ab2d9",
"object": "InvoiceLink",
"deleted": true
}