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 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.

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

oAuth2

Operations

Biller

Operations

Verifications

Operations

Customers

Operations

Direct debit mandates

Operations

Invoices

Operations

Recurring invoices

Operations

Payment requests

Operations

Get a payment request

Request

Security
Biller Access Token (Staging) or Biller Access Token (Production)
Path
idstringrequired

The ID of the payment request

curl -i -X GET \
  'https://developer.adfin.com/_mock/api-docs/prod/payment_requests/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

The payment request is successfully retrieved

Bodyapplication/json
idstring

The internal id of the payment request

paymentRequestNostring

The payment request number

referencestring

The payment request reference

descriptionstring

Short description of the payment request

totalAmountnumber

The payment request amount

principalAmountnumber

The principal amount of the payment request, excluding fees

paidAmountnumber

The total amount that is paid

dueAmountnumber

The amount that is due

feesArray of objects(FeeResponse)

The outstanding fees on this payment request

currencyCodestring

The currency in which the payment request is raised

Enum"AED""AFN""ALL""AMD""ANG""AOA""ARS""AUD""AWG""AZN"
taxRatenumber

Tax rate percentage

payByDatestring(date-time)

The (optional) date until when user recommended the payer to pay

creationTimestring(date-time)

The date the payment request was created

distributionTimestring(date-time)

The time when the payment request was distributed to the customer

lastNotificationSentTimestring(date-time)

The date the payment request was last sent to the customer

lastUpdatedTimestring(date-time)

The date the payment request was last updated

paidTimestring(date-time)

The date the payment request paid

paymentInitiationDatestring(date-time)

The date when payment is initiated for this payment request (only for Direct Debit)

chargeDatestring(date-time)

The date on which the customer will have their account debited

payoutDatestring(date-time)

The date on which the biller will get paid out for the payment

statusstring

The payment request status

Enum"DRAFT""UNPAID""OVERDUE""SCHEDULED""SUBMITTED""PAID""VOID""SETTLED"
statusReasonCodestring

The reason as predefined code why the payment request is in a certain status

Enum"MISSING_PAYER_CONTACT_DETAILS""PENDING_ACTIVATION""PENDING_DD_MANDATE""PENDING_DD_CAPABILITY""MARKED_AS_PAID""WORKFLOW_COMPLETED""NOTIFICATION_DELIVERY_FAILED""BULK_PRUNE""STALE_DRAFT_CLEANUP""OTHER"
statusReasonstring

Custom details on why the payment request is in a certain status

paymentRequestSourcestring

The source of the payment request

Enum"MANUAL""SCHEDULE""INVOICE""EXTERNAL""OVERPAYMENT""GENERIC_PAYMENT_LINK""PAYMENT_ALLOCATION""PAYMENT_OVER_PHONE"
paymentsArray of objects(PaymentAllocationResponse)

The payments made as part of this payment request

discountsArray of objects(DiscountDetails)

The discounts applied to this payment request

paymentLinkobject(PaymentLinkDetails)
redirectUrlstring

The (optional) redirect URL to redirect the user after they complete the payment

invoicesArray of objects(InvoiceDetails)

The invoices associated to this payment request

customerobject(CustomerResponse)
distributionobject(DistributionDetails)
associationTypestring

The payment request association type

Enum"SINGLE""ONE_TO_ONE""PARTIAL""BATCH"
creditControlStatusstring

The credit control status of the payment request

Enum"AT_RISK""EXPECTED""CONFIRMED"
workflowTypestring

The workflow type of the payment request

Enum"AUTO_COLLECT""ON_DEMAND""NONE"
scheduleDetailsobject(ScheduleDetails)
instalmentDetailsobject(InstalmentDetails)
customFieldsArray of objects(CustomField)

The list of custom fields that are applied to the payment request

tagsArray of strings

The list of tag ids that are applied to the payment request

createdBystring

The creator of the payment request

applicableFeesArray of objects(FeeResponse)

Fees that would apply to this payment request if it isn't paid by the grace period (e.g. projected late fees). Populated only when no fees have been applied yet.

