Direct debit subscriptions can be created through this endpoint. It supports only fixed schedule type. This subscription can be created using any existing direct debit transaction id or by providing customer details and bank details.
Resources
Anchor | ||||
---|---|---|---|---|
|
Create a direct debit repeat payment subscription. Here at first Token need to be created and then Intent need to generated.
POST /pay/v1/directdebits/repeat-payments
Headers
Content-Typestring
Content type.
Authorizationstring
Access token generated from create token request.
Attributes
payment_intentstring
Payment intent generated from create intent request. It’s a required attribute
given_namestring
Customer first name. It is required
family_namestring
Customer last name. It is required
emailstring
Customer email. It is required
account_holder_name string
Account holder name. If transaction id is not provided then this attribute is required to create any mandate.
branch_code string
Branch code. If transaction id is not provided then this attribute is required to create any mandate.
account_number string
Account number. If transaction id is not provided then this attribute is required to create any mandate.
reference string
Unique reference. It’s a required attribute.
frequency string
Subscription frequency. It can be either of the following values.
monthly
weekly
yearly
frequency_duration integer
Payment frequency duration. It is required.
(E.g. “2” and “monthly” will be every 2 month)
is_limited_installments boolean
When creating a schedule, it is required to mention if the schedule will have unlimited or limited instalments.
Possible values are
true
false
installments integer
Number of installments. It is required if is_limited_installments field is true (i.e. it has limited instalments).
currencystring
Currency that the payments will be processed in. If this value is not passed then it will take currency from the Intent.
recurring_amountdecimal
Recurring amount for each instalment. If this value is not passed then it will take amount from the Intent.
start_payment_datedate
Date on which the first payment will be captured. It is an optional field. if user chooses a date that is before mandate allows - within 5 days - It will be rejected.
transaction_idstring
Transaction id of any previous direct debit transaction done from blink API. If this value is passed then bank details are not needed to be passed to create any mandate.
merchant_data json
Additional merchant data. It’s an optional attribute.
Request
Code Block |
---|
POST https://secure.blinkpayment.co.uk/api/pay/v1/directdebits/repeat-payments HTTP/1.1 Content-Type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG... User-Agent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", Accept: "*/*" Accept-Encoding: "gzip, deflate, br" Accept-Charset: "" { "payment_intent": "pi************", "given_name": "Test", "family_name": "Dev", "email": "email@email.com", "account_holder_name": "Test", "branch_code": "200000", "account_number": "55779911", "merchant_data": "{\"order_id\": \"dd-12345678\"}", "reference": "unique123", "frequency": "monthly", "frequency_duration": 1, "installments": 3, "recurring_amount": 10, "is_limited_installments": true } |
Response
Code Block |
---|
HTTP/1.1 201 Created Content-Type: application/json { "id": 3, "payment_type": "direct-debit", "status": "active", "customer_name": "Luis Lynch", "customer_email": "Velva_Welch@gmail.com", "reference": "If we navigate the monitor, we can get to the GB sensor through the redundant FTP transmitter!", "currency": "GBP", "start_payment_date": "2025-01-23", "final_payment_date": "2025-03-25", "recurring_amount": 10, "is_limited_installments": true, "installments": 3, "is_active": true, "recurring_data": [ { "charge_date": "2025-01-23", "amount": 10 }, { "charge_date": "2025-02-24", "amount": 10 }, { "charge_date": "2025-03-24", "amount": 10 } ] } |