The id of the invoice to get the details for
Adfin API (1.0.0)
Adfin uses OAuth 2.0 access tokens to authenticate all API requests.
There are two contexts in which tokens are issued:
Biller Access Tokens — Generated via the Authorization Code flow when a biller connects their Adfin account. These tokens grant access to that biller's data (invoices, payment requests, customers, etc.).
Platform Access Tokens — Generated via the Client Credentials flow for Adfin's own integrations and system events. These tokens authenticate Adfin as the platform itself (not as a specific biller) and are required for endpoints like
/api/webhook.
- Mock serverhttps://developer.adfin.com/_mock/api-docs/prod/invoices/{id}
- Production API Server URLhttps://api.adfin.com/api/invoices/{id}
- Staging API Server URLhttps://api.staging.adfin.com/api/invoices/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.adfin.com/_mock/api-docs/prod/invoices/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'The Invoice data is successfully retrieved
The number of the invoice. Can be empty when creating the invoice without an invoice number,but it will be automatically generated when the invoice is pushed to an accounting software. Once set, serves as a unique value that can be used as an idempotency key.
The invoice total amount. Includes tax amount, amount paid or reduced with credit notes)
The invoice status
The reason as predefined code why the invoice is in a certain status
The source of the invoice
How tax is applied to line items from the invoice
The payment requests that were created for this invoice
References about this invoice from external platforms Adfin integrates with. Such as ID etc
The credit control status of the invoice
{ "id": "string", "invoiceNo": "string", "description": "string", "totalAmount": "string", "taxAmount": "string", "dueAmount": "string", "creditNotesAmount": "string", "dueDate": "2019-08-24T14:15:22Z", "issueDate": "2019-08-24T14:15:22Z", "creationTime": "2019-08-24T14:15:22Z", "lastUpdatedTime": "2019-08-24T14:15:22Z", "paidTime": "2019-08-24T14:15:22Z", "status": "DRAFT", "statusReasonCode": "MISSING_PAYER_CONTACT_DETAILS", "statusReason": "string", "invoiceSource": "FILE_UPLOAD", "customer": { "id": "string", "externalId": "string", "name": "string", "creationTime": "2019-08-24T14:15:22Z", "lastUpdatedTime": "2019-08-24T14:15:22Z", "people": [ … ], "addresses": [ … ], "directDebitMandate": { … }, "billerBankAccount": { … }, "timezone": "string", "discount": { … }, "externalData": [ … ], "tags": [ … ], "status": "ACTIVE", "statusReasonCode": "MERGED", "settings": { … }, "trackingItems": [ … ], "office": { … } }, "itemsTaxType": "EXCLUSIVE", "instalmentPlanDetails": { "cadence": { … } }, "items": [ { … } ], "paymentRequests": [ { … } ], "scheduleDetails": { "scheduleId": "string", "scheduleNo": "string", "type": "RECURRING" }, "creditNotes": [ { … } ], "fileSource": "NONE", "externalData": [ { … } ], "creditControlStatus": "AT_RISK", "workflowType": "AUTO_COLLECT", "customFields": [ { … } ], "office": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "trackingItemId": "c7c7fc03-0b17-402e-aa79-1d532a6db210", "details": { … } } }
A short description or summary of the invoice.
How tax is applied to line items from the invoice
Details for the invoice's payment requests. Only required for invoices with multiple payment requests (ex: instalments).
- Mock serverhttps://developer.adfin.com/_mock/api-docs/prod/invoices/{id}
- Production API Server URLhttps://api.adfin.com/api/invoices/{id}
- Staging API Server URLhttps://api.staging.adfin.com/api/invoices/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.adfin.com/_mock/api-docs/prod/invoices/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"invoiceNo": "INV-12345",
"customer": {
"id": "80349480-490b-4234-92e7-fad697e3d446"
},
"description": "Monthly subscription fee for January",
"dueDate": "2025-12-15T23:59:59Z",
"issueDate": "2025-12-15T09:00:00Z",
"itemsTaxType": "EXCLUSIVE",
"items": [
{
"id": "string",
"description": "string",
"unitAmount": 0,
"quantity": 0,
"taxRate": 0,
"taxRateId": "string",
"accountCodeId": "string",
"productId": "string",
"externalData": [
{
"id": "string",
"connectorType": "XERO",
"templateId": "string",
"accountCode": "string"
}
],
"trackingItemIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
],
"instalmentPlanDetails": {
"cadence": {
"type": "INTERVAL",
"timeUnit": "SECOND",
"frequency": 1,
"dayOfMonth": 0,
"dates": [
"2019-08-24T14:15:22Z"
],
"startDate": "2019-08-24T14:15:22Z",
"endDate": "2019-08-24T14:15:22Z",
"count": 2
}
},
"paymentRequests": [
{
"id": "3d6be112-2825-4ee6-8287-ea9171e20b36",
"amount": 100,
"payByDate": "2025-03-25T11:36:55.243Z"
}
],
"officeId": "80349480-490b-4234-92e7-fad697e3d446"
}'The request was successful and the invoice was updated.
The number of the invoice. Can be empty when creating the invoice without an invoice number,but it will be automatically generated when the invoice is pushed to an accounting software. Once set, serves as a unique value that can be used as an idempotency key.
The invoice total amount. Includes tax amount, amount paid or reduced with credit notes)
The invoice status
The reason as predefined code why the invoice is in a certain status
The source of the invoice
How tax is applied to line items from the invoice
The payment requests that were created for this invoice
References about this invoice from external platforms Adfin integrates with. Such as ID etc
The credit control status of the invoice
{ "id": "string", "invoiceNo": "string", "description": "string", "totalAmount": "string", "taxAmount": "string", "dueAmount": "string", "creditNotesAmount": "string", "dueDate": "2019-08-24T14:15:22Z", "issueDate": "2019-08-24T14:15:22Z", "creationTime": "2019-08-24T14:15:22Z", "lastUpdatedTime": "2019-08-24T14:15:22Z", "paidTime": "2019-08-24T14:15:22Z", "status": "DRAFT", "statusReasonCode": "MISSING_PAYER_CONTACT_DETAILS", "statusReason": "string", "invoiceSource": "FILE_UPLOAD", "customer": { "id": "string", "externalId": "string", "name": "string", "creationTime": "2019-08-24T14:15:22Z", "lastUpdatedTime": "2019-08-24T14:15:22Z", "people": [ … ], "addresses": [ … ], "directDebitMandate": { … }, "billerBankAccount": { … }, "timezone": "string", "discount": { … }, "externalData": [ … ], "tags": [ … ], "status": "ACTIVE", "statusReasonCode": "MERGED", "settings": { … }, "trackingItems": [ … ], "office": { … } }, "itemsTaxType": "EXCLUSIVE", "instalmentPlanDetails": { "cadence": { … } }, "items": [ { … } ], "paymentRequests": [ { … } ], "scheduleDetails": { "scheduleId": "string", "scheduleNo": "string", "type": "RECURRING" }, "creditNotes": [ { … } ], "fileSource": "NONE", "externalData": [ { … } ], "creditControlStatus": "AT_RISK", "workflowType": "AUTO_COLLECT", "customFields": [ { … } ], "office": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "trackingItemId": "c7c7fc03-0b17-402e-aa79-1d532a6db210", "details": { … } } }
- Mock serverhttps://developer.adfin.com/_mock/api-docs/prod/invoices/{id}:void
- Production API Server URLhttps://api.adfin.com/api/invoices/{id}:void
- Staging API Server URLhttps://api.staging.adfin.com/api/invoices/{id}:void
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.adfin.com/_mock/api-docs/prod/invoices/{id}:void' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"reasonCode": "string",
"reason": "string"
}'- Mock serverhttps://developer.adfin.com/_mock/api-docs/prod/invoices/{id}:mark-as-paid
- Production API Server URLhttps://api.adfin.com/api/invoices/{id}:mark-as-paid
- Staging API Server URLhttps://api.staging.adfin.com/api/invoices/{id}:mark-as-paid
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.adfin.com/_mock/api-docs/prod/invoices/{id}:mark-as-paid' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'How the payment is expected to be collected for this invoice.
An optional message that will be sent to the customer when the invoice is activated.
- Mock serverhttps://developer.adfin.com/_mock/api-docs/prod/invoices/{id}:activate
- Production API Server URLhttps://api.adfin.com/api/invoices/{id}:activate
- Staging API Server URLhttps://api.staging.adfin.com/api/invoices/{id}:activate
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.adfin.com/_mock/api-docs/prod/invoices/{id}:activate' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"collectionMethod": "ONE_TIME_PAYMENT",
"customMessage": "string",
"templateId": "string"
}'The status of the invoice.
- DRAFT: The invoice does not contain contact details for the payer or it is not yet distributed.
- UNPAID: The invoice is not yet paid.
- OVERDUE: The invoice is not yet paid and it is passed the due date.
- SCHEDULED: The invoice is scheduled to collect the payment via Direct Debit.
- SUBMITTED: The remaining due amount on the invoice is covered by submitted (but not yet confirmed) Direct Debit payments.
- PAID: The invoice payment has been captured.
- SETTLED: The invoice is paid out.
- VOID: The invoice was voided.
The start date after which the invoices due date should be, including the start date.
The end date before which the invoices due date should be, including the end date.
The start date after which the invoices issue date should be, including the start date.
The end date before which the invoices issue date should be, including the end date.
The start time after which the invoice was paid, including the paid start time.
The end time after which the invoice was paid, including the paid end time.
The start time after which the invoices last updated time should be, including the start time.
The end time before which the invoices last updated time should be, including the end time.
Whether the response should include details on total count and counts per statuses
The credit control status of the invoice.
- AT_RISK: The invoice is at risk of not being paid.
- EXPECTED: The invoice is expected to be paid.
- CONFIRMED: The invoice is paid.
The cashflow status of the payment request.
- UNPAID – not yet paid.
- PROCESSING – expected to be paid.
- PAID_OUT – already paid out.
The direct debit mandate status.
- NO_MANDATE: invoices linked to customers without a mandate
- AWAITING_SIGNATURE: invoices linked to customers awaiting signature
- SIGNED: invoices linked to customers with a signed mandate, but not yet active
- ACTIVE: invoices linked to customers with an active mandate.
- MIGRATING: invoices linked to customers with an active mandate which is being migrated to a different payment service provider.
The workflow type.
- AUTO_COLLECT: automatic collection workflow, such as direct debit
- ON_DEMAND: on demain workflow, such as via open banking and card payments
List of field value IDs to filter invoices by their associated field mappings.
- Mock serverhttps://developer.adfin.com/_mock/api-docs/prod/invoices
- Production API Server URLhttps://api.adfin.com/api/invoices
- Staging API Server URLhttps://api.staging.adfin.com/api/invoices
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.adfin.com/_mock/api-docs/prod/invoices?invoiceNo=string&customerId=string&externalCustomerId=string&statuses=string&statusReasons=string&dueStartDate=2019-08-24T14%3A15%3A22Z&dueEndDate=2019-08-24T14%3A15%3A22Z&issueStartDate=2019-08-24T14%3A15%3A22Z&issueEndDate=2019-08-24T14%3A15%3A22Z&paidStartTime=2019-08-24T14%3A15%3A22Z&paidEndTime=2019-08-24T14%3A15%3A22Z&lastUpdatedStartTime=2019-08-24T14%3A15%3A22Z&lastUpdatedEndTime=2019-08-24T14%3A15%3A22Z&paymentLinkLastSeenTime=2019-08-24T14%3A15%3A22Z&searchText=string&includeCount=true&creditControlStatuses=AT_RISK&cashflowStatuses=UNPAID&cashflowPeriodStartDate=2019-08-24T14%3A15%3A22Z&cashflowPeriodEndDate=2019-08-24T14%3A15%3A22Z&directDebitMandateStatuses=NO_MANDATE&workflowTypes=AUTO_COLLECT&minAmount=0&maxAmount=0&reviewSessionId=string&invoiceIds=string&scheduleId=string&fieldValueIds=string&page=0&size=50&sort=creationTime%2CDESC' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'The list of invoices for the specified filter.
The number of the invoice. Can be empty when creating the invoice without an invoice number,but it will be automatically generated when the invoice is pushed to an accounting software. Once set, serves as a unique value that can be used as an idempotency key.
The invoice total amount. Includes tax amount, amount paid or reduced with credit notes)
The invoice status
The reason as predefined code why the invoice is in a certain status
The source of the invoice
How tax is applied to line items from the invoice
The payment requests that were created for this invoice
References about this invoice from external platforms Adfin integrates with. Such as ID etc
The credit control status of the invoice
{ "id": "string", "invoiceNo": "string", "description": "string", "totalAmount": "string", "taxAmount": "string", "dueAmount": "string", "creditNotesAmount": "string", "dueDate": "2019-08-24T14:15:22Z", "issueDate": "2019-08-24T14:15:22Z", "creationTime": "2019-08-24T14:15:22Z", "lastUpdatedTime": "2019-08-24T14:15:22Z", "paidTime": "2019-08-24T14:15:22Z", "status": "DRAFT", "statusReasonCode": "MISSING_PAYER_CONTACT_DETAILS", "statusReason": "string", "invoiceSource": "FILE_UPLOAD", "customer": { "id": "string", "externalId": "string", "name": "string", "creationTime": "2019-08-24T14:15:22Z", "lastUpdatedTime": "2019-08-24T14:15:22Z", "people": [ … ], "addresses": [ … ], "directDebitMandate": { … }, "billerBankAccount": { … }, "timezone": "string", "discount": { … }, "externalData": [ … ], "tags": [ … ], "status": "ACTIVE", "statusReasonCode": "MERGED", "settings": { … }, "trackingItems": [ … ], "office": { … } }, "itemsTaxType": "EXCLUSIVE", "instalmentPlanDetails": { "cadence": { … } }, "items": [ { … } ], "paymentRequests": [ { … } ], "scheduleDetails": { "scheduleId": "string", "scheduleNo": "string", "type": "RECURRING" }, "creditNotes": [ { … } ], "fileSource": "NONE", "externalData": [ { … } ], "creditControlStatus": "AT_RISK", "workflowType": "AUTO_COLLECT", "customFields": [ { … } ], "office": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "trackingItemId": "c7c7fc03-0b17-402e-aa79-1d532a6db210", "details": { … } } }
The unique number of the invoice. Acts as an idempotency key. Will be generated if not provided.
A short description or summary of the invoice.
How tax is applied to line items from the invoice
Details for the invoice's payment requests. Only required for invoices with multiple payment requests (ex: instalments).
- Mock serverhttps://developer.adfin.com/_mock/api-docs/prod/invoices
- Production API Server URLhttps://api.adfin.com/api/invoices
- Staging API Server URLhttps://api.staging.adfin.com/api/invoices
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.adfin.com/_mock/api-docs/prod/invoices \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"invoiceNo": "INV-12345",
"customer": {
"id": "80349480-490b-4234-92e7-fad697e3d446"
},
"description": "Monthly subscription fee for January",
"amount": 0,
"dueDate": "2025-12-15T23:59:59.000Z",
"issueDate": "2025-12-15T23:59:59.000Z",
"itemsTaxType": "EXCLUSIVE",
"instalmentPlanDetails": {
"cadence": {
"type": "INTERVAL",
"timeUnit": "SECOND",
"frequency": 1,
"dayOfMonth": 0,
"dates": [
"2019-08-24T14:15:22Z"
],
"startDate": "2019-08-24T14:15:22Z",
"endDate": "2019-08-24T14:15:22Z",
"count": 2
}
},
"items": [
{
"description": "string",
"quantity": 0,
"unitAmount": 0,
"taxRate": 0,
"taxRateId": "d4f1c2b3-4a5b-678c-9d0e-f1a2b3c4d5e6",
"accountCodeId": "string",
"productId": "d4f1c2b3-4a5b-678c-9d0e-f1a2b3c4d5e6",
"trackingItemIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
],
"paymentRequests": [
{
"amount": 100,
"payByDate": "2025-03-25T11:36:55.243Z"
}
],
"officeId": "80349480-490b-4234-92e7-fad697e3d446"
}'The request was successful and the invoice was created.
The number of the invoice. Can be empty when creating the invoice without an invoice number,but it will be automatically generated when the invoice is pushed to an accounting software. Once set, serves as a unique value that can be used as an idempotency key.
The invoice total amount. Includes tax amount, amount paid or reduced with credit notes)
The invoice status
The reason as predefined code why the invoice is in a certain status
The source of the invoice
How tax is applied to line items from the invoice
The payment requests that were created for this invoice
References about this invoice from external platforms Adfin integrates with. Such as ID etc
The credit control status of the invoice
{ "id": "string", "invoiceNo": "string", "description": "string", "totalAmount": "string", "taxAmount": "string", "dueAmount": "string", "creditNotesAmount": "string", "dueDate": "2019-08-24T14:15:22Z", "issueDate": "2019-08-24T14:15:22Z", "creationTime": "2019-08-24T14:15:22Z", "lastUpdatedTime": "2019-08-24T14:15:22Z", "paidTime": "2019-08-24T14:15:22Z", "status": "DRAFT", "statusReasonCode": "MISSING_PAYER_CONTACT_DETAILS", "statusReason": "string", "invoiceSource": "FILE_UPLOAD", "customer": { "id": "string", "externalId": "string", "name": "string", "creationTime": "2019-08-24T14:15:22Z", "lastUpdatedTime": "2019-08-24T14:15:22Z", "people": [ … ], "addresses": [ … ], "directDebitMandate": { … }, "billerBankAccount": { … }, "timezone": "string", "discount": { … }, "externalData": [ … ], "tags": [ … ], "status": "ACTIVE", "statusReasonCode": "MERGED", "settings": { … }, "trackingItems": [ … ], "office": { … } }, "itemsTaxType": "EXCLUSIVE", "instalmentPlanDetails": { "cadence": { … } }, "items": [ { … } ], "paymentRequests": [ { … } ], "scheduleDetails": { "scheduleId": "string", "scheduleNo": "string", "type": "RECURRING" }, "creditNotes": [ { … } ], "fileSource": "NONE", "externalData": [ { … } ], "creditControlStatus": "AT_RISK", "workflowType": "AUTO_COLLECT", "customFields": [ { … } ], "office": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "trackingItemId": "c7c7fc03-0b17-402e-aa79-1d532a6db210", "details": { … } } }
- Mock serverhttps://developer.adfin.com/_mock/api-docs/prod/invoices/{id}/file
- Production API Server URLhttps://api.adfin.com/api/invoices/{id}/file
- Staging API Server URLhttps://api.staging.adfin.com/api/invoices/{id}/file
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.adfin.com/_mock/api-docs/prod/invoices/{id}/file' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'