refacil-pay-mcp 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -634
- package/dist/core/tools.d.ts +4 -4
- package/dist/core/tools.js +40 -40
- package/dist/core/tools.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -151,14 +151,13 @@ nano .env
|
|
|
151
151
|
| `PORT` | Puerto del servidor | `3009` |
|
|
152
152
|
| `ENVIRONMENT` | Entorno de ejecución | `development` |
|
|
153
153
|
| `BASE_URL` | URL base de la API | `https://pay-api.qa.refacil.co` |
|
|
154
|
-
|
|
155
|
-
|
|
156
154
|
| `USERNAME` | Usuario para autenticación | `your_username_here` |
|
|
157
155
|
| `PASSWORD` | Contraseña para autenticación | `your_password_here` |
|
|
158
156
|
| `AUTH_ENDPOINT` | Endpoint de autenticación | `/auth/login` |
|
|
159
157
|
| `TOKEN_CACHE_TTL` | TTL del caché de tokens (segundos) | `3600` |
|
|
160
158
|
| `MCP_TOKEN` | Token de autenticación del MCP | `mcp-secret-token-refacil-pay` |
|
|
161
159
|
|
|
160
|
+
|
|
162
161
|
## 🐳 Docker
|
|
163
162
|
|
|
164
163
|
```bash
|
|
@@ -190,730 +189,226 @@ kubectl get pods -l app=refacil-pay-mcp
|
|
|
190
189
|
- **`/health`**: Health check del servidor
|
|
191
190
|
- **`/tools`**: Lista de herramientas disponibles
|
|
192
191
|
|
|
193
|
-
### Modo Multi-Usuario (HTTP)
|
|
194
|
-
|
|
195
|
-
El servidor MCP soporta **múltiples usuarios simultáneamente** en modo HTTP mediante el header `X-Secret-ID`.
|
|
196
|
-
|
|
197
|
-
#### ¿Cómo funciona?
|
|
198
|
-
|
|
199
|
-
1. **Sin `X-Secret-ID`**: Usa el `SECRET_ID` del archivo `.env` (modo single-user)
|
|
200
|
-
2. **Con `X-Secret-ID`**: Usa el secretId proporcionado en el header (modo multi-user)
|
|
201
|
-
|
|
202
|
-
#### Ejemplo de uso:
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
# Usuario 1
|
|
206
|
-
curl -X POST http://localhost:3009/mcp \
|
|
207
|
-
-H "Authorization: Bearer mcp-token" \
|
|
208
|
-
-H "X-Secret-ID: user1-secret-id" \
|
|
209
|
-
-H "Content-Type: application/json" \
|
|
210
|
-
-d '{"method": "tools/call", "params": {...}}'
|
|
211
|
-
|
|
212
|
-
# Usuario 2
|
|
213
|
-
curl -X POST http://localhost:3009/mcp \
|
|
214
|
-
-H "Authorization: Bearer mcp-token" \
|
|
215
|
-
-H "X-Secret-ID: user2-secret-id" \
|
|
216
|
-
-H "Content-Type: application/json" \
|
|
217
|
-
-d '{"method": "tools/call", "params": {...}}'
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
#### Ventajas del Modo Multi-Usuario:
|
|
221
|
-
|
|
222
|
-
- ✅ Cada usuario usa sus propias credenciales
|
|
223
|
-
- ✅ Tokens cacheados por secretId (mejor performance)
|
|
224
|
-
- ✅ Un solo servidor para múltiples clientes
|
|
225
|
-
- ✅ Compatible con modo single-user (fallback al .env)
|
|
226
|
-
|
|
227
|
-
#### Configuración para HTTP Multi-Usuario:
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
# .env
|
|
231
|
-
BASE_URL=https://pay-api.qa.refacil.co
|
|
232
|
-
AUTH_ENDPOINT=/auth/login
|
|
233
|
-
TOKEN_CACHE_TTL=3600
|
|
234
|
-
MCP_TOKEN=your-mcp-token
|
|
235
|
-
|
|
236
|
-
# SECRET_ID es opcional en HTTP mode
|
|
237
|
-
# Si no se proporciona, DEBE enviarse via header X-Secret-ID
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### Configuración en IDEs
|
|
241
|
-
|
|
242
|
-
#### Cursor
|
|
243
|
-
```json
|
|
244
|
-
{
|
|
245
|
-
"mcpServers": {
|
|
246
|
-
"refacil-pay-mcp": {
|
|
247
|
-
"command": "node",
|
|
248
|
-
"args": ["/ruta/a/refacil-pay-mcp/dist/index.js"],
|
|
249
|
-
"env": {
|
|
250
|
-
"MCP_TOKEN": "tu-token-secreto"
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
#### Visual Studio Code
|
|
258
|
-
Configurar en la extensión MCP con:
|
|
259
|
-
- **Command**: `node`
|
|
260
|
-
- **Args**: `["/ruta/a/refacil-pay-mcp/dist/index.js"]`
|
|
261
|
-
- **Env**: `{"MCP_TOKEN": "tu-token-secreto"}`
|
|
262
192
|
|
|
263
193
|
## 🛠️ Herramientas Disponibles
|
|
264
194
|
|
|
265
|
-
|
|
266
|
-
| --- | --- | --- |
|
|
267
|
-
| **username** \* | string | User |
|
|
268
|
-
| **password** \* | string | Password |
|
|
269
|
-
- **`trx_token_generate`**: | **Name** | **Type** | **Description** |
|
|
270
|
-
| --- | --- | --- |
|
|
271
|
-
| **service** \* | string | Value of the service to be consumed |
|
|
272
|
-
- **`trx_token_generate_3`**: | **Name** | **Type** | **Description** |
|
|
273
|
-
| --- | --- | --- |
|
|
274
|
-
| **service** \* | string | Value of the service to be consumed |
|
|
275
|
-
- **`trx_token_generate_4`**: | **Name** | **Type** | **Description** |
|
|
276
|
-
| --- | --- | --- |
|
|
277
|
-
| **service** \* | string | Value of the service to be consumed |
|
|
278
|
-
- **`trx_token_generate_5`**: | **Name** | **Type** | **Description** |
|
|
279
|
-
| --- | --- | --- |
|
|
280
|
-
| **service** \* | string | Value of the service to be consumed |
|
|
281
|
-
- **`trx_token_generate_6`**: | **Name** | **Type** | **Description** |
|
|
282
|
-
| --- | --- | --- |
|
|
283
|
-
| **service** \* | string | Value of the service to be consumed |
|
|
284
|
-
- **`cash_in_generate_payment_link_token`**: ## 📥 Request Body Parameters
|
|
285
|
-
|
|
286
|
-
| **Field** | **Type** | **Required** | **Description** |
|
|
287
|
-
| --- | --- | --- | --- |
|
|
288
|
-
| `amount` | number | ✅ | Value of the payment. |
|
|
289
|
-
| `brandId` | number | ❌ | ID of the customer's white label; if one is not available, the default ID 79 is sent. |
|
|
290
|
-
| `expiresIn` | number | ❌ | Time in minutes for the expiration of the resource or payment link. |
|
|
291
|
-
| `reference1` | string | ✅ | Customer identifier, must be between 1 and 30 characters. |
|
|
292
|
-
| `reference2` | object | ❌ | Object for additional information. |
|
|
293
|
-
| `reference2.Commerce` | object | ❌ | Object for information related to the store or commerce. |
|
|
294
|
-
| `reference2.Data` | object | ❌ | Object for information related to the conciliation of the transaction. |
|
|
295
|
-
| `reference2.Label` | object | ❌ | Object to send information to be displayed in the payment summary. |
|
|
296
|
-
| `returnUrl` | string | ❌ | Link that the customer will see when clicking on the back to commerce button. |
|
|
297
|
-
| `showSummary` | boolean | ❌ | Indicates whether the RefácilPay payment summary will be shown or not (false: do not show, true: show). Default: true. |
|
|
298
|
-
| `userMetadata` | object | ✅ | Object containing key details about the user or merchant generating the payment resource. |
|
|
299
|
-
| `userMetadata.identifier` | string | ✅ | Unique identifier of the user or merchant generating the payment resource (max 36 characters). |
|
|
300
|
-
| `userMetadata.ip` | string | ✅ | IP address associated with the user's identifier. Must be a valid IP address. |
|
|
301
|
-
| `userMetadata.urlCommerce` | string | ✅ | URL that identifies the commerce. Must follow valid URL structure with http:// or https:// protocol. Maximum length: 500 characters. |
|
|
302
|
-
| `webhookUrl` | string | ✅ | URL of the client's webhook to receive real-time payment status updates. |
|
|
303
|
-
|
|
304
|
-
- **`cash_in_generate_payment_method_token`**: This endpoint allows you to **generate payment requests** through the available _cash-in_ methods.
|
|
305
|
-
|
|
306
|
-
---
|
|
195
|
+
### `auth_login`
|
|
307
196
|
|
|
308
|
-
### 💡 Overview
|
|
309
197
|
|
|
310
|
-
|
|
198
|
+
**Parámetros:**
|
|
311
199
|
|
|
312
|
-
|
|
|
200
|
+
| Name | Type | Description |
|
|
313
201
|
| --- | --- | --- |
|
|
314
|
-
|
|
|
315
|
-
|
|
|
316
|
-
| `133` | Cash-in via **PSE** | 1,800 |
|
|
317
|
-
| `262` | Cash-in via **PSE Gateway** | 1,800 |
|
|
318
|
-
| `134` | Cash-in via **IPay** | 43,200 |
|
|
319
|
-
| `153` | Cash-in via **Recaudo Efectivo** | 86,400 |
|
|
320
|
-
| `155` | Cash-in via **Transfiya Recaudo** | 43,200 |
|
|
321
|
-
| `163` | Cash-in via **TPaga** | 43,200 |
|
|
322
|
-
| `248` | Cash-in via **QR Interoperable** | N/A |
|
|
323
|
-
|
|
324
|
-
> ⚠ **Important:**
|
|
325
|
-
The value provided in the `expiresIn` field **must be greater than or equal** to the minimum expiration defined for the selected payment method.
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
---
|
|
329
|
-
|
|
330
|
-
## 🧩 Payment Method Details
|
|
331
|
-
|
|
332
|
-
Each payment method requires a specific object structure within the `"paymentMethod"` field.
|
|
333
|
-
|
|
334
|
-
---
|
|
335
|
-
|
|
336
|
-
### **Nequi**
|
|
337
|
-
|
|
338
|
-
``` json
|
|
339
|
-
"paymentMethod": {
|
|
340
|
-
"id": 130,
|
|
341
|
-
"cellphone": "3105293225"
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
---
|
|
347
|
-
|
|
348
|
-
### **Daviplata**
|
|
202
|
+
| username | string | Campo del body: username |
|
|
203
|
+
| password | string | Campo del body: password |
|
|
349
204
|
|
|
350
|
-
|
|
351
|
-
"paymentMethod": {
|
|
352
|
-
"id": 131,
|
|
353
|
-
"cellphone": "3208385715"
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
---
|
|
359
|
-
|
|
360
|
-
### **PSE**
|
|
361
|
-
|
|
362
|
-
For this payment method, depending on the `typePerson` selected, only specific document types are accepted:
|
|
363
|
-
|
|
364
|
-
- **`typePerson`****:** **`"0"`** → corresponds to a **Natural Person** and only accepts the following values for `documentType`:
|
|
365
|
-
|
|
366
|
-
- `RCN`
|
|
367
|
-
|
|
368
|
-
- `TI`
|
|
369
|
-
|
|
370
|
-
- `CC`
|
|
371
|
-
|
|
372
|
-
- `TE`
|
|
373
|
-
|
|
374
|
-
- `CE`
|
|
375
|
-
|
|
376
|
-
- `PA`
|
|
377
|
-
|
|
378
|
-
- `DIE`
|
|
379
|
-
|
|
380
|
-
- **`typePerson`****:** **`"1"`** → corresponds to a **Legal Person** and only accepts the following value for `documentType`:
|
|
381
|
-
|
|
382
|
-
- `NIT`
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
``` json
|
|
386
|
-
"paymentMethod": {
|
|
387
|
-
"id": 133,
|
|
388
|
-
"documentType": "CC",
|
|
389
|
-
"typePerson": "0",
|
|
390
|
-
"bankId": "string",
|
|
391
|
-
"documentNumber": "string",
|
|
392
|
-
"name": "string",
|
|
393
|
-
"cellphone": "string",
|
|
394
|
-
"address": "string",
|
|
395
|
-
"email": "string"
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
---
|
|
205
|
+
### `trx_token_generate`
|
|
401
206
|
|
|
402
|
-
### **PSE Gateway**
|
|
403
|
-
|
|
404
|
-
This payment method enables direct integration with the PSE network for processing online bank payments.
|
|
405
|
-
To consume this product, it is required to have the following parameters previously configured and associated with your product:
|
|
406
|
-
|
|
407
|
-
- `entity_code`
|
|
408
|
-
|
|
409
|
-
- `service_code`
|
|
410
|
-
|
|
411
|
-
- `company_ciiu`
|
|
412
|
-
|
|
413
|
-
- `company_name`
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
These parameters identify your company within the PSE network and are necessary for successful transaction routing and validation.
|
|
417
|
-
|
|
418
|
-
> 💬 **For more information or to request these credentials, please contact the support team.**
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
This method follows **the same structure and validation rules** as **PSE**, but must use the following identifier:
|
|
422
|
-
|
|
423
|
-
``` json
|
|
424
|
-
"paymentMethod": {
|
|
425
|
-
"id": 262,
|
|
426
|
-
"documentType": "CC",
|
|
427
|
-
"typePerson": "0",
|
|
428
|
-
"bankId": "string",
|
|
429
|
-
"documentNumber": "string",
|
|
430
|
-
"name": "string",
|
|
431
|
-
"cellphone": "string",
|
|
432
|
-
"address": "string",
|
|
433
|
-
"email": "string"
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
The **PSE integration** relies heavily on the correct configuration of the `showSummary` and `returnUrl` parameters.
|
|
439
|
-
These parameters control the **user experience** and the **finalization flow** of the payment process.
|
|
440
|
-
|
|
441
|
-
| Scenario | `showSummary` | `returnUrl` | Flow Description |
|
|
442
|
-
| --- | --- | --- | --- |
|
|
443
|
-
| **1\. Standard Redirect (Default)** | `true` or not sent | ✅ Present | Displays a transaction summary screen with key payment details and retrieves the final transaction status. After the payment is completed, the user is redirected to the specified `returnUrl`. |
|
|
444
|
-
| **2\. Without Transaction Summary Screen** | `false` | ✅ Present | Skips the transaction summary screen and redirects the user directly to the `returnUrl`. In this case, the merchant’s system must display the transaction summary on the destination page. |
|
|
445
|
-
|
|
446
|
-
> ⚠️ **Note:**
|
|
447
|
-
For **PSE** and **PSE Gateway**, it is **strongly recommended** to use `showSummary: true` along with a valid `returnUrl` to ensure a seamless customer experience and accurate transaction tracking.
|
|
448
|
-
|
|
449
|
-
> 🔗 **See also:**
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
- [Transaction Summary](https://documenter.getpostman.com/view/35146358/2sA3QpDEFA#45e0d76a-fabd-442e-9b17-e2f6b8354ec5)
|
|
453
|
-
|
|
454
|
-
- [Transaction Status](https://documenter.getpostman.com/view/35146358/2sA3QpDEFA#dd3ba9f5-1f10-4109-b59d-6e5aad5e3799)
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
---
|
|
458
207
|
|
|
459
|
-
|
|
208
|
+
**Parámetros:**
|
|
460
209
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
```
|
|
467
|
-
|
|
468
|
-
---
|
|
469
|
-
|
|
470
|
-
### **Recaudo Efectivo**
|
|
210
|
+
| Name | Type | Description |
|
|
211
|
+
| --- | --- | --- |
|
|
212
|
+
| service | string | Campo del body: service |
|
|
471
213
|
|
|
472
|
-
|
|
473
|
-
"paymentMethod": {
|
|
474
|
-
"id": 153
|
|
475
|
-
}
|
|
214
|
+
### `transactional_token_method`
|
|
476
215
|
|
|
477
|
-
```
|
|
478
216
|
|
|
479
|
-
|
|
217
|
+
**Parámetros:**
|
|
480
218
|
|
|
481
|
-
|
|
219
|
+
| Name | Type | Description |
|
|
220
|
+
| --- | --- | --- |
|
|
221
|
+
| service | string | Campo del body: service |
|
|
482
222
|
|
|
483
|
-
|
|
484
|
-
"paymentMethod": {
|
|
485
|
-
"id": 155,
|
|
486
|
-
"cellphone": "3105293225"
|
|
487
|
-
}
|
|
223
|
+
### `transactional_token_withdraw`
|
|
488
224
|
|
|
489
|
-
```
|
|
490
225
|
|
|
491
|
-
|
|
226
|
+
**Parámetros:**
|
|
492
227
|
|
|
493
|
-
|
|
228
|
+
| Name | Type | Description |
|
|
229
|
+
| --- | --- | --- |
|
|
230
|
+
| service | string | Campo del body: service |
|
|
494
231
|
|
|
495
|
-
|
|
232
|
+
### `transactional_token_merchan_key_create`
|
|
496
233
|
|
|
497
|
-
| **Value** | **Description** |
|
|
498
|
-
| --- | --- |
|
|
499
|
-
| `true` | The `url` field returns a link to a **QR code** displaying transaction details. |
|
|
500
|
-
| `false` | The `url` field returns a **deeplink** to open directly in the TPAGA wallet app. |
|
|
501
234
|
|
|
502
|
-
|
|
503
|
-
If `isQr` is not provided, the default behavior is equivalent to `isQr: false`.
|
|
504
|
-
Transactions can only be completed **from a mobile device**.
|
|
505
|
-
If the request is made from a desktop or tablet, it is recommended to send `isQr: true` so the user can scan the QR from a mobile device.
|
|
506
|
-
|
|
235
|
+
**Parámetros:**
|
|
507
236
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
"isQr": false
|
|
512
|
-
}
|
|
237
|
+
| Name | Type | Description |
|
|
238
|
+
| --- | --- | --- |
|
|
239
|
+
| service | string | Campo del body: service |
|
|
513
240
|
|
|
514
|
-
|
|
241
|
+
### `transactional_token_merchant_key_cancel`
|
|
515
242
|
|
|
516
|
-
---
|
|
517
243
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
For this method, the following fields are **optional**:
|
|
521
|
-
|
|
522
|
-
- `cellphone`
|
|
523
|
-
|
|
524
|
-
- `documentNumber`
|
|
525
|
-
|
|
526
|
-
- `documentType`
|
|
527
|
-
|
|
528
|
-
- `merchantId`
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
The service can function using only the payment method ID; however, providing these optional fields can **improve response time**.
|
|
532
|
-
You may retrieve this data through the `enrollment-data` service in the [Merchant Enrollment](https://documenter.getpostman.com/view/35146358/2sA3QpDEFA#8c9f5a18-a19a-4b8f-baba-cd7501aa29a0) section.
|
|
533
|
-
|
|
534
|
-
> ⚠ **Prerequisite:**
|
|
535
|
-
The merchant must complete the **Merchant Enrollment** process before using this method.
|
|
536
|
-
See the _Merchant Enrollment_ section for setup details.
|
|
537
|
-
|
|
538
|
-
> 🔁 **Open Resource:**
|
|
539
|
-
The **QR Interoperable** operates as an _open resource_, meaning the generated QR can be used multiple times by the same user.
|
|
540
|
-
|
|
541
|
-
> ⚙️ **Technical Note — Dynamic QR Behavior:**
|
|
542
|
-
Dynamic QR codes may be scanned multiple times due to current limitations in the Redeban system.
|
|
543
|
-
This is **not** an error in our platform.
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
#### Behavior Details
|
|
547
|
-
|
|
548
|
-
- Redeban does not automatically invalidate a dynamic QR after its first scan.
|
|
549
|
-
|
|
550
|
-
- As a result, the same QR may generate multiple transaction records.
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
#### Recommendations
|
|
554
|
-
|
|
555
|
-
- Implement **application-level validation** to detect multiple payments from the same QR code.
|
|
556
|
-
|
|
557
|
-
- Monitor dynamic QR transactions and confirm status before marking payments as completed.
|
|
558
|
-
|
|
559
|
-
- Inform end-users to verify the success of a transaction before rescanning.
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
#### Future Considerations
|
|
563
|
-
|
|
564
|
-
- Redeban is evaluating support for **single-use dynamic QR control**.
|
|
565
|
-
|
|
566
|
-
- Stay updated with interoperability provider announcements to adjust integrations accordingly.
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
``` json
|
|
570
|
-
"paymentMethod": {
|
|
571
|
-
"id": 248,
|
|
572
|
-
"cellphone": "string",
|
|
573
|
-
"documentType": "string",
|
|
574
|
-
"documentNumber": "string",
|
|
575
|
-
"merchantId": "string"
|
|
576
|
-
}
|
|
244
|
+
**Parámetros:**
|
|
577
245
|
|
|
578
|
-
|
|
246
|
+
| Name | Type | Description |
|
|
247
|
+
| --- | --- | --- |
|
|
248
|
+
| service | string | Campo del body: service |
|
|
579
249
|
|
|
580
|
-
|
|
250
|
+
### `cash_in_generate_payment_link_token`
|
|
581
251
|
|
|
582
252
|
## 📥 Request Body Parameters
|
|
583
253
|
|
|
584
|
-
|
|
585
|
-
| --- | --- | --- | --- |
|
|
586
|
-
| `amount` | number | ✅ | Value of the payment. |
|
|
587
|
-
| `brandId` | number | ❌ | ID of the customer's white label; if one is not available, the default ID 79 is sent. |
|
|
588
|
-
| `expiresIn` | number | ❌ | Time in seconds for the expiration of the resource or payment link. |
|
|
589
|
-
| `paymentMethod` | object | ✅ | Object specifying the payment method and its details. |
|
|
590
|
-
| `paymentMethod.id` | number | ✅ | ID of the selected payment method (see available payment methods). |
|
|
591
|
-
| `reference1` | string | ✅ | Customer identifier, must be between 1 and 30 characters. |
|
|
592
|
-
| `reference2` | object | ❌ | Object for additional information. |
|
|
593
|
-
| `reference2.Commerce` | object | ❌ | Object for information related to the store or commerce. |
|
|
594
|
-
| `reference2.Data` | object | ❌ | Object for information related to the conciliation of the transaction. |
|
|
595
|
-
| `reference2.Label` | object | ❌ | Object to send information to be displayed in the payment summary. |
|
|
596
|
-
| `returnUrl` | string | ❌ | Link that the customer will see when clicking on the back to commerce button. |
|
|
597
|
-
| `showSummary` | boolean | ❌ | Indicates whether the RefácilPay payment summary will be shown or not (false: do not show, true: show). Default: true. |
|
|
598
|
-
| `userMetadata` | object | ✅ | Object containing key details about the user or merchant generating the payment resource. |
|
|
599
|
-
| `userMetadata.identifier` | string | ✅ | Unique identifier of the user or merchant generating the payment resource (max 36 characters). |
|
|
600
|
-
| `userMetadata.ip` | string | ✅ | IP address associated with the user's identifier. Must be a valid IP address. |
|
|
601
|
-
| `userMetadata.urlCommerce` | string | ✅ | URL that identifies the commerce. Must follow valid URL structure with http:// or https:// protocol. Maximum length: 500 characters. |
|
|
602
|
-
| `webhookUrl` | string | ✅ | URL of the client's webhook to receive real-time payment status updates. |
|
|
603
|
-
- **`cash_out_generate_withdraw_method_token`**: This endpoint allows you to **generate withdrawal (cash-out) requests** through the available payout methods.
|
|
604
|
-
|
|
605
|
-
---
|
|
606
|
-
|
|
607
|
-
### 💡 Overview
|
|
254
|
+
**Parámetros:**
|
|
608
255
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
|
612
|
-
|
|
|
613
|
-
|
|
|
614
|
-
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
---
|
|
621
|
-
|
|
622
|
-
## 🧩 Payout Method Details
|
|
256
|
+
| Name | Type | Description |
|
|
257
|
+
| --- | --- | --- |
|
|
258
|
+
| expiresIn | number | Campo del body: expiresIn |
|
|
259
|
+
| amount | number | Campo del body: amount |
|
|
260
|
+
| brandId | number | Campo del body: brandId |
|
|
261
|
+
| webhookUrl | string | Campo del body: webhookUrl |
|
|
262
|
+
| userMetadata | object | Campo del body: userMetadata |
|
|
263
|
+
| returnUrl | string | Campo del body: returnUrl |
|
|
264
|
+
| reference1 | string | Campo del body: reference1 |
|
|
265
|
+
| reference2 | object | Campo del body: reference2 |
|
|
623
266
|
|
|
624
|
-
###
|
|
267
|
+
### `cash_in_generate_payment_method_token`
|
|
625
268
|
|
|
626
|
-
``` json
|
|
627
|
-
"withdrawMethod": {
|
|
628
|
-
"id": 245,
|
|
629
|
-
"cellphone": "3125763074"
|
|
630
|
-
}
|
|
269
|
+
This endpoint allows you to **generate payment requests** through the available _cash-in_ methods. ### 💡 Overview The table below lists the available payment methods along with their corresponding IDs and **minimum expiration times** (`expiresIn`) required when creating a payment request. > ⚠ **Important:** The value provided in the `expiresIn` field **must be greater than or equal** to the minimum expiration defined for the selected payment method. ## 🧩 Payment Method Details Each payment method requires a specific object structure within the `"paymentMethod"` field. ### **Nequi** ``` json "paymentMethod": { "id": 130, "cellphone": "3105293225" } ``` ### **Daviplata** ``` json "paymentMethod": { "id": 131, "cellphone": "3208385715" } ``` ### **PSE** For this payment method, depending on the `typePerson` selected, only specific document types are accepted: - **`typePerson`****:** **`"0"`** → corresponds to a **Natural Person** and only accepts the following values for `documentType`: - `RCN` - `TI` - `CC` - `TE` - `CE` - `PA` - `DIE` - **`typePerson`****:** **`"1"`** → corresponds to a **Legal Person** and only accepts the following value for `documentType`: - `NIT` ``` json "paymentMethod": { "id": 133, "documentType": "CC", "typePerson": "0", "bankId": "string", "documentNumber": "string", "name": "string", "cellphone": "string", "address": "string", "email": "string" } ``` ### **PSE Gateway** This payment method enables direct integration with the PSE network for processing online bank payments. To consume this product, it is required to have the following parameters previously configured and associated with your product: - `entity_code` - `service_code` - `company_ciiu` - `company_name` These parameters identify your company within the PSE network and are necessary for successful transaction routing and validation. > 💬 **For more information or to request these credentials, please contact the support team.** This method follows **the same structure and validation rules** as **PSE**, but must use the following identifier: ``` json "paymentMethod": { "id": 262, "documentType": "CC", "typePerson": "0", "bankId": "string", "documentNumber": "string", "name": "string", "cellphone": "string", "address": "string", "email": "string" } ``` The **PSE integration** relies heavily on the correct configuration of the `showSummary` and `returnUrl` parameters. These parameters control the **user experience** and the **finalization flow** of the payment process. > ⚠️ **Note:** For **PSE** and **PSE Gateway**, it is **strongly recommended** to use `showSummary: true` along with a valid `returnUrl` to ensure a seamless customer experience and accurate transaction tracking. > 🔗 **See also:** - [Transaction Summary](https://documenter.getpostman.com/view/35146358/2sA3QpDEFA#45e0d76a-fabd-442e-9b17-e2f6b8354ec5) - [Transaction Status](https://documenter.getpostman.com/view/35146358/2sA3QpDEFA#dd3ba9f5-1f10-4109-b59d-6e5aad5e3799) ### **IPay** ``` json "paymentMethod": { "id": 134 } ``` ### **Recaudo Efectivo** ``` json "paymentMethod": { "id": 153 } ``` ### **Transfiya Recaudo** ``` json "paymentMethod": { "id": 155, "cellphone": "3105293225" } ``` ### **TPaga** This payment method supports an optional parameter called `isQr`, which determines the type of resource returned in the `url` field: > 🧠 **Behavior:** If `isQr` is not provided, the default behavior is equivalent to `isQr: false`. Transactions can only be completed **from a mobile device**. If the request is made from a desktop or tablet, it is recommended to send `isQr: true` so the user can scan the QR from a mobile device. ``` json "paymentMethod": { "id": 163, "isQr": false } ``` ### **QR Interoperable** For this method, the following fields are **optional**: - `cellphone` - `documentNumber` - `documentType` - `merchantId` The service can function using only the payment method ID; however, providing these optional fields can **improve response time**. You may retrieve this data through the `enrollment-data` service in the [Merchant Enrollment](https://documenter.getpostman.com/view/35146358/2sA3QpDEFA#8c9f5a18-a19a-4b8f-baba-cd7501aa29a0) section. > ⚠ **Prerequisite:** The merchant must complete the **Merchant Enrollment** process before using this method. See the _Merchant Enrollment_ section for setup details. > 🔁 **Open Resource:** The **QR Interoperable** operates as an _open resource_, meaning the generated QR can be used multiple times by the same user. > ⚙️ **Technical Note — Dynamic QR Behavior:** Dynamic QR codes may be scanned multiple times due to current limitations in the Redeban system. This is **not** an error in our platform. #### Behavior Details - Redeban does not automatically invalidate a dynamic QR after its first scan. - As a result, the same QR may generate multiple transaction records. #### Recommendations - Implement **application-level validation** to detect multiple payments from the same QR code. - Monitor dynamic QR transactions and confirm status before marking payments as completed. - Inform end-users to verify the success of a transaction before rescanning. #### Future Considerations - Redeban is evaluating support for **single-use dynamic QR control**. - Stay updated with interoperability provider announcements to adjust integrations accordingly. ``` json "paymentMethod": { "id": 248, "cellphone": "string", "documentType": "string", "documentNumber": "string", "merchantId": "string" } ``` ## 📥 Request Body Parameters
|
|
631
270
|
|
|
632
|
-
|
|
271
|
+
**Parámetros:**
|
|
633
272
|
|
|
634
|
-
|
|
635
|
-
|
|
273
|
+
| Name | Type | Description |
|
|
274
|
+
| --- | --- | --- |
|
|
275
|
+
| expiresIn | number | Campo del body: expiresIn |
|
|
276
|
+
| paymentMethod | object | Campo del body: paymentMethod |
|
|
277
|
+
| userMetadata | object | Campo del body: userMetadata |
|
|
278
|
+
| amount | number | Campo del body: amount |
|
|
279
|
+
| brandId | number | Campo del body: brandId |
|
|
280
|
+
| webhookUrl | string | Campo del body: webhookUrl |
|
|
281
|
+
| returnUrl | string | Campo del body: returnUrl |
|
|
282
|
+
| showSummary | boolean | Campo del body: showSummary |
|
|
283
|
+
| reference1 | string | Campo del body: reference1 |
|
|
284
|
+
| reference2 | object | Campo del body: reference2 |
|
|
636
285
|
|
|
637
|
-
|
|
638
|
-
Ensure the cellphone number is registered with Transfiya and capable of receiving funds.
|
|
639
|
-
|
|
286
|
+
### `cash_out_generate_withdraw_method_token`
|
|
640
287
|
|
|
641
|
-
|
|
288
|
+
This endpoint allows you to **generate withdrawal (cash-out) requests** through the available payout methods. ### 💡 Overview The table below lists the available payout methods along with their corresponding IDs and brief descriptions. > ⚠ **Note:** Each withdrawal method requires a specific object structure within the `"withdrawMethod"` field, as shown below. ## 🧩 Payout Method Details ### **Transfiya** ``` json "withdrawMethod": { "id": 245, "cellphone": "3125763074" } ``` **Description:** Transfers funds to a recipient using their registered Transfiya cellphone number. > ⚠ **Important:** Ensure the cellphone number is registered with Transfiya and capable of receiving funds. ### **Bre-B** ``` json "withdrawMethod": { "id": 264, "key": "@REPRUEBAL7717" } ``` **Description:** Transfers funds directly to a Bre-B account using the beneficiary’s unique Bre-B key. > 💡 **Tip:** The `key` field must contain a valid Bre-B account alias in the format `@USERNAME`. ## 📥 Request Body Parameters
|
|
642
289
|
|
|
643
|
-
|
|
290
|
+
**Parámetros:**
|
|
644
291
|
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
292
|
+
| Name | Type | Description |
|
|
293
|
+
| --- | --- | --- |
|
|
294
|
+
| amount | number | Campo del body: amount |
|
|
295
|
+
| reference1 | string | Campo del body: reference1 |
|
|
296
|
+
| bankName | string | Campo del body: bankName |
|
|
297
|
+
| webhookRequest | string | Campo del body: webhookRequest |
|
|
298
|
+
| withdrawMethod | object | Campo del body: withdrawMethod |
|
|
299
|
+
| userMetadata | object | Campo del body: userMetadata |
|
|
650
300
|
|
|
651
|
-
|
|
301
|
+
### `customer_getbalance`
|
|
652
302
|
|
|
653
|
-
|
|
654
|
-
Transfers funds directly to a Bre-B account using the beneficiary’s unique Bre-B key.
|
|
303
|
+
This service allows you to consult the balance exchange and the dispersion exchange associated with the client's identifier. > To use the service, an authentication token is required, which must be sent as an Authorization header. Headers Body
|
|
655
304
|
|
|
656
|
-
|
|
657
|
-
The `key` field must contain a valid Bre-B account alias in the format `@USERNAME`.
|
|
658
|
-
|
|
305
|
+
**Parámetros:**
|
|
659
306
|
|
|
660
|
-
|
|
307
|
+
| Name | Type | Description |
|
|
308
|
+
| --- | --- | --- |
|
|
309
|
+
| userId | number | Campo del body: userId |
|
|
661
310
|
|
|
662
|
-
|
|
311
|
+
### `payment_transfiya_banks`
|
|
663
312
|
|
|
664
|
-
|
|
665
|
-
| --- | --- | --- | --- |
|
|
666
|
-
| `amount` | number | ✅ | Amount to be withdrawn. |
|
|
667
|
-
| `reference1` | string | ✅ | Unique transaction reference generated by the client (max 20 characters). |
|
|
668
|
-
| `webhookRequest` | string | ✅ | Customer’s webhook URL to receive real-time withdrawal status updates. |
|
|
669
|
-
| `userMetadata` | object | ✅ | Object containing metadata related to the origin of the transaction. |
|
|
670
|
-
| `userMetadata.identifier` | string | ✅ | Identifier for the user or merchant initiating the transaction. |
|
|
671
|
-
| `userMetadata.ip` | string | ✅ | IP address from which the transaction was initiated. |
|
|
672
|
-
| `userMetadata.urlCommerce` | string | ✅ | Commerce or customer’s URL associated with the transaction. |
|
|
673
|
-
| `withdrawMethod` | object | ✅ | Object specifying the withdrawal method and destination details. |
|
|
674
|
-
| `withdrawMethod.id` | number | ✅ | ID of the selected payout method (see table above). |
|
|
675
|
-
| `withdrawMethod.cellphone` | string | Conditional | Required for **Transfiya** withdrawals. |
|
|
676
|
-
| `withdrawMethod.key` | string | Conditional | Required for **Bre-B** withdrawals. |
|
|
677
|
-
| `withdrawMethod.bankName` | string | ❌ | Optional bank name, if applicable for future payout methods. |
|
|
313
|
+
This service allows you to consult the balance exchange and the dispersion exchange associated with the client's identifier. > To use the service, an authentication token is required, which must be sent as an Authorization header. Headers Body
|
|
678
314
|
|
|
679
|
-
|
|
680
|
-
- **`customer_getbalance`**: This service allows you to consult the balance exchange and the dispersion exchange associated with the client's identifier.
|
|
315
|
+
**Parámetros:**
|
|
681
316
|
|
|
682
|
-
|
|
683
|
-
|
|
317
|
+
| Name | Type | Description |
|
|
318
|
+
| --- | --- | --- |
|
|
319
|
+
| cellphone | string | Campo del body: cellphone |
|
|
684
320
|
|
|
685
|
-
|
|
321
|
+
### `payment_status`
|
|
686
322
|
|
|
687
|
-
|
|
688
|
-
| --- | --- |
|
|
689
|
-
| Content-Type | application/json |
|
|
690
|
-
| Authorization | Bearer |
|
|
323
|
+
This service allows you to check the status of a transaction made, for this you must have the _reference_ data that returned the response when generating any payment resource. In the response you will get the _status_ _id_ which will mean the following 0 - Transaction Rejected 1 - Pending Transaction 2 - Transaction Approved 3 - Failed Transaction 5 - Transaction Cancelled 9 - Processing Transaction Headers Body
|
|
691
324
|
|
|
692
|
-
|
|
325
|
+
**Parámetros:**
|
|
693
326
|
|
|
694
327
|
| Name | Type | Description |
|
|
695
328
|
| --- | --- | --- |
|
|
696
|
-
|
|
|
697
|
-
- **`payment_transfiya_banks`**: This service allows you to consult the balance exchange and the dispersion exchange associated with the client's identifier.
|
|
329
|
+
| reference | string | Campo del body: reference |
|
|
698
330
|
|
|
699
|
-
|
|
700
|
-
|
|
331
|
+
### `payment_customer_reference_status`
|
|
701
332
|
|
|
702
|
-
|
|
333
|
+
## 🔍 Check Transaction by Customer Reference This endpoint allows **API Pay** users to query the status of a transaction using only the `customerReference` value originally provided when generating a resource as `reference1` through any of the following endpoints: - `/cash-in/generate/payment-link/token` - `/cash-in/generate/payment-method/token` - `/cash-out/generate/withdraw-method/token` This service is useful for retrieving the internal **Refacil** transaction information associated with a previously submitted customer reference. ## 🔐 Authentication This endpoint **requires** a valid Bearer Token in the request headers. Requests without valid authentication will be rejected with an `Unauthorized` error. ## 📤 Successful Response - `exists`: `true` indicates that the transaction associated with the provided `customerReference` was found. - `id`: Internal Refacil transaction ID. - `status`: Transaction status code (see table below). - `reference`: Full Refacil transaction reference, which can be used to query `/payment/status`. ### ℹ️ Status Code Reference
|
|
703
334
|
|
|
704
|
-
|
|
705
|
-
| --- | --- |
|
|
706
|
-
| Content-Type | application/json |
|
|
707
|
-
| Authorization | Bearer |
|
|
708
|
-
|
|
709
|
-
Body
|
|
335
|
+
**Parámetros:**
|
|
710
336
|
|
|
711
337
|
| Name | Type | Description |
|
|
712
338
|
| --- | --- | --- |
|
|
713
|
-
|
|
|
714
|
-
- **`payment_status`**: This service allows you to check the status of a transaction made, for this you must have the _reference_ data that returned the response when generating any payment resource.
|
|
715
|
-
|
|
716
|
-
In the response you will get the _status_ _id_ which will mean the following
|
|
717
|
-
|
|
718
|
-
0 - Transaction Rejected
|
|
719
|
-
|
|
720
|
-
1 - Pending Transaction
|
|
339
|
+
| customerReference | string | Campo del body: customerReference |
|
|
721
340
|
|
|
722
|
-
|
|
341
|
+
### `payment_features`
|
|
723
342
|
|
|
724
|
-
|
|
343
|
+
This service allows you to consult the necessary characteristics of a payment method to successfully generate a resource. For example, obtain the PSE banks Headers Body
|
|
725
344
|
|
|
726
|
-
|
|
345
|
+
**Parámetros:**
|
|
727
346
|
|
|
728
|
-
|
|
347
|
+
| Name | Type | Description |
|
|
348
|
+
| --- | --- | --- |
|
|
349
|
+
| id | number | Campo del body: id |
|
|
729
350
|
|
|
730
|
-
|
|
351
|
+
### `webhook_notify`
|
|
731
352
|
|
|
732
|
-
|
|
733
|
-
| --- | --- |
|
|
734
|
-
| Content-Type | application/json |
|
|
735
|
-
| Authorization | Bearer |
|
|
353
|
+
Body ## TransfiYa Status ### Transfer state machine <img src="https://content.pstmn.io/89f89557-2e1b-44c2-8dcb-d9e7d2f32c54/aW1hZ2UucG5n" width="293" height="380">
|
|
736
354
|
|
|
737
|
-
|
|
355
|
+
**Parámetros:**
|
|
738
356
|
|
|
739
357
|
| Name | Type | Description |
|
|
740
358
|
| --- | --- | --- |
|
|
741
|
-
|
|
|
742
|
-
- **`payment_customer_reference_status`**: ## 🔍 Check Transaction by Customer Reference
|
|
743
|
-
|
|
744
|
-
This endpoint allows **API Pay** users to query the status of a transaction using only the `customerReference` value originally provided when generating a resource as `reference1` through any of the following endpoints:
|
|
359
|
+
| reference | string | Campo del body: reference |
|
|
745
360
|
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
- `/cash-in/generate/payment-method/token`
|
|
749
|
-
|
|
750
|
-
- `/cash-out/generate/withdraw-method/token`
|
|
751
|
-
|
|
361
|
+
### `merchant_enrollment`
|
|
752
362
|
|
|
753
|
-
This
|
|
754
|
-
|
|
755
|
-
---
|
|
363
|
+
This endpoint initiates the merchant enrollment process required to use the QR interoperable payment method. Once the request is made, the enrollment process may take up to **7 minutes** to complete.
|
|
756
364
|
|
|
757
|
-
|
|
365
|
+
### `merchant_enrollment_data`
|
|
758
366
|
|
|
759
|
-
This endpoint
|
|
367
|
+
This endpoint retrieves the merchant's enrollment details after the enrollment process has been completed. It provides necessary information to use the QR interoperable payment method.
|
|
760
368
|
|
|
761
|
-
|
|
369
|
+
### `merchant_key_create`
|
|
762
370
|
|
|
763
|
-
- `
|
|
764
|
-
|
|
765
|
-
- `id`: Internal Refacil transaction ID.
|
|
766
|
-
|
|
767
|
-
- `status`: Transaction status code (see table below).
|
|
768
|
-
|
|
769
|
-
- `reference`: Full Refacil transaction reference, which can be used to query `/payment/status`.
|
|
770
|
-
|
|
371
|
+
This endpoint will allow you to create 4 types of keys: `alias`, `email`, `cellphone`, and `document`. ⚠ **Important**: - **Alias key:** To generate this key, it is not necessary to send the `key` field and the `otp` field. A random key is generated from various parameters of the merchant user, beginning with the character @. - **Document key:** To generate this key, it is not necessary to send the `otp` field, and the key field must contain the document provided in the technical data sheet shared with the merchant. - **Email key:** To generate this key, you must first use the service that generates and sends the OTP to the `email` address. The key field must contain the `email` address provided in the technical data sheet. - **Cellphone key:** To generate this key, you must first use the service that generates and sends the OTP to the `cellphone`. The key field must contain the `cellphone` number provided in the technical data sheet. Headers Body
|
|
771
372
|
|
|
772
|
-
|
|
373
|
+
**Parámetros:**
|
|
773
374
|
|
|
774
|
-
|
|
|
775
|
-
| --- | --- |
|
|
776
|
-
|
|
|
777
|
-
|
|
|
778
|
-
|
|
|
779
|
-
|
|
|
780
|
-
|
|
|
781
|
-
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
- **`payment_features`**: This service allows you to consult the necessary characteristics of a payment method to successfully generate a resource. For example, obtain the PSE banks
|
|
375
|
+
| Name | Type | Description |
|
|
376
|
+
| --- | --- | --- |
|
|
377
|
+
| webhookUrl | string | Campo del body: webhookUrl |
|
|
378
|
+
| reference1 | string | Campo del body: reference1 |
|
|
379
|
+
| reference2 | object | Campo del body: reference2 |
|
|
380
|
+
| userMetadata | object | Campo del body: userMetadata |
|
|
381
|
+
| typeKey | string | Campo del body: typeKey |
|
|
382
|
+
| key | string | Campo del body: key |
|
|
383
|
+
| otp | string | Campo del body: otp |
|
|
384
|
+
| termsAndConditions | boolean | Campo del body: termsAndConditions |
|
|
785
385
|
|
|
786
|
-
|
|
386
|
+
### `merchant_key_cancel`
|
|
787
387
|
|
|
788
|
-
|
|
789
|
-
| --- | --- |
|
|
790
|
-
| Content-Type | application/json |
|
|
791
|
-
| Authorization | Bearer |
|
|
388
|
+
This endpoint allows you to cancel an existing key, which will then become inactive and unable to receive transactions. Headers Body
|
|
792
389
|
|
|
793
|
-
|
|
390
|
+
**Parámetros:**
|
|
794
391
|
|
|
795
392
|
| Name | Type | Description |
|
|
796
393
|
| --- | --- | --- |
|
|
797
|
-
|
|
|
798
|
-
|
|
394
|
+
| userMetadata | object | Campo del body: userMetadata |
|
|
395
|
+
| key | string | Campo del body: key |
|
|
799
396
|
|
|
800
|
-
|
|
801
|
-
| --- | --- | --- |
|
|
802
|
-
| amount\* | Integer | Total transaction value |
|
|
803
|
-
| cost\* | Integer | Transaction cost |
|
|
804
|
-
| Resource | Object | Object |
|
|
805
|
-
| id | Integer | Identifier of the payment resource |
|
|
806
|
-
| updatedAt | String | Date and time at which the transaction was processed |
|
|
807
|
-
| status\* | Object | Transaction status identifier |
|
|
808
|
-
| transfiyaStatus | String | The TransfiYa status, see the details below |
|
|
809
|
-
| id\* | String | Transaction status ID : 1 Pending , 2 Approved ,3 Failed |
|
|
810
|
-
| id \* | Integer | transaction identifier |
|
|
811
|
-
| description | String | Status detail |
|
|
812
|
-
| Key | interger | Key |
|
|
813
|
-
| PaymentMethod | Object | Payment method |
|
|
814
|
-
| id | String | Method identifier |
|
|
815
|
-
| name | String | payment method name |
|
|
816
|
-
| type | String | method |
|
|
817
|
-
| extra | Object | Object |
|
|
818
|
-
| reference1\* | String | Unique reference to the transaction provided when sending the request to generate the resource |
|
|
819
|
-
| reference2 | String | Allows to append extra information provided by the client |
|
|
820
|
-
| reference3 | String | Allows to append extra information provided by the customer |
|
|
821
|
-
| commerceId | String | Commerce identifier |
|
|
822
|
-
| createdAt | String | Date and time the transaction was created |
|
|
823
|
-
| signature | String | Signature generated for webhook notification |
|
|
824
|
-
| data | Object | Object with all data |
|
|
825
|
-
| Transaction | String | |
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
## TransfiYa Status
|
|
829
|
-
|
|
830
|
-
| **transfiyaStatus** | Description |
|
|
831
|
-
| --- | --- |
|
|
832
|
-
| `CREATED` | Transfer is received and queued for processing. |
|
|
833
|
-
| `PENDING` | Transfer is valid and is waiting for the target to accept it. |
|
|
834
|
-
| `ACCEPTED` | Transfer has been accepted by the target, and payment is pending in the target bank. |
|
|
835
|
-
| `COMPLETED` | The payment is valid and completely processed, visible in the receiving bank account. |
|
|
836
|
-
| `REJECTED` | Payment was rejected. |
|
|
837
|
-
| `ERROR` | An error occurred during payment. |
|
|
838
|
-
|
|
839
|
-
### Transfer state machine
|
|
840
|
-
|
|
841
|
-
<img src="https://content.pstmn.io/89f89557-2e1b-44c2-8dcb-d9e7d2f32c54/aW1hZ2UucG5n" width="293" height="380">
|
|
842
|
-
- **`merchant_enrollment`**: This endpoint initiates the merchant enrollment process required to use the QR interoperable payment method. Once the request is made, the enrollment process may take up to **7 minutes** to complete.
|
|
843
|
-
- **`merchant_enrollment_data`**: This endpoint retrieves the merchant's enrollment details after the enrollment process has been completed. It provides necessary information to use the QR interoperable payment method.
|
|
844
|
-
- **`merchant_key_create`**: This endpoint will allow you to create 4 types of keys: `alias`, `email`, `cellphone`, and `document`.
|
|
845
|
-
|
|
846
|
-
⚠ **Important**:
|
|
847
|
-
|
|
848
|
-
- **Alias key:** To generate this key, it is not necessary to send the `key` field and the `otp` field. A random key is generated from various parameters of the merchant user, beginning with the character @.
|
|
849
|
-
|
|
850
|
-
- **Document key:** To generate this key, it is not necessary to send the `otp` field, and the key field must contain the document provided in the technical data sheet shared with the merchant.
|
|
851
|
-
|
|
852
|
-
- **Email key:** To generate this key, you must first use the service that generates and sends the OTP to the `email` address. The key field must contain the `email` address provided in the technical data sheet.
|
|
853
|
-
|
|
854
|
-
- **Cellphone key:** To generate this key, you must first use the service that generates and sends the OTP to the `cellphone`. The key field must contain the `cellphone` number provided in the technical data sheet.
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
Headers
|
|
858
|
-
|
|
859
|
-
| **Name** | **Value** |
|
|
860
|
-
| --- | --- |
|
|
861
|
-
| Content-Type | application/json |
|
|
862
|
-
| Authorization | Bearer |
|
|
863
|
-
| x-transaction-token | 9b48edde-652d-11ed-984e-02c840fe**** |
|
|
864
|
-
|
|
865
|
-
Body
|
|
397
|
+
### `merchant_key_generate_otp`
|
|
866
398
|
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
| `userMetadata`\* | object | Object containing key details about the user or merchant generating the payment resource. |
|
|
871
|
-
| `ip`\* | string | Alphanumeric parameter that provides the IP address associated with the user's identifier |
|
|
872
|
-
| `identifier`\* | string | Alphanumeric parameter of 20 characters specifying the unique identifier of the user or merchant generating the payment resource. |
|
|
873
|
-
| `urlCommerce`\* | string | URL that identifies the commerce. Must follow valid URL structure with http:// or https:// protocol. Maximum length: 500 characters. |
|
|
874
|
-
| `reference1`\* | string | Customer identifier, must not exceed 20 characters. |
|
|
875
|
-
| `reference2` | object | Object for additional information. |
|
|
876
|
-
| `Label` | object | Object to send information to be displayed in the payment summary. |
|
|
877
|
-
| `Data` | object | Object for information related to the conciliation of the transaction. |
|
|
878
|
-
| `typeKey`\* | string | Can be `alias`, `document`, `email`, and `cellphone` |
|
|
879
|
-
| `key` | string | Key to create |
|
|
880
|
-
| `otp` | string | OTP code for cellphone and email keys |
|
|
881
|
-
| `termsAndConditions`\* | boolean | It must always be set to true. |
|
|
882
|
-
- **`merchant_key_cancel`**: This endpoint allows you to cancel an existing key, which will then become inactive and unable to receive transactions.
|
|
883
|
-
|
|
884
|
-
Headers
|
|
885
|
-
|
|
886
|
-
| **Name** | **Value** |
|
|
887
|
-
| --- | --- |
|
|
888
|
-
| Content-Type | application/json |
|
|
889
|
-
| Authorization | Bearer |
|
|
890
|
-
| x-transaction-token | 9b48edde-652d-11ed-984e-02c840fe**** |
|
|
891
|
-
|
|
892
|
-
Body
|
|
399
|
+
This endpoint will allow you to generate and send an OTP. It is only permitted and necessary for `email` and `cellphone` keys. This OTP will be sent to its corresponding destination. Headers Body
|
|
400
|
+
|
|
401
|
+
**Parámetros:**
|
|
893
402
|
|
|
894
403
|
| Name | Type | Description |
|
|
895
404
|
| --- | --- | --- |
|
|
896
|
-
|
|
|
897
|
-
|
|
|
898
|
-
| `identifier`\* | string | Alphanumeric parameter of 20 characters specifying the unique identifier of the user or merchant generating the payment resource. |
|
|
899
|
-
| `urlCommerce`\* | string | URL that identifies the commerce. Must follow valid URL structure with http:// or https:// protocol. Maximum length: 500 characters. |
|
|
900
|
-
| `key` | string | Key to cancel |
|
|
901
|
-
- **`merchant_key_generate_otp`**: This endpoint will allow you to generate and send an OTP. It is only permitted and necessary for `email` and `cellphone` keys. This OTP will be sent to its corresponding destination.
|
|
902
|
-
|
|
903
|
-
Headers
|
|
405
|
+
| key | string | Campo del body: key |
|
|
406
|
+
| typeKey | string | Campo del body: typeKey |
|
|
904
407
|
|
|
905
|
-
|
|
906
|
-
| --- | --- |
|
|
907
|
-
| Content-Type | application/json |
|
|
908
|
-
| Authorization | Bearer |
|
|
408
|
+
### `merchant_key_get_keys`
|
|
909
409
|
|
|
910
|
-
|
|
410
|
+
This endpoint allows you to obtain all keys created and in active status that belong to the merchant.
|
|
911
411
|
|
|
912
|
-
| Name | Type | Description |
|
|
913
|
-
| --- | --- | --- |
|
|
914
|
-
| `typeKey`\* | string | Can be `email` and `cellphone` |
|
|
915
|
-
| `key` | string | key for which the OTP will be generated |
|
|
916
|
-
- **`merchant_key_get_keys`**: This endpoint allows you to obtain all keys created and in active status that belong to the merchant.
|
|
917
412
|
|
|
918
413
|
## 📝 Logs
|
|
919
414
|
|