## Resources at a glance | Field | Description | | --- | --- | | id | Immutable ID of the payment request | | paymentRequestNo | Human-readable number | | totalAmount / currencycode | Declare the total amount and currency (GBP only supported) | | status | See the guide below on all payment request statuses. | | workflowType | On demand (card) or Auto Collect | | Distribution | How the payment link is used or completed | | associationType | How are they related to invoices or payment requests | | paymentLink.url | A hosted page where the payment can be completed | | redirectURI | Where to send the user after the user has completed the payment | hr # Payment Request Lifecycle Payments requests follow a lifecycle that is represented in the payment.status field of the object. ## On Demand Lifecycle ## Auto Collect Lifecycle Payments that are activated as AUTO_COLLECT follow a linear state path. Auto collect is a abstraction that uses mandate payment methods to pull the payment from the customers account. In the UK this is direct debit. hr # How to send a payment request ## Create a draft payment request Endpoint: `POST /payment_requests` It will return the following important information (sample) * ID of the payment request * payment link to use with the user ```json Request sample { ... "customer": { "id": "f492b38c-0de1-4278-9bad-de5fb74961ca " }, "currencyCode": "GBP", "distribution": { //Distribution can be specified directly in payment requests or the next step "collectionMethod": "ONE_TIME_PAYMENT", "customMessage": "Payment for ACME services", "templateId": "f2363d28-018a-40de-915d-c0f209b14159 " }, "description": "Payment for ACME service", "totalAmount": 100, "payByDate": "2025-03-25T11:36:55.243Z" ... } ``` ```json Response { "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. ## 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.