Anchor | ||||
---|---|---|---|---|
|
Create intent
POST /pay/v1/intents
Headers
Content-Typestring
Content type.
Authorizationstring
Access token generated from create token request.
Attributes
amountfloat
Transaction amount.
payment_type string
Can only be one of the following:
credit-card
direct-debit
open-bankingÂ
currency string
Three letter currency code (ISO 4217) e.g USD, GBP.
reutrn_url string
GET URL on your domain, where Blink will redirect after transaction is processed e.g. https://mydomain.com/return
.
notification_url string
POST URL on your domain, where Blink will send status updates when the transaction status is changed e.g. https://mydomain.com/notification
.
customer_name string (optional)
Customer name.
customer_email string (optional)
Customer email.
customer_address string (optional)
Customer address.
customer_postcode string (optional)
Customer postcode.
Request
Code Block |
---|
POST https://secure.blinkpayment.co.uk/api/pay/v1/intents HTTP/1.1 Content-Type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG... { "amount": 1.01, "payment_type": "credit-card", "currency": "GBP", "return_url": "https://mydomain.com/return", "notification_url": "https://mydomain.com/notification" } |
Response
Code Block |
---|
HTTP/1.1 200 OK Content-Type: application/json { "id": 123, "payment_intent": "pi_Swhc84aSLtUGppvPARX...", "amount": 1.01, "currency": "GBP", "payment_type": "credit-card", "return_url": "https://mydomain.com/return", "notification_url": "https://mydomain.com/notification", "element": { "ccElement": "<input type=\"hidden\" name=\"merchantID\" value=\"14084114456\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4LyOVVz-nzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNbpqXuNE8rO************************1I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"resource\" value=\"creditcards\"/>\n <input type=\"hidden\" name=\"transaction_unique\" value=\"OiXWrlnKvvfh\"/>\n <input type=\"text\" name=\"customer_name\" value=\"\" placeholder=\"Name on card\" /><br>\n <input type=\"text\" name=\"customer_email\" value=\"\" placeholder=\"Email\"/><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\" value=\"\" /><br><input type=\"hostedfield:cardNumber\" placeholder=\"1234 1234 1234 1234\"/><br>\n <input type=\"hostedfield:cardExpiryDate\" placeholder=\"MM/YY\"/><br>\n <input type=\"hostedfield:cardCVV\" placeholder=\"CVV\"/><br>\n <input type=\"hidden\" id=\"device_timezone\" name=\"device_timezone\" /><br>\n <input type=\"hidden\" id=\"device_capabilities\" name=\"device_capabilities\" /><br>\n <input type=\"hidden\" id=\"device_accept_language\" name=\"device_accept_language\" /><br>\n <input type=\"hidden\" id=\"device_screen_resolution\" name=\"device_screen_resolution\" /><br>\n <input type=\"hidden\" id=\"remote_address\" name=\"remote_address\" /><br>\n input type=\"hidden\" id=\"type\" name=\"type\" value=\"1\"/><br>", "ccMotoElement": "<input type=\"hidden\" name=\"merchantID\" value=\"140841145671\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4LyOVVz-nzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3anz*************************QyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"resource\" value=\"creditcards\"/>\n <input type=\"hidden\" name=\"transaction_unique\" value=\"OiXWrlnKvvfh\"/>\n <input type=\"text\" name=\"customer_name\" value=\"\" placeholder=\"Name on card\" /><br>\n <input type=\"text\" name=\"customer_email\" value=\"\" placeholder=\"Email\"/><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\" value=\"\" /><br><input type=\"hostedfield:cardNumber\" placeholder=\"1234 1234 1234 1234\"/><br>\n <input type=\"hostedfield:cardExpiryDate\" placeholder=\"MM/YY\"/><br>\n <input type=\"hostedfield:cardCVV\" placeholder=\"CVV\"/><br>\n <input type=\"hidden\" id=\"type\" name=\"type\" value=\"2\"/><br>", "ddElement": "<input type=\"hidden\" name=\"payment_intent\" value=\"pi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4LyOVVz-nzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNbnzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffU*******************uxXgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"transaction_unique\" value=\"OiXWrlnKvvfh\"/>\n <input type=\"hidden\" name=\"resource\" value=\"directdebits\"/>\n <input type=\"text\" placeholder=\"Given Name\" name=\"given_name\"/><br>\n <input type=\"text\" placeholder=\"Family Name\" name=\"family_name\"/><br>\n <input type=\"text\" placeholder=\"Company Name\" name=\"company_name\"/><br>\n <input type=\"text\" placeholder=\"Email\" name=\"email\"/><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\" value=\"\" /><br><input type=\"text\" placeholder=\"Account Holder Name\" name=\"account_holder_name\"/><br>\n <input type=\"text\" placeholder=\"Branch Code\" name=\"branch_code\"/><br>\n <input type=\"text\" placeholder=\"Bank Account Number\" name=\"account_number\"/><br>", "obElement": "<input type=\"hidden\" name=\"merchant_id\" value=\"140841140567\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4LyOVVz-nzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMkpqXuNE8rOEmUN0vtQq*************************d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"resource\" value=\"openbankings\"/>\n <input type=\"hidden\" name=\"transaction_unique\" value=\"OiXWrlnKvvfh\"/>\n <input type=\"text\" name=\"user_name\" value=\"\" placeholder=\"Name on card\" /><br>\n <input type=\"text\" name=\"user_email\" value=\"\" placeholder=\"Email\"/><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\" value=\"\" /><br>" }, "merchant_id": 134857, "transaction_unique": "xbKXyWkIL..." } |
Anchor | ||||
---|---|---|---|---|
|
Get intents
GET /pay/v1/pay/intents/{id}
Headers
Content-Typestring
Content type.
Authorizationstring
Access token generated from create token request.
Request
Code Block |
---|
GET https://secure.blinkpayment.co.uk/api/pay/v1/intents/123 HTTP/1.1 Content-Type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG... |
Response
Code Block |
---|
HTTP/1.1 200 OK Content-Type: application/json { "id": 123, "payment_intent": "pi_Swhc84aSLtUGppvPARX...", "amount": 1.01, "currency": "GBP", "payment_type": "credit-card", "return_url": "https://mydomain.com/return", "notification_url": "https://mydomain.com/notification", "element": { "ccElement": "<input type=\"hidden\" name=\"merchantID\" value=\"123456140****\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_Swhc84aSLtUGppvPARX...pqXuNE8rOEmUN0vtQqgf*******************8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>\n <input type=\"texthidden\" name=\"customer_nameresource\" value=\"creditcards\" placeholder/>\n <input type=\"Name on card\" /></br>hidden\" name=\"transaction_unique\" value=\"OiXWrlnKvvfh\"/>\n <input type=\"text\" name=\"customer_name\" value=\"\" placeholder=\"Name on card\" /><br>\n <input type=\"text\" name=\"customer_email\" value=\"\" placeholder=\"Email\"/></br><input><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\" value=\"\" /><br><input type=\"hostedfield:cardNumber\" placeholder=\"1234 1234 1234 1234\"/><br>\n <input <input type=\"hostedfield:cardExpiryDate\" placeholder=\"MM/YY\"/><br>\n <input type=\"hostedfield:cardCVV\" placeholder=\"CVV\"/>", "ddElement": "><br>\n <input type=\"hidden\" nameid=\"paymentdevice_intenttimezone\" valuename=\"pi_Swhc84aSLtUGppvPARX...device_timezone\" />><br>\n <input type=\"hidden\" nameid=\"uniquedevice_transactioncapabilities\" valuename=\"xbKXyWkILDdadevice_capabilities\" />><br>\n <input type<input type=\"texthidden\" placeholderid=\"Given Namedevice_accept_language\" name=\"givendevice_accept_namelanguage\" /><br>\n <input type=\"texthidden\" placeholderid=\"Family Namedevice_screen_resolution\" name=\"familydevice_screen_nameresolution\" /><br>\n <input type=\"texthidden\" placeholderid=\"Company Nameremote_address\" name=\"companyremote_nameaddress\" /><br>\n <inputinput type=\"texthidden\" placeholderid=\"Emailtype\" name=\"emailtype\" value=\"1\"/><br><input><br>", "ccMotoElement": "<input type=\"texthidden\" placeholdername=\"AddressmerchantID\" namevalue=\"customer_address146***\"/><br>>\n <input type=\"text\" placeholder=hidden\"Postcode\" name=\"customerpayment_postcodeintent\"/><br><input typevalue=\"text\" placeholder=\"Account Holder Name\" name=\"account_holder_name\"/><brpi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4LyO*********************1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"resource\" value=\"creditcards\"/>\n <input type=\"texthidden\" placeholdername=\"Branch Codetransaction_unique\" namevalue=\"branch_codeOiXWrlnKvvfh\"/><br/>\n <input type=\"text\" placeholdername=\"Bank Account Numbercustomer_name\" namevalue=\"account_number\"/>", placeholder=\"Name on card\" /><br>\n "obElement": "<input type=\"hiddentext\" name=\"merchantcustomer_idemail\" value=\"\"123456 placeholder=\"Email\"/>\n <input type><br><input type=\"text\" placeholder=\"hiddenAddress\" name=\"paymentcustomer_intentaddress\" value=\"pi_Swhc84aSLtUGppvPARX...\" />><br>\n <input type=\"text\" nameplaceholder=\"user_namePostcode\" name=\"customer_postcode\" value=\"\" /><br><input type=\"hostedfield:cardNumber\" placeholder=\"Name1234 1234 on1234 card1234\" /></br>><br>\n <input type=\"texthostedfield:cardExpiryDate\" nameplaceholder=\"user_emailMM/YY\" value/><br>\n <input type=\"hostedfield:cardCVV\" placeholder=\"EmailCVV\"/><input><br>\n <input type=\"texthidden\" placeholderid=\"Addresstype\" name=\"customer_addresstype\"/><br>\n value=\"2\"/><br>", "ddElement": "<input type=\"texthidden\" placeholdername=\"Postcodepayment_intent\" namevalue=\"customer_postcode\"/><br>" }, "merchant_id": 134857, "transaction_unique": "xbKXyWkIL..." } |
PATCH /pay/v1/intents/{id}
Headers
Content-TypestringContent type.Authorizationstring
Access token generated from create token request.
Attributes
return_urlstring (optional)Return url.notification_urlstring (optional)
Notification url.
Request
Code Block |
---|
PATCH https://secure.blinkpayment.co.uk/api/pay/v1/intents/{id} HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG...
{
"return_url": "https://mydomain.com/return"
} |
Response
Code Block |
---|
HTTP/1.1 200 OK Content-Type: application/json { "id": 123, "payment_intent": "pi_Swhc84aSLtUGppvPARX...", "amount": 1.01, "currency": "GBP", "payment_type": "credit-card", "return_url": "https://mydomain.com/return", "notification_url": "https://mydomain.com/notification", "element": { "ccElement": "pi_pqXu******************************************XgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"transaction_unique\" value=\"OiXWrlnKvvfh\"/>\n <input type=\"hidden\" name=\"resource\" value=\"directdebits\"/>\n <input type=\"text\" placeholder=\"Given Name\" name=\"given_name\"/><br>\n <input type=\"text\" placeholder=\"Family Name\" name=\"family_name\"/><br>\n <input type=\"text\" placeholder=\"Company Name\" name=\"company_name\"/><br>\n <input type=\"text\" placeholder=\"Email\" name=\"email\"/><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\" value=\"\" /><br><input type=\"text\" placeholder=\"Account Holder Name\" name=\"account_holder_name\"/><br>\n <input type=\"text\" placeholder=\"Branch Code\" name=\"branch_code\"/><br>\n <input type=\"text\" placeholder=\"Bank Account Number\" name=\"account_number\"/><br>", "obElement": "<input type=\"hidden\" name=\"merchant_id\" value=\"14*****\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4Ly**********************SDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"resource\" value=\"openbankings\"/>\n <input type=\"hidden\" name=\"transaction_unique\" value=\"OiXWrlnKvvfh\"/>\n <input type=\"text\" name=\"user_name\" value=\"\" placeholder=\"Name on card\" /><br>\n <input type=\"text\" name=\"user_email\" value=\"\" placeholder=\"Email\"/><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\" value=\"\" /><br>" }, "merchant_id": 134857, "transaction_unique": "xbKXyWkIL..." } |
Anchor | ||||
---|---|---|---|---|
|
Update intents
PATCH /pay/v1/intents/{id}
Headers
Content-Typestring
Content type.
Authorizationstring
Access token generated from create token request.
Attributes
return_urlstring (optional)
Return url.
notification_urlstring (optional)
Notification url.
Request
Code Block |
---|
PATCH https://secure.blinkpayment.co.uk/api/pay/v1/intents/{id} HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG...
{
"return_url": "https://mydomain.com/return"
} |
Response
Code Block |
---|
HTTP/1.1 200 OK Content-Type: application/json { "id": 123, "payment_intent": "pi_Swhc84aSLtUGppvPARX...", "amount": 1.01, "currency": "GBP", "payment_type": "credit-card", "return_url": "https://mydomain.com/return", "notification_url": "https://mydomain.com/notification", "element": { "ccElement": "<input type=\"hidden\" name=\"merchantID\" value=\"1235\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4LyOVVz-nzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"resource\" value=\"creditcards\"/>\n <input type=\"hidden\" name=\"transaction_unique\" value=\"OiXWrlnKvvfh\"/>\n <input type=\"text\" name=\"customer_name\" value=\"\" placeholder=\"Name on card\" /><br>\n <input type=\"text\" name=\"customer_email\" value=\"\" placeholder=\"Email\"/><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\" value=\"\" /><br><input type=\"hostedfield:cardNumber\" placeholder=\"1234 1234 1234 1234\"/><br>\n <input type=\"hostedfield:cardExpiryDate\" placeholder=\"MM/YY\"/><br>\n <input type=\"hostedfield:cardCVV\" placeholder=\"CVV\"/><br>\n <input type=\"hidden\" id=\"device_timezone\" name=\"device_timezone\" /><br>\n <input type=\"hidden\" id=\"device_capabilities\" name=\"device_capabilities\" /><br>\n <input type=\"hidden\" id=\"device_accept_language\" name=\"device_accept_language\" /><br>\n <input type=\"hidden\" id=\"device_screen_resolution\" name=\"device_screen_resolution\" /><br>\n <input type=\"hidden\" id=\"remote_address\" name=\"remote_address\" /><br>\n input type=\"hidden\" id=\"type\" name=\"type\" value=\"1\"/><br>", "ccMotoElement": "<input type=\"hidden\" name=\"merchantID\" value=\"1235\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4LyOVVz-nzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"merchantIDresource\" value=\"123456creditcards\"/>\n <input type=\"hidden\" name=\"paymenttransaction_intentunique\" value=\"pi_Swhc84aSLtUGppvPARX...OiXWrlnKvvfh\"/>\n <input type=\"text\" name=\"customer_name\" value=\"\" placeholder=\"Name on card\" /></br>\n /><br>\n <input type=\"text\" name=\"customer_email\" value=\"\" placeholder=\"Email\"/></br><input><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\" value=\"\" /><br><input type=\"hostedfield:cardNumber\" placeholder=\"1234 1234 1234 1234\"/><br>\n <input type=\"hostedfield:cardExpiryDate\" placeholder=\"MM/YY\"/><br>\n <input type=\"hostedfield:cardCVV\" placeholder=\"CVV\"/><br>\n <input type=\"hidden\" id=\"type\"CVV name=\"type\" value=\"2\"/>><br>", "ddElement": "<input type=\"hidden\" name=\"payment_intent\" value=\"pi_Swhc84aSLtUGppvPARX...pqX************************z-nzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"transaction_unique\" value=\"OiXWrlnKvvfh\"/>\n <input type=\"hidden\" name=\"resource\" value=\"directdebits\"/>\n <input type=\"hiddentext\" nameplaceholder=\"unique_transactionGiven Name\" valuename=\"xbKXyWkILDdagiven_name\"/>><br>\n <input type=\"text\" placeholder=\"GivenFamily Name\" name=\"givenfamily_name\"/><br>\n <input type=\"text\" placeholder=\"FamilyCompany Name\" name=\"familycompany_name\"/><br>\n <input type=\"text\" placeholder=\"Company Name\"Email\" name=\"email\"/><br><input type=\"text\" placeholder=\"Address\" name=\"company_namecustomer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"EmailPostcode\" name=\"customer_postcode\"email value=\"\" /><br><input type=\"text\" placeholder=\"AddressAccount Holder Name\" name=\"customeraccount_holder_addressname\"/><br>\n <input type=\"text\" placeholder=\"PostcodeBranch Code\" name=\"customerbranch_postcodecode\"/><br><input><br>\n <input type=\"text\" placeholder=\"Bank Account Holder NameNumber\" name=\"account_holder_namenumber\"/><br/>\n><br>", "obElement": "<input type=\"texthidden\" placeholdername=\"Branch Codemerchant_id\" namevalue=\"branch_code1235\"/><br/>\n <input type=\"texthidden\" placeholdername=\"Bank Account Numberpayment_intent\" namevalue=\"account_numberpi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4LyOVVz-nzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>", \n "obElement": "<input type=\"hidden\" name=\"merchant_idresource\" value=\"123456openbankings\"/>\n <input type=\"hidden\" name=\"paymenttransaction_intentunique\" value=\"pi_Swhc84aSLtUGppvPARX...OiXWrlnKvvfh\"/>\n <input type=\"text\" name=\"user_name\" value=\"\" placeholder=\"Name on card\" /></br>><br>\n <input type=\"text\" name=\"user_email\" value=\"\" placeholder=\"Email\"/><input><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\" value=\"\" /><br>" }, "merchant_id": 134857, "transaction_unique": "xbKXyWkIL..." } |