Anchor | ||||
---|---|---|---|---|
|
Direct Debits
POST /pay/v1/directdebits
Headers
Content-Typestring
Content type.
Authorizationstring
Access token generated from create token request.
Attributes
payment_intentstring
Payment intent token.
given_namestring
User’s given name or first name.
family_namestring
User’s family name or Surname.
company_namestring (optional)
User’s company name. It’s required only if user’s given name and family name are not present.
emailstring
User’s email address.
customer_addressstring (optional)
User’s address details.
customer_postcodestring (optional)
User’s postcode.
account_holder_namestring
User’s bank account name.
branch_codestring
User’s bank short code.
account_numberinteger
User’s bank account number.
merchant_data json (optional)
The merchant can add custom key value pairs in JSON format, for example:
Code Block |
---|
{ "my_order_id": 123, "fancy_note": "Order complete", "card_discount": false } |
Request
Code Block |
---|
POST https://secure.blinkpayment.co.uk/api/pay/v1/directdebits HTTP/1.1 Content-Type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG... { "payment_intent": "pi_Swhc84aSLtUGppvPARX...", "given_name": "test", "family_name": "test", "email": "random@gmail...", "customer_address": "12/B.....", "customer_postcode": "12....", "account_holder_name": "test.....", "branch_code": 20...., "account_number": "579....", "merchant_data": "{\"my_order_id\": \"dd-12345678\"}", } |
Response
Code Block |
---|
HTTP/1.1 200 OK Content-Type: application/json { "url": "https://api-demo-php.blinkpayment.co.uk/return?res=QkwtTVlVRTV...%3D%3DBL-45SACNBTG" } |