-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.json
314 lines (314 loc) · 10.4 KB
/
example.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
{
"tags": [
"Tokens"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"api_key": {
"type": "string",
"description": "256 alpha numeric, obtained through the Blink platform. \n"
},
"secret_key": {
"type": "string",
"description": "256 alpha numeric, obtained through the Blink platform. \n"
},
"payment_api_status": {
"type": "boolean",
"description": "To enable payment API , value should be set to true. This field is optional. If not passed, default value is true.\n\n- true\n- false\n"
},
"send_blink_receipt": {
"type": "boolean",
"description": "To enable Blink receipt feature after any transaction , value should be set to true. This field is optional. If not passed, default value is false.\n\n- true\n- false"
},
"address_postcode_required": {
"type": "boolean",
"description": "To fetch address and postcode details of any user for any transaction , value should be set to true. This field is optional. If not passed, default value is false.\n\n- true\n- false"
},
"enable_moto_payments": {
"type": "boolean",
"description": "To enable MOTO payment feature for any transaction , value should be set to true. This field is optional. If not passed, default value is false.\n\n- true\n- false"
}
},
"required": [
"api_key",
"secret_key"
]
},
"examples": {
"Example request": {
"value": {
"api_key": "49f98f211008be298aaa244...",
"secret_key": "44b51da04a1ff0caa73afd...",
"payment_api_status": true,
"send_blink_receipt": true,
"address_postcode_required": true,
"enable_moto_payments": true
}
}
}
}
},
"description": ""
},
"responses": {
"200": {
"description": "OK",
"headers": {},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"expired_on": {
"type": "string"
},
"payment_types": {
"type": "array",
"items": {
"type": "string"
}
},
"currency": {
"type": "string"
},
"payment_api_status": {
"type": "boolean"
},
"send_blink_receipt": {
"type": "boolean"
},
"address_postcode_required": {
"type": "boolean"
},
"enable_moto_payments": {
"type": "boolean"
}
}
},
"examples": {
"example-0": {
"summary": "400 Bad Request",
"value": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbG...",
"expired_on": "2023-01-01T12:00:00Z",
"payment_types": [
"credit-card",
"open-banking",
"direct-debit"
],
"currency": "GBP",
"payment_api_status": true,
"send_blink_receipt": true,
"address_postcode_required": true,
"enable_moto_payments": true
}
}
}
}
}
},
"201": {
"description": "Created",
"headers": {},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"expired_on": {
"type": "string"
},
"payment_types": {
"type": "array",
"items": {
"type": "string"
}
},
"currency": {
"type": "string"
},
"payment_api_status": {
"type": "boolean"
},
"send_blink_receipt": {
"type": "boolean"
},
"address_postcode_required": {
"type": "boolean"
},
"enable_moto_payments": {
"type": "boolean"
}
},
"x-examples": {
"Example 1": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbG...",
"expired_on": "2023-01-01T12:00:00Z",
"payment_types": [
"credit-card",
"open-banking",
"direct-debit"
],
"currency": "GBP",
"payment_api_status": true,
"send_blink_receipt": true,
"address_postcode_required": true,
"enable_moto_payments": true
}
}
},
"example": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtZXJjaGFudF9pZCI6NDM5OCwic2VjcmV0X2tleSI6IjYzMTBlNDhiZGQwZTQzODE0NTlhNjJiNDZkMmM0ZmQ2ZThhYjY1YTJhNGQ1MjA1YzZjM2RkZWJmYmJhZWJiZjgiLCJleHAiOjE2OTE1NzYyNDJ9.2x7nhth9SBKN_9rGCXppGO5Soqbf8PvJS_4MEAQP4Kk",
"expired_on": "2023-08-09T11:17:22Z",
"payment_types": [
"credit-card",
"open-banking"
],
"currency": "GBP",
"payment_api_status": true,
"send_blink_receipt": true,
"enable_moto_payments": true,
"address_postcode_required": true
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"expired_on": {
"type": "string"
},
"payment_types": {
"type": "array",
"items": {
"type": "string"
}
},
"currency": {
"type": "string"
},
"send_blink_receipt": {
"type": "string"
}
},
"x-examples": {
"Example 1": {
"access_token": "ffaabb123456789012ffaabb123456789012...",
"expired_on": "2023-02-15T07:19:27Z",
"payment_types": [
"credit-card",
"open-banking",
"direct-debit"
],
"currency": "GBP",
"send_blink_receipt": "No"
}
}
}
}
}
}
},
"description": "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.\n\nHTTP 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}}.\n\nAccess token is expired after 30 minutes. Then, you need to create a new token.\n\nYou 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.\n\nIt 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.\n\nAll API requests must be made over HTTPS. Requests made over plain HTTP will be unsuccessful. API requests that lack authentication will also fail.",
"parameters": [
{
"schema": {
"type": "string"
},
"in": "header",
"name": "Content-Type",
"description": "application/json"
}
],
"operationId": "Tokens",
"method": "post",
"path": "/api/pay/v1/Tokens",
"servers": [
{
"url": "https://secure.blinkpayment.co.uk"
},
{
"url": "https://gateway2.blinkpayment.co.uk"
}
],
"jsonRequestBodyExample": {
"api_key": "string",
"secret_key": "string",
"payment_api_status": true,
"send_blink_receipt": true,
"address_postcode_required": true,
"enable_moto_payments": true
},
"info": {
"title": "Blink Payment v1.0.20",
"description": "Blink Payment API Docs",
"version": "1.0.0",
"contact": {
"name": "Blink Payment",
"email": "[email protected]",
"url": "blinkpayment.co.uk"
},
"license": {
"name": "MIT License",
"url": "https://opensource.org/licenses/MIT"
}
},
"postman": {
"name": "Tokens",
"description": {
"content": "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.\n\nHTTP 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}}.\n\nAccess token is expired after 30 minutes. Then, you need to create a new token.\n\nYou 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.\n\nIt 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.\n\nAll API requests must be made over HTTPS. Requests made over plain HTTP will be unsuccessful. API requests that lack authentication will also fail.",
"type": "text/plain"
},
"url": {
"path": [
"api",
"pay",
"v1",
"Tokens"
],
"host": [
"{{baseUrl}}"
],
"query": [],
"variable": []
},
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"method": "POST",
"body": {
"mode": "raw",
"raw": "\"\"",
"options": {
"raw": {
"language": "json"
}
}
}
}
}