Required if type is INTERVAL. Defines the time unit (e.g., DAYS, MONTHS, etc.).
- Import a credit note
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 when a platform authenticates as itself rather than as one of its billers. A platform uses one to manage its own webhook subscriptions under
/api/apps/{clientId}/webhooks.
The type of the cadence (INTERVAL, DAY_OF_MONTH, etc.)
Required if type is INTERVAL. Frequency of recurrence (e.g., every N time units).
Required if type is DAY_OF_MONTH. Specifies the day of the month the schedule applies.
Required if type is CUSTOM. A list of exact custom dates for the cadence.
- Mock serverhttps://developer.adfin.com/_mock/products/direct-integration/direct-integration-api-reference/invoices/{invoiceId}/instalments/preview
- Production API Server URLhttps://api.adfin.com/api/invoices/{invoiceId}/instalments/preview
- Staging API Server URLhttps://api.staging.adfin.com/api/invoices/{invoiceId}/instalments/preview
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://developer.adfin.com/_mock/products/direct-integration/direct-integration-api-reference/invoices/{invoiceId}/instalments/preview' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"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
},
"totalAmount": 0
}'The instalment preview was generated successfully.
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
The file source of 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": { … }, "collectionAgentId": "fe30a7f6-c47c-4051-9601-bd9dbc464447" }, "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 credit note number. A number can be used once per invoice. It can be used again after that credit note is cancelled.
The credit note amount. It lowers the amount due of the invoice and cannot be more than the amount due.
- Mock serverhttps://developer.adfin.com/_mock/products/direct-integration/direct-integration-api-reference/invoices/{invoiceId}/credit_notes
- Production API Server URLhttps://api.adfin.com/api/invoices/{invoiceId}/credit_notes
- Staging API Server URLhttps://api.staging.adfin.com/api/invoices/{invoiceId}/credit_notes
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://developer.adfin.com/_mock/products/direct-integration/direct-integration-api-reference/invoices/{invoiceId}/credit_notes' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"number": "CN-0042",
"amount": 25,
"valueDate": "2019-08-24T14:15:22Z"
}'{ "id": "string", "number": "string", "amount": 0, "valueDate": "2019-08-24T14:15:22Z", "externalData": [ { … } ] }
- Mock serverhttps://developer.adfin.com/_mock/products/direct-integration/direct-integration-api-reference/invoices/{invoiceId}/collection_preferences
- Production API Server URLhttps://api.adfin.com/api/invoices/{invoiceId}/collection_preferences
- Staging API Server URLhttps://api.staging.adfin.com/api/invoices/{invoiceId}/collection_preferences
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.adfin.com/_mock/products/direct-integration/direct-integration-api-reference/invoices/{invoiceId}/collection_preferences' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "collectionMethod": "AUTO_COLLECT", "preferences": { "paymentReminders": { … }, "paymentDistribution": { … }, "mandateReminders": { … }, "cardReminders": { … }, "directDebitEncouragement": { … }, "statements": { … }, "lateFees": { … }, "partialPayments": { … }, "surcharging": { … } } }