|
17 | 17 | "description": "The Production SimplePay API" |
18 | 18 | }, |
19 | 19 | { |
20 | | - "url": "sandbox://sandbox.simplepay.hu/payment/v2", |
| 20 | + "url": "https://sandbox.simplepay.hu/payment/v2", |
21 | 21 | "description": "The Test SimplePay API" |
22 | 22 | } |
23 | 23 | ], |
|
29 | 29 | ], |
30 | 30 | "summary": "Start a transaction", |
31 | 31 | "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", |
44 | 33 | "requestBody": { |
45 | 34 | "description": "The transaction object you would like to start.", |
46 | 35 | "required": true, |
47 | 36 | "content": { |
48 | 37 | "application/json": { |
49 | 38 | "schema": { |
50 | | - "$ref": "#/components/schemas/BankAccount" |
| 39 | + "$ref": "#/components/schemas/Transaction" |
51 | 40 | } |
52 | 41 | } |
53 | 42 | } |
|
57 | 46 | "description": "Success response", |
58 | 47 | "headers": { |
59 | 48 | "Signature": { |
60 | | - "description": "Request limit per minute.", |
| 49 | + "description": "The signature created by the SimplePay back-end.", |
61 | 50 | "schema": { |
62 | | - "type": "integer", |
63 | | - "format": "int32" |
| 51 | + "type": "string" |
64 | 52 | } |
65 | 53 | } |
66 | 54 | }, |
67 | 55 | "content": { |
68 | 56 | "application/json": { |
69 | 57 | "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 | + } |
71 | 101 | } |
72 | 102 | } |
73 | 103 | } |
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" |
92 | 104 | } |
93 | 105 | } |
94 | 106 | } |
|
102 | 114 | ], |
103 | 115 | "properties": { |
104 | 116 | "customer": { |
105 | | - "type": "string" |
| 117 | + "type": "string", |
| 118 | + "example": "Guillaume Tell" |
106 | 119 | }, |
107 | 120 | "customerEmail": { |
108 | 121 | "type": "string", |
|
115 | 128 | "type": "boolean", |
116 | 129 | "default": false |
117 | 130 | }, |
| 131 | + "maySelectEmail": { |
| 132 | + "type": "boolean", |
| 133 | + "default": false |
| 134 | + }, |
| 135 | + "maySelectDelivery": { |
| 136 | + "type": "array", |
| 137 | + "items": { |
| 138 | + "type": "string", |
| 139 | + "example": "HU" |
| 140 | + } |
| 141 | + }, |
118 | 142 | "twoStep": { |
119 | 143 | "type": "boolean", |
120 | 144 | "default": false |
|
124 | 148 | "default": false |
125 | 149 | }, |
126 | 150 | "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 | + } |
128 | 174 | }, |
129 | 175 | "language": { |
130 | | - "type": "string" |
| 176 | + "$ref": "#/components/schemas/Language" |
131 | 177 | }, |
132 | 178 | "discount": { |
133 | 179 | "type": "number", |
|
142 | 188 | "default": 0 |
143 | 189 | }, |
144 | 190 | "delivery": { |
145 | | - "type": "object", |
146 | | - "properties": {} |
| 191 | + "$ref": "#/components/schemas/Delivery" |
147 | 192 | }, |
148 | 193 | "invoice": { |
149 | | - "type": "object", |
150 | | - "properties": {} |
| 194 | + "$ref": "#/components/schemas/Invoice" |
151 | 195 | }, |
152 | 196 | "items": { |
153 | 197 | "type": "array", |
154 | | - "items": {} |
| 198 | + "items": { |
| 199 | + "$ref": "#/components/schemas/Item" |
| 200 | + } |
155 | 201 | }, |
156 | 202 | "methods": { |
157 | 203 | "type": "array", |
| 204 | + "items": { |
| 205 | + "$ref": "#/components/schemas/Method" |
| 206 | + }, |
158 | 207 | "description": "Possible valies: CARD, WIRE or EAM." |
159 | 208 | }, |
160 | 209 | "timeout": { |
|
165 | 214 | }, |
166 | 215 | "type": "object" |
167 | 216 | }, |
| 217 | + "Method": { |
| 218 | + "type": "string", |
| 219 | + "enum": [ |
| 220 | + "CARD", "EAM", "WIRE" |
| 221 | + ] |
| 222 | + }, |
168 | 223 | "Currency": { |
169 | 224 | "type": "string", |
170 | 225 | "enum": [ |
171 | | - "EUR", |
172 | | - "HUF", |
173 | | - "USD" |
| 226 | + "EUR", "HUF", "USD" |
174 | 227 | ] |
| 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": {} |
175 | 320 | } |
176 | 321 | } |
177 | 322 | } |
|
0 commit comments