POST /pay/v1/intents
Headers
Content-TypestringContent type.Authorizationstring
Access token generated from create token request.
Attributes
amountfloatTransaction 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
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Â
transaction_type string (optional)
Default value is set to SALE
. If passed, it can only be one of the following:
SALE
VERIFY
PREAUTHÂ
CREDIT
delay_capture_daysinteger (optional)
Number of days, the transaction will be delayed for. This field can be passed only for SALE, REFUND_SALE and REFUND type transaction.
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
.
card_layoutstring (optional)
To get different structure of card layout for any transaction , this parameter is passed. This field is optional. If not passed, default value is basic
.
basic
single-line
multi-line
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,
"transaction_type": "SALE",
"delay_capture_days": 3,
"payment_type": "credit-card",
"currency": "GBP",
"return_url": "https://mydomain.com/return",
"notification_url": "https://mydomain.com/notification"
} |
Response
Code Block |
---|
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": 123,
"payment_intent": "pi_Swhc84aSLtUGppvPARX...",
"transaction_type": "SALE",
"expiry_date": "2023-04-19T10:19:17Z",
"amount": 1.01,
"currency": "GBP",
"payment_type": "credit-card",
"return_url": "https://mydomain.com/return",
"notification_url": "https://mydomain.com/notification",
"card_layout": "single-line",
"element": {
"ccElement": "<input type=\"hidden\" name=\"merchantID\" value=\"14456\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_pqXuNE8rO************************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=\"145671\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4LyOVVz-nz*************************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-nzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffU*******************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=\"140567\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_pqXuNE8rOEmUN0vtQq*************************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>",
"stripeElement": "<script src=\"https://dev.blinkpayment.co.uk/assets/js/admin/jquery.min.js\"></script>\n<script src=\"https://dev.blinkpayment.co.uk/assets/js/api/inputmask.min.js\"></script>\n <script src=\"https://dev.blinkpayment.co.uk/assets/js/api/payment.min.js\"></script>\n<script src=\"https://dev.blinkpayment.co.uk/assets/js/api/stripe-api.js\"></script>\n <script async crossorigin src=\"https://js.stripe.com/v3/\" onload=\"initStripe('sk****')"></script><input type=\"hidden\" class=\"blink-form__input--merchant-id\" name=\"merchant_id\" value=\"465\"/>\n <input type=\"hidden\" class=\"blink-form__input--payment-intent\" name=\"payment_intent\" value=\"pi_DhxzQk5_eguMsE72MIUPO0OWL-t5yP*********************OKjvHMKS46bWEKnsWqoOoiQdo-dAvpIM\"/>\n <input type=\"hidden\" class=\"blink-form__input--resource\" name=\"resource\" value=\"creditcards\"/>\n<input type=\"hidden\" class=\"blink-form__input--transaction-unique\" name=\"transaction_unique\" value=\"vx2j53Z1fdZK\"/>\n <input type=\"hidden\" class=\"blink-form__input--payment-intent-client-secret\" name=\"payment_intent_client_secret\" value=\"pi_************kHzdD_secret_VL8BwGR5XrBx1DmSkFdlKuima\"/>\n<input type=\"hidden\" class=\"blink-form__input--payment-intent-api-base-url\" name=\"api_base_url\" value=\"https://dev.blinkpayment.co.uk/api/pay/v1/post-transaction-data\"/>\n<input type=\"hidden\" class=\"blink-form__input--stripe-account-id\" name=\"stripe_account_id\" value=\"acct_1OtRDuQfmx6p8NnM\"/>\n <input type=\"hidden\" class=\"blink-form__input--gateway\" name=\"gateway\" value=\"stripe\"/><label class=\"blink-form__label field-label\">Card information</label>\n <div class=\"blink-form__group fieldgroup-container relative no-wrap mb-4\">\n <div id=\"card-number-element\" class=\"field\"></div>\n <div id=\"card-expiry-element\" class=\"field\"></div>\n <div id=\"card-cvc-element\" class=\"field\"></div>\n </div><label class=\"blink-form__label field-label\">Name on card</label>\n<div class=\"blink-form__group fieldgroup-container mb-4\">\n <input type=\"text\" class=\"blink-form__input--customer-name\" name=\"customer_name\" value=\"\" />\n </div>\n<label class=\"blink-form__label field-label\">Email</label>\n <div class=\"blink-form__group fieldgroup-container mb-4\">\n <input type=\"text\" class=\"blink-form__input--customer-email\" name=\"customer_email\" value=\"\" />\n </div><label class=\"blink-form__label field-label\">Address</label>\n<div class=\"blink-form__group fieldgroup-container mb-4\">\n<div class=\"blink-form__group-child fieldgroup-child--width-8\">\n <input type=\"text\" class=\"blink-form__input--customer-address\" name=\"customer_address\" value=\"\" />\n</div>\n<div class=\"blink-form__group-child fieldgroup-child--width-4\">\n<input type=\"text\" class=\"blink-form__input--customer-postcode\" name=\"customer_postcode\" value=\"\" placeholder=\"Postcode\" />\n</div>\n</div><div class=\"error\"></div>,
"stripeMotoElement": "<script src=\"https://dev.blinkpayment.co.uk/assets/js/admin/jquery.min.js\"></script>\n<script src=\"https://dev.blinkpayment.co.uk/assets/js/api/inputmask.min.js\"></script>\n <script src=\"https://dev.blinkpayment.co.uk/assets/js/api/payment.min.js\"></script>\n<script src=\"https://dev.blinkpayment.co.uk/assets/js/api/stripe-api.js\"></script>\n <script async crossorigin src=\"https://js.stripe.com/v3/\" onload=\"initStripe('sk****')"></script><input type=\"hidden\" class=\"blink-form__input--merchant-id\" name=\"merchant_id\" value=\"465\"/>\n <input type=\"hidden\" class=\"blink-form__input--payment-intent\" name=\"payment_intent\" value=\"pi_DhxzQk5_eguMsE72MIUPO0OWL-t5yP*********************OKjvHMKS46bWEKnsWqoOoiQdo-dAvpIM\"/>\n <input type=\"hidden\" class=\"blink-form__input--resource\" name=\"resource\" value=\"creditcards\"/>\n<input type=\"hidden\" class=\"blink-form__input--transaction-unique\" name=\"transaction_unique\" value=\"vx2j53Z1fdZK\"/>\n <input type=\"hidden\" class=\"blink-form__input--payment-intent-client-secret\" name=\"payment_intent_client_secret\" value=\"pi_************kHzdD_secret_VL8BwGR5XrBx1DmSkFdlKuima\"/>\n<input type=\"hidden\" class=\"blink-form__input--payment-intent-api-base-url\" name=\"api_base_url\" value=\"https://dev.blinkpayment.co.uk/api/pay/v1/post-transaction-data\"/>\n<input type=\"hidden\" class=\"blink-form__input--stripe-account-id\" name=\"stripe_account_id\" value=\"acct_1OtRDuQfmx6p8NnM\"/>\n <input type=\"hidden\" class=\"blink-form__input--gateway\" name=\"gateway\" value=\"stripe\"/><label class=\"blink-form__label field-label\">Card information</label>\n <div class=\"blink-form__group fieldgroup-container relative no-wrap mb-4\">\n <div id=\"card-number-element\" class=\"field\"></div>\n <div id=\"card-expiry-element\" class=\"field\"></div>\n <div id=\"card-cvc-element\" class=\"field\"></div>\n </div><label class=\"blink-form__label field-label\">Name on card</label>\n<div class=\"blink-form__group fieldgroup-container mb-4\">\n <input type=\"text\" class=\"blink-form__input--customer-name\" name=\"customer_name\" value=\"\" />\n </div>\n<label class=\"blink-form__label field-label\">Email</label>\n <div class=\"blink-form__group fieldgroup-container mb-4\">\n <input type=\"text\" class=\"blink-form__input--customer-email\" name=\"customer_email\" value=\"\" />\n </div><label class=\"blink-form__label field-label\">Address</label>\n<div class=\"blink-form__group fieldgroup-container mb-4\">\n<div class=\"blink-form__group-child fieldgroup-child--width-8\">\n <input type=\"text\" class=\"blink-form__input--customer-address\" name=\"customer_address\" value=\"\" />\n</div>\n<div class=\"blink-form__group-child fieldgroup-child--width-4\">\n<input type=\"text\" class=\"blink-form__input--customer-postcode\" name=\"customer_postcode\" value=\"\" placeholder=\"Postcode\" />\n</div>\n</div><div class=\"error\"></div>
},
"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...", "transaction_type": "SALE", "expiry_date": "2023-04-19T10:19:17Z", "status": "active", "amount": 1.01, "currency": "GBP", "payment_type": "credit-card", "return_url": "https://mydomain.com/return", "notification_url": "https://mydomain.com/notification", "card_layout": "single-line", "element": { "ccElement": "<input type=\"hidden\" name=\"merchantID\" value=\"140****\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_pqXuNE8rOEmUN0vtQqgf*******************8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_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\" nameid=\"transactiondevice_uniquetimezone\" valuename=\"Ha6TP**device_timezone\" />><br>\n <input type=\"text\" name=\"customer_namehidden\" valueid=\"device_capabilities\" placeholdername=\"Name on carddevice_capabilities\" /><br>\n <input type=\"texthidden\" nameid=\"customerdevice_accept_emaillanguage\" valuename=\"device_accept_language\" placeholder=\"Email\"/><br><input/><br>\n <input type=\"texthidden\" placeholderid=\"Addressdevice_screen_resolution\" name=\"customer_address\" value=\"device_screen_resolution\" /><br>\n <input type=\"texthidden\" placeholderid=\"Postcoderemote_address\" name=\"customer_postcoderemote_address\" /><br>\n input type=\"hidden\" valueid=\"type\" /><br><input typename=\"hostedfield:cardNumbertype\" placeholdervalue=\"1234 1234 1234 12341\"/><br>\n <input type=\"hostedfield:cardExpiryDate\" placeholder=\"MM/YY\"/><br>\n <input type=\"hostedfield:cardCVV\" placeholder=\"CVV\"/><br>",", "ccMotoElement": "<input type=\"hidden\" name=\"merchantID\" value=\"146***\"/>\n "ddElement": "<input type=\"hidden\" name=\"payment_intent\" value=\"pi_Qt1xKdGzi-Ny1zeasZKyrKw7teoCwEoc__AetX1P_Nnvt54byN0g3yuSYBIaRUQ9-A********pqXuNE8rOEmUN0vtQqgf8NnkuQJq4LyO**********************OX2luESfVBxmhj81d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"transaction_uniqueresource\" value=\"Ha6TPerZ2LYucreditcards\"/>\n <input type=\"hidden\" name=\"resourcetransaction_unique\" value=\"directdebitsOiXWrlnKvvfh\"/>\n <input type=\"text\" placeholder=\"Given Name\" name=\"givencustomer_name\"/><br>\n <input type value=\"text\" placeholder=\"FamilyName on Namecard\" name=\"family_name\"/><br>\n <input type=\"text\" placeholder=\"Company Name\" name=\"company_name\"/><br>\n <input type\" name=\"textcustomer_email\" placeholdervalue=\"Email\" nameplaceholder=\"emailEmail\"/><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\" value=\"\" /><br><input type=\"texthostedfield:cardNumber\" placeholder=\"1234 1234 1234 1234\"/><br>\n <input type=\"hostedfield:cardExpiryDate\" placeholder=\"Account Holder NameMM/YY\"/><br>\n <input type=\"hostedfield:cardCVV\" nameplaceholder=\"account_holder_nameCVV\"/><br>\n <input type=\"hidden\" id=\"texttype\" placeholdername=\"Branch Codetype\" namevalue=\"branch_code2\"/><br>\n ", "ddElement": "<input type=\"texthidden\" placeholdername=\"Bank Account Numberpayment_intent\" namevalue=\"account_number\"/><br>", "obElement": "pi_pqXu******************************************XgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"merchanttransaction_idunique\" value=\"140841OiXWrlnKvvfh\"/>\n <input type=\"hidden\" name=\"payment_intentresource\" value=\"pi_Qt1xKdGzi-Ny1**********************P_Nnvt54byN0g3yuSYBIaRUQ9-AioQg6IiidUZFLNl3mvmVZGzvHUOX2luESfVBxmhj8directdebits\"/>\n <input type=\"hiddentext\" nameplaceholder=\"resourceGiven Name\" valuename=\"openbankingsgiven_name\"/>><br>\n <input type=\"hiddentext\" nameplaceholder=\"transaction_uniqueFamily Name\" valuename=\"Ha6TPerZ2LYufamily_name\"/>><br>\n <input type=\"text\" nameplaceholder=\"user_name\" value=Company Name\"\" placeholdername=\"Name on cardcompany_name\" /><br>\n <input type=\"text\" nameplaceholder=\"user_emailEmail\" valuename=\"\" placeholder=email\"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..." } |
GET /pay/v1/pay/intents/{id}
Headers
Content-TypestringContent 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": {\" 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 "ccElement": "<input type=\"hidden\" name=\"merchantIDpayment_intent\" value=\"123456pi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4Ly**********************SDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/>\n <input type=\"hidden\" name=\"resource\" value=\"openbankings\"/>\n <input type=\"hidden\" name=\"paymenttransaction_intentunique\" value=\"pi_Swhc84aSLtUGppvPARX...OiXWrlnKvvfh\"/>\n <input type=\"text\" name=\"customeruser_name\" value=\"\" placeholder=\"Name on card\" /></br>><br>\n <input type=\"text\" name=\"customeruser_email\" value=\"\" placeholder=\"Email\"/></br><input><br><input type=\"text\" placeholder=\"Address\" name=\"customer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" <input type=\"text\" placeholder=\"Postcode\" name=\"customer_postcode\"/><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\"/>", "ddElement": "<input type=\"hidden\" name=\"payment_intent\" value=\name=\"customer_postcode\" value=\"\" /><br>" }, "merchant_id": 134857, "transaction_unique": "xbKXyWkIL..." } |
Anchor | ||||
---|---|---|---|---|
|
Update intents
PATCH /pay/v1/intents/{id}
Payment Intent with status
as active
can only be updated. Once an intent is processed, it can’t be updated.
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...\"/>\n, "transaction_type": "SALE", "expiry_date": "2023-04-19T11:19:17Z", <input type=\"hidden\status": name=\"unique_transaction\" value=\"xbKXyWkILDda\"/>\n"active", "amount": 1.01, "currency": "GBP", <input type=\"text\" placeholder=\"Given Name\" name=\"given_name\"/><br>\n"payment_type": "credit-card", "return_url": "https://mydomain.com/return", "notification_url": "https://mydomain.com/notification", <input type=\"text\" placeholder=\"Family Name\" name=\"family_name\"/><br>\n "card_layout": "single-line", "element": { "ccElement": "<input type=\"texthidden\" placeholdername=\"Company NamemerchantID\" namevalue=\"company_name1235\"/><br>>\n <input type=\"texthidden\" placeholder=\"Email\" name=\"emailpayment_intent\"/><br><input typevalue=\"text\" placeholder=\"Address\" name=\"customer_addresspi_pqXuNE8rOEmUN0vtQqgf8NnkuQJq4LyOVVz-nzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/><br>>\n <input type=\"texthidden\" placeholdername=\"Postcoderesource\" namevalue=\"customer_postcodecreditcards\"/><br><input>\n <input type=\"texthidden\" placeholdername=\"Account Holder Nametransaction_unique\" namevalue=\"account_holder_nameOiXWrlnKvvfh\"/><br/>\n <input type=\"text\" placeholdername=\"Branch Codecustomer_name\" value=\"\" nameplaceholder=\"branch_codeName on card\" /><br/>><br>\n <input type=\"text\" placeholdername=\"Bank Account Numbercustomer_email\" value=\"\" nameplaceholder=\"account_numberEmail\"/>", "obElement": "<input type><br><input type=\"text\" placeholder=\"hiddenAddress\" name=\"merchantcustomer_idaddress\" value=\"123456\" />><br>\n <input type=\"hiddentext\" nameplaceholder=\"payment_intentPostcode\" valuename=\"pi_Swhc84aSLtUGppvPARX...customer_postcode\"/>\n <input type value=\"text\" name=\"user_name\" 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=\"Addressdevice_timezone\" name=\"customerdevice_addresstimezone\" /><br>\n <input type=\"texthidden\" placeholderid=\"Postcodedevice_capabilities\" name=\"customerdevice_postcodecapabilities\" /><br>"\n <input type=\"hidden\" }, "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": "<input type=\"hidden\" name=\"merchantID\" value=\"123456\"/>\n <input type=\"hidden\" name=\"payment_intent\" value=\"pi_Swhc84aSLtUGppvPARX...\"/>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=\"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_namepostcode\" value=\"\" placeholder/><br><input type=\"Name on cardhostedfield:cardNumber\" /></br>\n <input type=\"text\" name=\"customer_email\" value=\"placeholder=\"1234 1234 1234 1234\"/><br>\n <input type=\"hostedfield:cardExpiryDate\" placeholder=\"EmailMM/YY\"/></br><input><br>\n <input type=\"texthostedfield:cardCVV\" placeholder=\"AddressCVV\" name=\"customer_address\"/><br>\n <input type=\"texthidden\" placeholderid=\"Postcodetype\" name=\"customer_postcode\"/><br><input type=\"hostedfield:cardNumber\" placeholdervalue=\"1234 1234 1234 12342\"/><br>\n", "ddElement": <input type=\"hostedfield:cardExpiryDate"<input type=\"hidden\" name=\"payment_intent\" placeholdervalue=\"MM/YYpi_pqX************************z-nzcR81I2uPcipp1d8qSDTSPIucQyrNNa1UiyBYsBTCffUn9zkGVd3a_94uxXgNb-LD5jaMk\"/><br>>\n <input type=\"hidden\" name=\"hostedfield:cardCVVtransaction_unique\" placeholdervalue=\"CVVOiXWrlnKvvfh\"/>",\n "ddElement": "<input type=\"hidden\" name=\"payment_intentresource\" value=\"pi_Swhc84aSLtUGppvPARX...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 NameEmail\" name=\"email\"/><br><input type=\"text\" placeholder=\"Address\" name=\"company_namecustomer_address\" value=\"\" /><br>\n <input type=\"text\" placeholder=\"Postcode\" placeholdername=\"Emailcustomer_postcode\" namevalue=\"email\" /><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..." } |