Post
/api/pay/v1/tokens
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
.
This endpoint is used to generate access tokens for authentication and authorisation purposes.
Body parameters
object
Example{
"api_key": "eff458c623bba928a1a211521a7e38433bdf68780d0d8a16e2502f43cca322bc",
"secret_key": "6310e48bdd0e4381459a62b46d2c4fd6e8ab65a2a4d5205c6c3ddebfbbaebbf8",
"send_blink_receipt": true,
"address_postcode_required": true,
"enable_moto_payments": true,
"application_name": "Blink API Postman Demo",
"application_description": "Potsman collection of the Blink API - Take payments through, card, open banking and direct debits.",
"source_site": "getpostman.com"
}
Request Body
api_key
(string, required): The API key for authentication, 256 alpha numeric, obtained through the Blink platform.secret_key
(string, required): The secret key for authentication, 256 alpha numeric, obtained through the Blink platform.send_blink_receipt
(boolean): Defaulted to false. To enable the Blink receipt feature, value should be set to true.address_postcode_required
(boolean): Defaulted to false. To fetch the address and postcode details of a user, value should be set to true.enable_moto_payments
(boolean): Defaulted to false. To enable MOTO payment feature for any transaction, value should be set to true.application_name
(string, optional): The name of your application.application_description
(string, optional): Description of how your application interacts with blink.source_site
(string, optional): The site your application is hosted on.
Response Parameters
access_token
(string): The generated access token for authentication and authorization purposes.expired_on
(string): The time when the token expires.payment_types
(array): The Payment types available on the Blink account.currencies
(array): The currencies available on the Blink account.
Responses
201
Created
Headers
Date
string
ExampleTue, 30 Jul 2024 13:51:58 GMT
Content-Type
string
Exampleapplication/json
Transfer-Encoding
string
Examplechunked
Connection
string
Examplekeep-alive
Server
string
ExampleApache/2.4.59 (Amazon Linux) OpenSSL/3.0.8
Cache-Control
string
Exampleno-cache, private
X-RateLimit-Limit
integer
Example60
X-RateLimit-Remaining
integer
Example59
Strict-Transport-Security
string
Examplemax-age=63072000
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtZXJjaGFudF9pZCI6NDM5OCwic2VjcmV0X2tleSI6IjYzMTBlNDhiZGQwZTQzODE0NTlhNjJiNDZkMmM0ZmQ2ZThhYjY1YTJhNGQ1MjA1YzZjM2RkZWJmYmJhZWJiZjgiLCJleHAiOjE3MjIzNDkzMTh9.38L2OuCOD9rnmvTU2r3n0wAkF1tHp3GskaVCm7M5RYM",
"expired_on": "2024-07-30T02:21:58Z",
"payment_types": [
"credit-card",
"direct-debit",
"open-banking"
],
"currencies": [
"GBP"
],
"payment_api_status": true,
"send_blink_receipt": true,
"enable_moto_payments": true,
"address_postcode_required": true
}
object