invoiceInputobject(InvoiceInputResponse)
Response
application/json
{ "id": "string", "paymentRequestNo": "string", "reference": "string", "description": "string", "totalAmount": 0, "principalAmount": 0, "paidAmount": 0, "dueAmount": 0, "fees": [ { … } ], "currencyCode": "AED", "taxRate": 0, "payByDate": "2019-08-24T14:15:22Z", "creationTime": "2019-08-24T14:15:22Z", "distributionTime": "2019-08-24T14:15:22Z", "lastNotificationSentTime": "2019-08-24T14:15:22Z", "lastUpdatedTime": "2019-08-24T14:15:22Z", "paidTime": "2019-08-24T14:15:22Z", "paymentInitiationDate": "2019-08-24T14:15:22Z", "chargeDate": "2019-08-24T14:15:22Z", "payoutDate": "2019-08-24T14:15:22Z", "status": "DRAFT", "statusReasonCode": "MISSING_PAYER_CONTACT_DETAILS", "statusReason": "string", "paymentRequestSource": "MANUAL", "payments": [ { … } ], "discounts": [ { … } ], "paymentLink": { "url": "string", "lastSeenTime": "2019-08-24T14:15:22Z" }, "redirectUrl": "string", "invoices": [ { … } ], "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" }, "distribution": { "collectionMethod": "ONE_TIME_PAYMENT", "customMessage": "string", "templateId": "string" }, "associationType": "SINGLE", "creditControlStatus": "AT_RISK", "workflowType": "AUTO_COLLECT", "scheduleDetails": { "scheduleId": "string", "scheduleNo": "string", "type": "RECURRING" }, "instalmentDetails": { "index": 0, "cadence": { … } }, "customFields": [ { … } ], "tags": [ "string" ], "createdBy": "string", "applicableFees": [ { … } ], "invoiceInput": { "issueInvoice": true, "itemsTaxType": "EXCLUSIVE", "items": [ … ] } }

Update a payment request

Request

Security
Biller Access Token (Staging) or Biller Access Token (Production)
Path
idstringrequired

The ID of the payment request

Bodyapplication/jsonrequired
paymentRequestNostring

The payment request number.

Example: "PR-1234"
descriptionstring[ 0 .. 200 ] characters

A short description or summary of the payment request.

Example: "Monthly subscription fee for January"
payByDatestring(date-time)

The pay by date for the payment request.

Example: "2025-12-15T23:59:59Z"
amountnumber>= 0.01

The payment request amount. Omit it when line items are supplied, as the total is calculated from them.

Example: 99.99
referencestring[ 0 .. 22 ] characters^[a-zA-Z0-9 .]*$

reference for the payment request

Example: "REF 123456"
taxRatenumber[ 0 .. 100 ]

tax rate percentage applied on the payment request amount.

Example: 20
redirectUrlstring

The (optional) redirect URL to redirect the user after they complete the payment

curl -i -X PUT \
  'https://developer.adfin.com/_mock/api-docs/prod/payment_requests/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "paymentRequestNo": "PR-1234",
    "description": "Monthly subscription fee for January",
    "payByDate": "2025-12-15T23:59:59Z",
    "amount": 99.99,
    "reference": "REF 123456",
    "taxRate": 20,
    "redirectUrl": "string"
  }'

Responses

The request has succeeded and has resulted in one payment request being updated

Bodyapplication/json
idstring

The internal id of the payment request

paymentRequestNostring

The payment request number

referencestring

The payment request reference

descriptionstring

Short description of the payment request

totalAmountnumber

The payment request amount

principalAmountnumber

The principal amount of the payment request, excluding fees

paidAmountnumber

The total amount that is paid

dueAmountnumber

The amount that is due

feesArray of objects(FeeResponse)

The outstanding fees on this payment request

currencyCodestring

The currency in which the payment request is raised

Enum"AED""AFN""ALL""AMD""ANG""AOA""ARS""AUD""AWG""AZN"
taxRatenumber

Tax rate percentage

payByDatestring(date-time)

The (optional) date until when user recommended the payer to pay

creationTimestring(date-time)

The date the payment request was created

distributionTimestring(date-time)

The time when the payment request was distributed to the customer

lastNotificationSentTimestring(date-time)

The date the payment request was last sent to the customer

lastUpdatedTimestring(date-time)

The date the payment request was last updated

paidTimestring(date-time)

The date the payment request paid

paymentInitiationDatestring(date-time)

The date when payment is initiated for this payment request (only for Direct Debit)

chargeDatestring(date-time)

The date on which the customer will have their account debited

payoutDatestring(date-time)

The date on which the biller will get paid out for the payment

statusstring

The payment request status

Enum"DRAFT""UNPAID""OVERDUE""SCHEDULED""SUBMITTED""PAID""VOID""SETTLED"
statusReasonCodestring

The reason as predefined code why the payment request is in a certain status

