Using payment requests

Collect your first payment with Adfin Core API

Resources at a glance

FieldDescription
idImmutable ID of the payment request
paymentRequestNoHuman-readable number
totalAmount / currencycodeDeclare the total amount and currency (GBP only supported)
statusSee the guide below on all payment request statuses.
workflowTypeOn demand (card) or Auto Collect
DistributionHow the payment link is used or completed
associationTypeHow are they related to invoices or payment requests
paymentLink.urlA hosted page where the payment can be completed
redirectURIWhere to send the user after the user has completed the payment

Create a draft payment request

Endpoint: POST /payment_requests

Example request for creating a payment, for full details see the API docs: docs.adfin.com. Payment requests must be created against a customer, so you must have completed the create customer step.

{
  "customer": {
    "id": "123"
  },
  "currencyCode": "GBP",
  "distribution": {
    "collectionMethod": "ONE_TIME_PAYMENT",
    "customMessage": "Payment for ACME services",
    "templateId": "123"
  },
  "description": "Payment for ACME service",
  "totalAmount": 100,
    "payByDate": "2025-03-25T11:36:55.243Z"
}

This will return the following important information (sample)

  • ID of the payment request
  • payment link to use with the user
{
    "id": "36c7b2d4-a8f5-43e2-84b1-e9774f187f23",
    "paymentRequestNo": "PR-98",
		"paymentLink": {
        "url": "https://app.staging.adfin.com/pay/o5J7Id8DSNm4E4EsSJ"
    },

Optional: Activate the payment request

Endpoint: PUT payment_requests/[id]:activate

Used to activate the payment request. This will trigger any workflows associated with this, including distribution (via email, WhatsApp, etc).

This will activate the workflow defined in the distribution.templateId


Share or embed the link

  • Redirect the payer from your UI.
  • Paste into email, chat, or a PDF.

Payment Request Lifecycle

  • DRAFT: The payment request does not contain contact details for the payer, or it has not yet been distributed.
  • REQUESTED: The payment request has not yet been paid.
  • SCHEDULED: The payment request is scheduled to collect the payment via Direct Debit.
  • SUBMITTED: The remaining due amount on the payment request is covered by submitted (but not yet confirmed) Direct debit payments.
  • PAID: The payment request is captured.
  • CANCELLED: The payment request is cancelled.
  • SETTLED: The payment request is paid out.


Best practices

  1. Always set a redirectUrl so the payer lands back in your platform after completing the payment.
  2. Display amount & description before redirecting—conversion rates improve when payers know the cost.
  3. Monitor lastSeenTime and trigger follow-up emails after 48 hours of inactivity.
  4. Subscribe to payment_request. Paid to mark invoices paid and release goods or services instantly.

What’s Next

Optional: Setup webhooks to track the payment status