-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathspec.json
More file actions
338 lines (338 loc) · 9.02 KB
/
Copy pathspec.json
File metadata and controls
338 lines (338 loc) · 9.02 KB
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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
{
"openapi": "3.0.3",
"info": {
"title": "Unofficial Documentation for Clictopay API",
"description": "This documentation is based on the file provided via this link: [Clictopay API File](https://www.linkedin.com/posts/mohamedsafouanbesrour_manuel-int%C3%A9gration-activity-7167533794663489536-LFQW)",
"version": "1.0.0"
},
"paths": {
"/register.do": {
"post": {
"summary": "Initiate Payment",
"description": "Initiates a payment transaction.",
"tags": [
"Payment"
],
"requestBody": {
"required": true,
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"userName": {
"type": "string",
"maxLength": 30,
"example": "123456789",
"description": "Merchant login received during integration."
},
"password": {
"type": "string",
"maxLength": 30,
"example": "6E2OCk4sx",
"description": "Merchant password received during integration."
},
"orderNumber": {
"type": "string",
"maxLength": 32,
"example": "ea540dac-cd5b-42b9-b562-e0313d2c75f4",
"description": "Number (identifier) of the order in the merchant's system."
},
"amount": {
"type": "integer",
"example": 125500,
"description": "Minimum order amount in (e.g. cents)."
},
"currency": {
"type": "integer",
"example": 788,
"description": "Payment currency code, according to ISO 4217 STANDARD"
},
"returnUrl": {
"type": "string",
"maxLength": 512,
"example": "https://yourwebsite.com/success",
"description": "Web address where the customer should be redirected after successful payment."
},
"language": {
"type": "string",
"example": "fr",
"description": "Language according to ISO 639-1. If not specified, the system uses the default language from the merchant's merchant settings."
}
},
"required": [
"userName",
"password",
"orderNumber",
"amount",
"currency",
"returnUrl"
]
},
"example": {
"userName": "123456789",
"password": "6E2OCk4sx",
"orderNumber": "ea540dac-cd5b-42b9-b562-e0313d2c75f4",
"amount": 125500,
"currency": 788,
"returnUrl": "https://yourwebsite.com/success"
}
}
}
},
"responses": {
"200": {
"description": "Successful",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"orderId": {
"type": "string",
"description": "Unique identifier for the initiated order."
},
"formUrl": {
"type": "string",
"description": "URL for the payment form."
}
}
},
"example": {
"orderId": "dca711c0-9793-7fae-8433-75c00008e5f1",
"formUrl": "https://test.clictopay.com/payment/merchants/CLICTOPAY/payment_en.html?mdOrder=dca711c0-9793-7fae-8433-75c00008e5f1"
}
}
}
}
},
"security": []
}
},
"/getOrderStatus.do": {
"get": {
"summary": "Get Payment Details",
"description": "Retrieves the status of a payment order.",
"tags": [
"Payment"
],
"parameters": [
{
"name": "orderId",
"in": "query",
"example": "dca711c0-9793-7fae-8433-75c00008e5f1",
"description": "The ID of the order",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "language",
"in": "query",
"example": "fr",
"description": "The language code",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "password",
"in": "query",
"example": "6E2OCk4sx",
"description": "The password for authentication",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "userName",
"in": "query",
"example": "123456789",
"description": "The username for authentication",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"example": {
"depositAmount": 0,
"currency": "788",
"authCode": 2,
"ErrorCode": "0",
"ErrorMessage": "Success",
"OrderStatus": 0,
"OrderNumber": "dca711c0-9793-7fae-8433-75c00008e5f1",
"Amount": 125500
}
}
}
}
}
}
},
"/registerPreAuth.do": {
"post": {
"summary": "Initiate Pre-Authorization",
"description": "Registers a pre-authorization transaction (amount is blocked but not captured).",
"tags": ["Pre-Authorization"],
"requestBody": {
"required": true,
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"userName": { "type": "string", "example": "123456789" },
"password": { "type": "string", "example": "6E2OCk4sx" },
"orderNumber": { "type": "string", "example": "preauth-001" },
"amount": { "type": "integer", "example": 125500 },
"currency": { "type": "integer", "example": 788 },
"returnUrl": { "type": "string", "example": "https://yourwebsite.com/success" }
},
"required": ["userName", "password", "orderNumber", "amount", "currency", "returnUrl"]
}
}
}
},
"responses": {
"200": {
"description": "Pre-authorization created successfully"
}
}
}
},
"/deposit.do": {
"post": {
"summary": "Capture Pre-Authorized Payment",
"description": "Completes (captures) a previously authorized payment.",
"tags": ["Pre-Authorization"],
"requestBody": {
"required": true,
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"userName": { "type": "string" },
"password": { "type": "string" },
"orderId": { "type": "string" },
"amount": { "type": "integer", "description": "Optional partial capture amount" }
},
"required": ["userName", "password", "orderId"]
}
}
}
},
"responses": {
"200": {
"description": "Payment captured successfully"
}
}
}
},
"/reverse.do": {
"post": {
"summary": "Reverse Payment",
"description": "Reverses an authorized or unpaid order.",
"tags": ["Pre-Authorization"],
"requestBody": {
"required": true,
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"userName": { "type": "string" },
"password": { "type": "string" },
"orderId": { "type": "string" }
},
"required": ["userName", "password", "orderId"]
}
}
}
},
"responses": {
"200": {
"description": "Order reversed successfully"
}
}
}
},
"/refund.do": {
"post": {
"summary": "Refund Payment",
"description": "Refunds a captured payment (full or partial).",
"tags": ["Payment"],
"requestBody": {
"required": true,
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"userName": { "type": "string" },
"password": { "type": "string" },
"orderId": { "type": "string" },
"amount": { "type": "integer", "description": "Refund amount (optional for full refund)" }
},
"required": ["userName", "password", "orderId"]
}
}
}
},
"responses": {
"200": {
"description": "Refund processed successfully"
}
}
}
},
"/getOrderStatusExtended.do": {
"get": {
"summary": "Get Extended Order Status",
"description": "Returns detailed information about an order including card details and processing data.",
"tags": ["Payment"],
"parameters": [
{ "name": "orderId", "in": "query", "required": true, "schema": { "type": "string" } },
{ "name": "userName", "in": "query", "required": true, "schema": { "type": "string" } },
{ "name": "password", "in": "query", "required": true, "schema": { "type": "string" } }
],
"responses": {
"200": {
"description": "Extended order status returned successfully"
}
}
}
}
},
"servers": [
{
"url": "https://test.clictopay.com/payment/rest",
"description": "Sandbox environment"
},
{
"url": "https://ipay.clictopay.com/payment/rest",
"description": "Production environment"
}
],
"tags": [
{
"name": "Payment",
"description": "Operations related to direct payment transactions"
},
{
"name": "Pre-Authorization",
"description": "Operations related to pre-authorization, capture, and reversal of payments"
}
],
"components": {}
}