Skip to content

Commit b4d1c37

Browse files
committed
wip
1 parent 876d197 commit b4d1c37

File tree

1 file changed

+192
-47
lines changed

1 file changed

+192
-47
lines changed

openapi.json

Lines changed: 192 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"description": "The Production SimplePay API"
1818
},
1919
{
20-
"url": "sandbox://sandbox.simplepay.hu/payment/v2",
20+
"url": "https://sandbox.simplepay.hu/payment/v2",
2121
"description": "The Test SimplePay API"
2222
}
2323
],
@@ -29,25 +29,14 @@
2929
],
3030
"summary": "Start a transaction",
3131
"description": "Start a transaction using the given parameters",
32-
"operationId": "ListBankAccount",
33-
"parameters": [
34-
{
35-
"name": "page",
36-
"in": "query",
37-
"required": false,
38-
"schema": {
39-
"type": "integer",
40-
"default": "1"
41-
}
42-
}
43-
],
32+
"operationId": "start",
4433
"requestBody": {
4534
"description": "The transaction object you would like to start.",
4635
"required": true,
4736
"content": {
4837
"application/json": {
4938
"schema": {
50-
"$ref": "#/components/schemas/BankAccount"
39+
"$ref": "#/components/schemas/Transaction"
5140
}
5241
}
5342
}
@@ -57,38 +46,61 @@
5746
"description": "Success response",
5847
"headers": {
5948
"Signature": {
60-
"description": "Request limit per minute.",
49+
"description": "The signature created by the SimplePay back-end.",
6150
"schema": {
62-
"type": "integer",
63-
"format": "int32"
51+
"type": "string"
6452
}
6553
}
6654
},
6755
"content": {
6856
"application/json": {
6957
"schema": {
70-
"$ref": "#/components/schemas/BankAccountList"
58+
"properties": {
59+
"salt": {
60+
"type": "string",
61+
"example": "KAC6ZRUacmQit98nFKOpjXgkwdC0Grzl"
62+
},
63+
"merchant": {
64+
"type": "string",
65+
"example": "PUBLICTESTHUF"
66+
},
67+
"orderRef": {
68+
"type": "string",
69+
"example": "101010515680292482600"
70+
},
71+
"currency": {
72+
"$ref": "#/components/schemas/Currency"
73+
},
74+
"transactionId": {
75+
"type": "number",
76+
"example": "99844942"
77+
},
78+
"timeout": {
79+
"type": "string",
80+
"description": "The ISO 8601 format of the timeout date.",
81+
"example": "2004-02-12T15:19:21+00:00"
82+
},
83+
"total": {
84+
"type": "number",
85+
"example": "25.0"
86+
},
87+
"paymentUrl": {
88+
"type": "string",
89+
"example": "https://sandbox.simplepay.hu/pay/pay/pspHU/8f4oKRec5R1B696xlxbOcj1jRhhABA2pwSLQDPW60zoGSDWzDU",
90+
"description": "The payment interface URL."
91+
},
92+
"tokens": {
93+
"type": "array",
94+
"items": {
95+
"type": "string",
96+
"example": "SPTBXPQFKRNB2NEKBNXJ42KON6VMVME7M82IK5JX3JX7HISC34KU2LVNC4NVXLLB"
97+
},
98+
"description": "The recurring payment tokens. Provided only for the inital recurring payment."
99+
}
100+
}
71101
}
72102
}
73103
}
74-
},
75-
"400": {
76-
"$ref": "#/components/responses/BadRequest"
77-
},
78-
"401": {
79-
"$ref": "#/components/responses/Unauthorized"
80-
},
81-
"402": {
82-
"$ref": "#/components/responses/PaymentRequired"
83-
},
84-
"422": {
85-
"$ref": "#/components/responses/UnprocessableEntity"
86-
},
87-
"429": {
88-
"$ref": "#/components/responses/TooManyRequests"
89-
},
90-
"500": {
91-
"$ref": "#/components/responses/ServerError"
92104
}
93105
}
94106
}
@@ -102,7 +114,8 @@
102114
],
103115
"properties": {
104116
"customer": {
105-
"type": "string"
117+
"type": "string",
118+
"example": "Guillaume Tell"
106119
},
107120
"customerEmail": {
108121
"type": "string",
@@ -115,6 +128,17 @@
115128
"type": "boolean",
116129
"default": false
117130
},
131+
"maySelectEmail": {
132+
"type": "boolean",
133+
"default": false
134+
},
135+
"maySelectDelivery": {
136+
"type": "array",
137+
"items": {
138+
"type": "string",
139+
"example": "HU"
140+
}
141+
},
118142
"twoStep": {
119143
"type": "boolean",
120144
"default": false
@@ -124,10 +148,32 @@
124148
"default": false
125149
},
126150
"url": {
127-
"type": "string"
151+
"type": "string",
152+
"example": "https://sdk.simplepay.hu/capture.php"
153+
},
154+
"urls": {
155+
"type": "object",
156+
"properties": {
157+
"success": {
158+
"type": "string",
159+
"example": "https://sdk.simplepay.hu/success.php"
160+
},
161+
"fail": {
162+
"type": "string",
163+
"example": "https://sdk.simplepay.hu/fail.php"
164+
},
165+
"cancel": {
166+
"type": "string",
167+
"example": "https://sdk.simplepay.hu/cancel.php"
168+
},
169+
"timeout": {
170+
"type": "string",
171+
"example": "https://sdk.simplepay.hu/timeout.php"
172+
}
173+
}
128174
},
129175
"language": {
130-
"type": "string"
176+
"$ref": "#/components/schemas/Language"
131177
},
132178
"discount": {
133179
"type": "number",
@@ -142,19 +188,22 @@
142188
"default": 0
143189
},
144190
"delivery": {
145-
"type": "object",
146-
"properties": {}
191+
"$ref": "#/components/schemas/Delivery"
147192
},
148193
"invoice": {
149-
"type": "object",
150-
"properties": {}
194+
"$ref": "#/components/schemas/Invoice"
151195
},
152196
"items": {
153197
"type": "array",
154-
"items": {}
198+
"items": {
199+
"$ref": "#/components/schemas/Item"
200+
}
155201
},
156202
"methods": {
157203
"type": "array",
204+
"items": {
205+
"$ref": "#/components/schemas/Method"
206+
},
158207
"description": "Possible valies: CARD, WIRE or EAM."
159208
},
160209
"timeout": {
@@ -165,13 +214,109 @@
165214
},
166215
"type": "object"
167216
},
217+
"Method": {
218+
"type": "string",
219+
"enum": [
220+
"CARD", "EAM", "WIRE"
221+
]
222+
},
168223
"Currency": {
169224
"type": "string",
170225
"enum": [
171-
"EUR",
172-
"HUF",
173-
"USD"
226+
"EUR", "HUF", "USD"
174227
]
228+
},
229+
"Language": {
230+
"type": "string",
231+
"enum": [
232+
"AR", "BG", "CS", "DE", "EN", "ES", "FR", "IT", "HR", "HU", "PL", "RO", "RU", "SK", "TR", "ZH"
233+
]
234+
},
235+
"Item": {
236+
"type": "object",
237+
"required": [
238+
"ref",
239+
"title",
240+
"amount",
241+
"price"
242+
],
243+
"properties": {
244+
"ref": {
245+
"type": "string",
246+
"example": "SKU123"
247+
},
248+
"title": {
249+
"type": "string",
250+
"example": "Sample Product"
251+
},
252+
"desc": {
253+
"type": "string",
254+
"example": "A sample product description.",
255+
"nullable": true
256+
},
257+
"amount": {
258+
"type": "number",
259+
"exclusiveMinimum": true,
260+
"minimum": 0,
261+
"example": 1
262+
},
263+
"price": {
264+
"type": "number",
265+
"exclusiveMinimum": true,
266+
"minimum": 0,
267+
"example": 25.0
268+
},
269+
"tax": {
270+
"type": "number"
271+
}
272+
}
273+
},
274+
"Invoice": {
275+
"type": "object",
276+
"properties": {
277+
"city": {
278+
"type": "string",
279+
"example": "Budapest"
280+
},
281+
"phone": {
282+
"type": "string",
283+
"example": "+36701234567"
284+
},
285+
"state": {
286+
"type": "string",
287+
"example": "BE"
288+
},
289+
"zip": {
290+
"type": "string",
291+
"example": "1000"
292+
},
293+
"company": {
294+
"type": "string",
295+
"example": "Cone Development"
296+
},
297+
"country": {
298+
"type": "string",
299+
"example": "HU",
300+
"description": "The ISO 3166-1 alpha-2 format of the country."
301+
},
302+
"address": {
303+
"type": "string",
304+
"example": "Üllői út 1."
305+
},
306+
"address2": {
307+
"type": "string",
308+
"example": "II/B",
309+
"nullable": true
310+
},
311+
"name": {
312+
"type": "string",
313+
"example": "Guillaume Tell"
314+
}
315+
}
316+
},
317+
"Delivery": {
318+
"type": "object",
319+
"properties": {}
175320
}
176321
}
177322
}

0 commit comments

Comments
 (0)