To authenticate requests, the Blink API uses an api_key
and secret_key
combination, which is used to obtain an access_token
for your session.
HTTP Basic Auth is used for authentication. The access_token
should be used via bearer in the header to authenticate all requests, e.g. Authentication: Bearer <access_token>
.
You can manage and renew your keys on the Blink platform. In case you do not see the keys, simply reach out to support to get set up.
It is essential to keep your API keys secure as they hold significant privileges. Refrain from sharing your secret API keys in public areas such as GitHub, client-side code, etc.
All API requests must be made over HTTPS. Requests made over plain HTTP will be unsuccessful. API requests that lack authentication will also fail.
Anchor | ||||
---|---|---|---|---|
|
Attributes
api_keystring
256 alpha numeric, obtained through the Blink platform.
secret_key string
256 alpha numeric, obtained through the Blink platform.
Request
Code Block |
---|
POST https://secure.blinkpayment.co.uk/api/v1/pay/token Content-Type: application/json { "api_key": "************************", "secret_key": "*********************" } |
Response
Code Block |
---|
{ "access_token": "******************", "expired_on": "2023-02-27T11:52:37Z", "payment_types": [ "credit-card", "open-banking", ], "currency": "GBP", "send_blink_receipt": "No" } |
Anchor | ||||
---|---|---|---|---|
|
Attributes
apiaccess_keytokenstring
256 Alpha numericĀ
secret_key string
256 Alpha numericĀ
numeric, obtained through the create token request.
Request
Code Block |
---|
POST https://secure.blinkpayment.co.uk/api/v1/pay/token/refresh Content-Type: application/json { "apiaccess_keytoken": "************************", "secret_key": "*********************" } <access_token>" } |
Response
Code Block |
---|
{ "access_token": "******************", "expired_on": "2023-02-27T11:52:37Z", "payment_types": [ "credit-card", "open-banking", ], "currency": "GBP", "send_blink_receipt": "No" } |