Sign direct debit (full page redirect)


Example request

Use the following structure with the following requirements:

  1. Pass in the customer's ID and the direct debit mandate path
  2. Pass in the redirectUrl (it must be https).
curl --location --request PUT 'https://api.staging.adfin.com/api/customers/{id}/directdebitmandates' \
--header 'Content-Type: application/json' \
--data '{
    "redirectUrl":"https://www.google.com/maps"
}'

Example response

  1. This response returns the following important information for this flow
    1. url - where you should redirect the customer to start the flow
    2. redirectUrl - where the customer will be sent after the flow is finished

{
    "id": "WiGr3EBGuORksFWPEj",
    "creationTime": "2024-11-05T04:50:32.132UTC",
    "status": "CREATED",
    "customer": {
        "id": "54e2ffc3-560e-413d-aadb-bfd8f8af4de6",
        "name": "Adfin financial services Ltd",
        "people": [
            {
                "firstName": "John",
                "lastName": "Doe",
                "email": "[email protected]",
                "phoneNo": "+447896926088"
            }
        ],
        "addresses": [
            {
                "city": "London",
                "postalCode": "1245",
                "country": "UK",
                "addressLine1": "Street"
            }
        ],
        "directDebitMandate": {
            "status": "CREATED"
        },
        "timezone": "Europe/London"
    },
    "redirectUrl":"https://www.google.com/maps",
    "url": "https://console.adfin.com/dd-mandate/WiGr3EBGuORksFWPEX",
    "sender": {
        "name": "JS CAD SERVICES LIMITED"
    },
    "bankAccountNumber": ""
}