OK
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/products/partner-integration/partner-integration-api-reference/schedules/invoices/{id}
- Production API Server URLhttps://api.adfin.com/api/schedules/invoices/{id}
- Staging API Server URLhttps://api.staging.adfin.com/api/schedules/invoices/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.adfin.com/_mock/products/partner-integration/partner-integration-api-reference/schedules/invoices/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'A system-generated, unique identifier for the recurring invoice. Automatically created using the prefix SCH followed by a numeric sequence (e.g., SCH-1, SCH-2, ...).
The next date a new invoice will be automatically generated.
Indicates the current status of the recurring invoice. Possible values might include:
DRAFT– currently not generating new invoicesACTIVE– currently generating new invoicesFINISHED– has finished all planned occurrencesCANCELLED– has been cancelled before finishing all planned occurrences
A cadence that recurs at a fixed interval. Use this to define schedules that repeat every N units of time, such as "every 2 weeks" or "every 3 months".
This defines the structure and configuration of invoices that will be automatically generated.
The date and time when the recurring invoice was created.
The date and time when the recurring invoice was last updated.
The total number of invoices this recurring invoice is expected to generate based on cadence, start date, and end date.
The total amount of the recurring invoice. Calculated based on the sum of all invoice line items across all occurrences.
{ "id": "1", "recurringInvoiceNo": "SCH-42", "nextIssueDate": "2025-10-15T00:00:00Z", "status": "ACTIVE", "cadence": { "timeUnit": "WEEKS", "frequency": 2, "startDate": "2025-01-01T00:00:00Z", "endDate": "2025-12-31T23:59:59Z" }, "invoiceDetails": { "customer": { … }, "paymentTerm": { … }, "distribution": { … }, "description": "Monthly subscription for January", "currencyCode": "GBP", "itemsTaxType": "INCLUSIVE", "items": [ … ] }, "creationTime": "2025-09-27T12:00:00Z", "lastUpdatedTime": "2025-10-01T08:30:00Z", "totalInvoices": 10, "amount": 1234.5, "nextInvoices": [ { … } ] }
A cadence that recurs at a fixed interval. Use this to define schedules that repeat every N units of time, such as "every 2 weeks" or "every 3 months".
This defines the structure and configuration of invoices that will be automatically generated.
- Mock serverhttps://developer.adfin.com/_mock/products/partner-integration/partner-integration-api-reference/schedules/invoices/{id}
- Production API Server URLhttps://api.adfin.com/api/schedules/invoices/{id}
- Staging API Server URLhttps://api.staging.adfin.com/api/schedules/invoices/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.adfin.com/_mock/products/partner-integration/partner-integration-api-reference/schedules/invoices/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"cadence": {
"timeUnit": "WEEKS",
"frequency": 2,
"startDate": "2025-01-01T00:00:00Z",
"endDate": "2025-12-31T23:59:59Z"
},
"invoiceDetails": {
"customer": {
"id": "80349480-490b-4234-92e7-fad697e3d446"
},
"paymentTerm": {
"timeUnit": "DAYS",
"value": 30
},
"distribution": {
"collectionMethod": "AUTO_COLLECT",
"templateId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"customMessage": "Please find your invoice attached. Thank you for your business!",
"approvedForSending": true
},
"description": "Monthly subscription for January",
"currencyCode": "GBP",
"itemsTaxType": "INCLUSIVE",
"items": [
{
"description": "Pro Plan Subscription",
"unitAmount": 5000,
"quantity": 1,
"taxRate": 0.1
}
]
}
}'The request has succeeded and has resulted in one recurring invoice being updated
A system-generated, unique identifier for the recurring invoice. Automatically created using the prefix SCH followed by a numeric sequence (e.g., SCH-1, SCH-2, ...).
The next date a new invoice will be automatically generated.
Indicates the current status of the recurring invoice. Possible values might include:
DRAFT– currently not generating new invoicesACTIVE– currently generating new invoicesFINISHED– has finished all planned occurrencesCANCELLED– has been cancelled before finishing all planned occurrences
A cadence that recurs at a fixed interval. Use this to define schedules that repeat every N units of time, such as "every 2 weeks" or "every 3 months".
This defines the structure and configuration of invoices that will be automatically generated.
The date and time when the recurring invoice was created.
The date and time when the recurring invoice was last updated.
The total number of invoices this recurring invoice is expected to generate based on cadence, start date, and end date.
The total amount of the recurring invoice. Calculated based on the sum of all invoice line items across all occurrences.
{ "id": "1", "recurringInvoiceNo": "SCH-42", "nextIssueDate": "2025-10-15T00:00:00Z", "status": "ACTIVE", "cadence": { "timeUnit": "WEEKS", "frequency": 2, "startDate": "2025-01-01T00:00:00Z", "endDate": "2025-12-31T23:59:59Z" }, "invoiceDetails": { "customer": { … }, "paymentTerm": { … }, "distribution": { … }, "description": "Monthly subscription for January", "currencyCode": "GBP", "itemsTaxType": "INCLUSIVE", "items": [ … ] }, "creationTime": "2025-09-27T12:00:00Z", "lastUpdatedTime": "2025-10-01T08:30:00Z", "totalInvoices": 10, "amount": 1234.5, "nextInvoices": [ { … } ] }
- Mock serverhttps://developer.adfin.com/_mock/products/partner-integration/partner-integration-api-reference/schedules/invoices/{id}
- Production API Server URLhttps://api.adfin.com/api/schedules/invoices/{id}
- Staging API Server URLhttps://api.staging.adfin.com/api/schedules/invoices/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://developer.adfin.com/_mock/products/partner-integration/partner-integration-api-reference/schedules/invoices/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Mock serverhttps://developer.adfin.com/_mock/products/partner-integration/partner-integration-api-reference/schedules/invoices/{id}:cancel
- Production API Server URLhttps://api.adfin.com/api/schedules/invoices/{id}:cancel
- Staging API Server URLhttps://api.staging.adfin.com/api/schedules/invoices/{id}:cancel
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.adfin.com/_mock/products/partner-integration/partner-integration-api-reference/schedules/invoices/{id}:cancel' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Mock serverhttps://developer.adfin.com/_mock/products/partner-integration/partner-integration-api-reference/schedules/invoices/{id}:activate
- Production API Server URLhttps://api.adfin.com/api/schedules/invoices/{id}:activate
- Staging API Server URLhttps://api.staging.adfin.com/api/schedules/invoices/{id}:activate
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.adfin.com/_mock/products/partner-integration/partner-integration-api-reference/schedules/invoices/{id}:activate' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'A cadence that recurs at a fixed interval. Use this to define schedules that repeat every N units of time, such as "every 2 weeks" or "every 3 months".
Determines whether the cadence repeats in weeks, months or years. Common values:
- WEEKS
- MONTHS
- YEARS
Combined with timeUnit to determine how often the cadence occurs. For example:
frequency = 2andtimeUnit = WEEKS→ every 2 weeksfrequency = 1andtimeUnit = MONTHS→ every month
The first occurrence happens at this time.
This defines the structure and configuration of invoices that will be automatically generated.
Contains the unique identifier for the customer.
Defines the duration before an invoice is due, using a combination of a time unit and value. For example, a value of 30 with a timeUnit of DAYS represents "net 30 days".
Information about how an invoice or payment request is distributed and collected.
This defines:
- The method by which payment is expected to be collected.
- The workflow template used to send the invoice or payment request.
- Optional custom message for the customer.
- Approval status for automatically distributing to the customer.
How the payment is expected to be collected. For example:
AUTO_COLLECT: Collected automatically via direct debit.ON_DEMAND: Collected via other payment methods (eg.CARD,APPLE_PAY,GOOGLE_PAY,BANK).NONE: No payment collection is initiated automatically. . Possible values (non-exclusive): AUTO_COLLECT, ON_DEMAND, NONE
The workflow template ID used for sending the invoice or payment request to the customer. Optional — if null, the system default template will be used.
An optional message that will be sent to the customer when the invoice or payment request is distributed. Can be used for personalized greetings or additional instructions.
A short summary or purpose of the invoice. Appears in both the invoice document and customer communications.
The three-letter ISO 4217 currency code (e.g., GBP, EUR, USD). Indicates the currency in which the invoice is issued.
Defines how tax is applied to the invoice line items.
Possible values:
INCLUSIVE: Tax is included in item prices.EXCLUSIVE: Tax is added on top of item prices.NONE: No tax applied.
The list of line items included in the invoice. Each item represents a product, service, or fee with its own amount and tax configuration.
The tax rate percentage applied on the line item amount (quantity * unit amount).
Tax rate id for this line item. Use the Tax Rates API to manage your tax rates.
Sales account id for this line item. If you require specific sales accounts to be used, provide the account code id here. To recieve your account codes, contact support@adfin.com
- Mock serverhttps://developer.adfin.com/_mock/products/partner-integration/partner-integration-api-reference/schedules/invoices
- Production API Server URLhttps://api.adfin.com/api/schedules/invoices
- Staging API Server URLhttps://api.staging.adfin.com/api/schedules/invoices
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.adfin.com/_mock/products/partner-integration/partner-integration-api-reference/schedules/invoices \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"cadence": {
"type": "INTERVAL",
"timeUnit": "MONTHS",
"frequency": 1,
"startDate": "2025-01-01T00:00:00Z"
},
"invoiceDetails": {
"customer": {
"id": "80349480-490b-4234-92e7-fad697e3d446"
},
"paymentTerm": {
"timeUnit": "DAYS",
"value": 30
},
"distribution": {
"collectionMethod": "AUTO_COLLECT",
"templateId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"customMessage": "Please find your invoice attached. Thank you for your business!",
"approvedForSending": true
},
"description": "Monthly subscription for January",
"currencyCode": "GBP",
"itemsTaxType": "INCLUSIVE",
"items": [
{
"description": "Pro Plan Subscription",
"unitAmount": 5000,
"quantity": 1
}
]
}
}'The request was successful and the recurring invoice was created
A system-generated, unique identifier for the recurring invoice. Automatically created using the prefix SCH followed by a numeric sequence (e.g., SCH-1, SCH-2, ...).
The next date a new invoice will be automatically generated.
Indicates the current status of the recurring invoice. Possible values might include:
DRAFT– currently not generating new invoicesACTIVE– currently generating new invoicesFINISHED– has finished all planned occurrencesCANCELLED– has been cancelled before finishing all planned occurrences
A cadence that recurs at a fixed interval. Use this to define schedules that repeat every N units of time, such as "every 2 weeks" or "every 3 months".
This defines the structure and configuration of invoices that will be automatically generated.
The date and time when the recurring invoice was created.
The date and time when the recurring invoice was last updated.
The total number of invoices this recurring invoice is expected to generate based on cadence, start date, and end date.
The total amount of the recurring invoice. Calculated based on the sum of all invoice line items across all occurrences.
{ "id": "1", "recurringInvoiceNo": "SCH-42", "nextIssueDate": "2025-10-15T00:00:00Z", "status": "ACTIVE", "cadence": { "timeUnit": "WEEKS", "frequency": 2, "startDate": "2025-01-01T00:00:00Z", "endDate": "2025-12-31T23:59:59Z" }, "invoiceDetails": { "customer": { … }, "paymentTerm": { … }, "distribution": { … }, "description": "Monthly subscription for January", "currencyCode": "GBP", "itemsTaxType": "INCLUSIVE", "items": [ … ] }, "creationTime": "2025-09-27T12:00:00Z", "lastUpdatedTime": "2025-10-01T08:30:00Z", "totalInvoices": 10, "amount": 1234.5, "nextInvoices": [ { … } ] }