Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Authenticate requests using HTTP Basic Auth by adding a bearer token to the header, e.g. Authentication: Bearer {{access_token}}. You can get the {{access_token}} from the create token request.

This payment intent is expired after 30 minutes. You need to call refresh intent request to regenerate the intent.

Once a payment intent is processed i.e. payment is done using any payment type, it can’t be used again to perform another transaction.Each payment intent can be used for only one payment type.

Anchorcreate-intentcreate-intentCreate intent

POST /v1/pay/intent

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
URL on your domain, where Blink will redirect after transaction is processed e.g. https://mydomain.com/return.

notification_url string
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/v1/pay/intent 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 BlockHTTP/1.1 200 OK Content-Type: application/json { "id": 123, "payment_intent": "pi_Swhc84aSLtUGppvPARX...", "expired_on": "2023-01-01T12:00:00Z", "amount": 1.01, "currency": "GBP", "payment_type": "credit-card", "return_url": "

Authenticate requests using HTTP Basic Auth by adding a bearer token to the header, e.g. Authentication: Bearer {{access_token}}. You can get the {{access_token}} from the create token request.

Once a payment intent is processed i.e. payment is done using any payment type, it can’t be used again to perform another transaction.Each payment intent can be used for only one payment type.


Anchor
create-intent
create-intent

Create intent

POST /pay/v1/intent

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
URL on your domain, where Blink will redirect after transaction is processed e.g. https://mydomain.com/return

", "

.

notification_url

": "https://mydomain.com/notification" }
Anchorrefresh-intentrefresh-intentRefresh intent

POST /v1/pay/intent/refresh

Headers

Content-Typestring
Content type.Authorizationstring
Access token generated from create token request.

Attributes

payment_intentstring
256 Alpha numeric, obtained through the create-intent requeststring
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/pay/intent/refresh HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG...

{
  "payment_intent": "pi_Swhc84aSLtUGppvPARX.../intent 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...",
    "expired_on": "2023-01-01T12:00:00Z",
    "amount": 1.01,
    "currency": "GBP",
    "payment_type": "credit-card",
    "return_url": "https://mydomain.com/return",
    "notification_url": "https://mydomain.com/notification"
}

Anchor
get-intent
get-intent

Get

intent

intents

GET /pay/v1/pay/intentintents/{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/pay/intentintents/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...",

   "expired_on": "2023-01-01T12:00:00Z",
    "amount": 1.01,
    "currency": "GBP",
    "payment_type": "credit-card",
    "return_url": "https://mydomain.com/return",
    "notification_url": "https://mydomain.com/notification"
}

Anchor
update-intent
update-intent

Update

intent

intents

PATCH /pay/v1/pay/intentintents/{id}

Headers

Content-Typestring
Content type.

Authorizationstring
Access token generated from create token request.

Attributes

return_urlstring
Return url.

notification_urlstring
Notification url.

Request

Code Block
PATCH https://secure.blinkpayment.co.uk/api/pay/v1/pay/intentintents/{id} HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG...

{
  "payment_intent": "pi_Swhc84aSLtUGppvPARX..."
}

Response

Code Block
HTTP/1.1 200 OK
Content-Type: application/json

{
    "id": 123,
    "payment_intent": "pi_Swhc84aSLtUGppvPARX...",
    "expired_on": "2023-01-01T12:00:00Z",
    "amount": 1.01,
    "currency": "GBP",
    "payment_type": "credit-card",
    "return_url": "https://mydomain.com/return",
    "notification_url": "https://mydomain.com/notification"
}