Skip to content

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.

Download OpenAPI description
Languages
Servers
Mock server
https://developer.adfin.com/_mock/bulk-upload/
Production API Server URL
https://api.adfin.com/api/
Staging API Server URL
https://api.staging.adfin.com/api/

Invoices

Recurring invoices

Payment requests

Operations

Bulk import payment requests

Request

Security
Biller Access Token (Production) or Biller Access Token (Staging)
Query
collectionMethodstringrequired

How the imported payment requests are expected to be collected. Currently, only NONE is supported.

Enum"AUTO_COLLECT""ON_DEMAND""NONE"
Example: collectionMethod=NONE
deleteMissingPaymentRequestsbooleanrequired

Whether missing payment requests created in previous imports should be deleted.

Example: deleteMissingPaymentRequests=false
Bodymultipart/form-datarequired
inputFilestring(binary)required

Input file to be processed during the bulk import.

curl -i -X POST \
  'https://developer.adfin.com/_mock/bulk-upload/payment_requests/bulk_import?collectionMethod=NONE&deleteMissingPaymentRequests=false' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F inputFile=string

Responses

The bulk import request has been accepted for processing.

Bodyapplication/json
jobIdstringrequired

The internal id of the bulk import job

typestringrequired

The type of the import job

Value"BULK_PAYMENT_REQUEST_IMPORT"
statusstringrequired

The status of the import job

Enum"PENDING""PROCESSING""COMPLETED""FAILED""DELETED"
creationTimestring(date-time)required

The creation time of the import job

countsByItemStatusArray of objects(ReviewSessionItemCountByStatus)required

The count of items for each review session item status

countsByItemStatus[].​statusstringrequired

The status of review session item

Enum"PENDING""PROCESSING""COMPLETED""FAILED"
countsByItemStatus[].​countinteger(int32)required

The count of items for this status

Response
application/json
{ "jobId": "550e8400-e29b-41d4-a716-446655440000", "type": "BULK_PAYMENT_REQUEST_IMPORT", "status": "PENDING", "creationTime": "2024-01-15T10:30:00Z", "countsByItemStatus": [] }

Retrieve bulk payment request import job details

Request

Security
Biller Access Token (Production) or Biller Access Token (Staging)
Path
jobIdstring(uuid)required

The ID of the bulk payment request import job

curl -i -X GET \
  'https://developer.adfin.com/_mock/bulk-upload/payment_requests/bulk_import/{jobId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

The bulk payment request import job details were successfully retrieved.

Bodyapplication/json
jobIdstringrequired

The internal id of the bulk import job

typestringrequired

The type of the import job

Value"BULK_PAYMENT_REQUEST_IMPORT"
statusstringrequired

The status of the import job

Enum"PENDING""PROCESSING""COMPLETED""FAILED""DELETED"
creationTimestring(date-time)required

The creation time of the import job

countsByItemStatusArray of objects(ReviewSessionItemCountByStatus)required

The count of items for each review session item status

countsByItemStatus[].​statusstringrequired

The status of review session item

Enum"PENDING""PROCESSING""COMPLETED""FAILED"
countsByItemStatus[].​countinteger(int32)required

The count of items for this status

Response
application/json
{ "jobId": "550e8400-e29b-41d4-a716-446655440000", "type": "BULK_PAYMENT_REQUEST_IMPORT", "status": "COMPLETED", "creationTime": "2024-01-15T10:30:00Z", "countsByItemStatus": [ {}, {} ] }

Retrieve bulk payment request import job items

Request

Security
Biller Access Token (Production) or Biller Access Token (Staging)
Path
jobIdstring(uuid)required

The ID of the bulk payment request import job

Query
statusesArray of strings

The status of the bulk payment request import job item

  • PENDING: The item is still to be processed.
  • PROCESSING: The item is currently processing.
  • COMPLETED: The item has been processed.
  • FAILED: The item has failed to be processed.
Items Enum"PENDING""PROCESSING""COMPLETED""FAILED"
pageinteger>= 0

Zero-based page index (0..N)

Default 0
sizeinteger>= 1

The size of the page to be returned

Default 20
sortArray of strings

Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Default ["creationTime,ASC"]
curl -i -X GET \
  'https://developer.adfin.com/_mock/bulk-upload/payment_requests/bulk_import/{jobId}/items?statuses=PENDING&page=0&size=20&sort=creationTime%2CASC' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Paginated response for the list of bulk payment request import job items

Bodyapplication/json
itemsArray of objects(BulkPaymentRequestImportItemResponse)

The bulk payment request import job items for the current page

paginationobject(Pagination)
Response
application/json
{ "items": [ {}, {} ], "pagination": { "page": 0, "size": 20, "totalElements": 155, "totalPages": 8 } }

Recurring payment requests

Payments

oAuth2

Biller

Customers

Direct debit mandates

Tax rates

Items

Workflows

Webhooks