Enum"MISSING_PAYER_CONTACT_DETAILS""PENDING_ACTIVATION""PENDING_DD_MANDATE""PENDING_DD_CAPABILITY""MARKED_AS_PAID""WORKFLOW_COMPLETED""NOTIFICATION_DELIVERY_FAILED""BULK_PRUNE""STALE_DRAFT_CLEANUP""OTHER"
statusReasonstring

Custom details on why the payment request is in a certain status

paymentRequestSourcestring

The source of the payment request

Enum"MANUAL""SCHEDULE""INVOICE""EXTERNAL""OVERPAYMENT""GENERIC_PAYMENT_LINK""PAYMENT_ALLOCATION""PAYMENT_OVER_PHONE"
paymentsArray of objects(PaymentAllocationResponse)

The payments made as part of this payment request

discountsArray of objects(DiscountDetails)

The discounts applied to this payment request

paymentLinkobject(PaymentLinkDetails)
redirectUrlstring

The (optional) redirect URL to redirect the user after they complete the payment

invoicesArray of objects(InvoiceDetails)

The invoices associated to this payment request

customerobject(CustomerResponse)
distributionobject(DistributionDetails)
associationTypestring

The payment request association type

Enum"SINGLE""ONE_TO_ONE""PARTIAL""BATCH"
creditControlStatusstring

The credit control status of the payment request

Enum"AT_RISK""EXPECTED""CONFIRMED"
workflowTypestring

The workflow type of the payment request

Enum"AUTO_COLLECT""ON_DEMAND""NONE"
scheduleDetailsobject(ScheduleDetails)
instalmentDetailsobject(InstalmentDetails)
customFieldsArray of objects(CustomField)

The list of custom fields that are applied to the payment request

tagsArray of strings

The list of tag ids that are applied to the payment request

createdBystring

The creator of the payment request

applicableFeesArray of objects(FeeResponse)

Fees that would apply to this payment request if it isn't paid by the grace period (e.g. projected late fees). Populated only when no fees have been applied yet.

invoiceInputobject(InvoiceInputResponse)
Response
application/json
{ "id": "string", "paymentRequestNo": "string", "reference": "string", "description": "string", "totalAmount": 0, "principalAmount": 0, "paidAmount": 0, "dueAmount": 0, "fees": [ { … } ], "currencyCode": "AED", "taxRate": 0, "payByDate": "2019-08-24T14:15:22Z", "creationTime": "2019-08-24T14:15:22Z", "distributionTime": "2019-08-24T14:15:22Z", "lastNotificationSentTime": "2019-08-24T14:15:22Z", "lastUpdatedTime": "2019-08-24T14:15:22Z", "paidTime": "2019-08-24T14:15:22Z", "paymentInitiationDate": "2019-08-24T14:15:22Z", "chargeDate": "2019-08-24T14:15:22Z", "payoutDate": "2019-08-24T14:15:22Z", "status": "DRAFT", "statusReasonCode": "MISSING_PAYER_CONTACT_DETAILS", "statusReason": "string", "paymentRequestSource": "MANUAL", "payments": [ { … } ], "discounts": [ { … } ], "paymentLink": { "url": "string", "lastSeenTime": "2019-08-24T14:15:22Z" }, "redirectUrl": "string", "invoices": [ { … } ], "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" }, "distribution": { "collectionMethod": "ONE_TIME_PAYMENT", "customMessage": "string", "templateId": "string" }, "associationType": "SINGLE", "creditControlStatus": "AT_RISK", "workflowType": "AUTO_COLLECT", "scheduleDetails": { "scheduleId": "string", "scheduleNo": "string", "type": "RECURRING" }, "instalmentDetails": { "index": 0, "cadence": { … } }, "customFields": [ { … } ], "tags": [ "string" ], "createdBy": "string", "applicableFees": [ { … } ], "invoiceInput": { "issueInvoice": true, "itemsTaxType": "EXCLUSIVE", "items": [ … ] } }

Void a payment request

Request

Security
Biller Access Token (Staging) or Biller Access Token (Production)
Path
idstringrequired

The ID of the payment request

curl -i -X PUT \
  'https://developer.adfin.com/_mock/api-docs/prod/payment_requests/{id}:void' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

The payment request has been voided

Recurring payment requests

Operations

Payments

Operations

Payouts

Operations

Tax rates

Operations

Items

Operations

Activities

What has happened to a customer, invoice, payment request or schedule.

Operations

Scheduled Activities

What is planned next for a customer or a payment request.

Operations

Webhooks

Operations

Referrals

Operations