refacil-pay-mcp 1.1.2 → 1.1.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 +425 -20
- package/dist/core/resources.js +11 -11
- package/dist/core/resources.js.map +1 -1
- package/dist/core/tools.js +20 -20
- package/dist/core/tools.js.map +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -194,7 +194,12 @@ kubectl get pods -l app=refacil-pay-mcp
|
|
|
194
194
|
|
|
195
195
|
### `auth_login`
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
To make the request and obtain the login you must have very clear your username and password for each environment where you are going to perform the integration, this information should be requested to our support team ([soportetecnico@refacil.com](https://mailto:soportetecnico@refacil.co)).
|
|
198
|
+
|
|
199
|
+
Within the post you will see below are the fields to make your request
|
|
200
|
+
|
|
201
|
+
> Note that for the consumption of any of the API services it is necessary to send the authentication token that you get when consuming the **auth/login** service as an Authorization indicating the Type and Token.
|
|
202
|
+
The authentication token does not expire. However, if at any time it were to expire, it will be necessary to generate a new authentication token. This could occur due to internal security measures that lead to manual or mass expiration of the token.
|
|
198
203
|
|
|
199
204
|
**Parámetros:**
|
|
200
205
|
|
|
@@ -205,7 +210,17 @@ POST /auth/login
|
|
|
205
210
|
|
|
206
211
|
### `trx_token_generate`
|
|
207
212
|
|
|
208
|
-
|
|
213
|
+
This service allows security validation for the execution of a transaction on the platform, generating a single-use token.
|
|
214
|
+
|
|
215
|
+
> The transactional token service is obtained in three ways, depending on the action to be performed. For this, the value sent in the _**service**_ parameter must be set according to what is required:
|
|
216
|
+
1\. For Payment Link: **“/cash-in/generate/payment-link/token”**.
|
|
217
|
+
2\. For Payment method: **“/cash-in/generate/payment-method/token”**.
|
|
218
|
+
3\. For Withdraw: **“/cash-out/generate/withdraw-method/token”**.
|
|
219
|
+
4\. For Merchant Key: \[ “/merchant-key/create”, “/merchant-key/cancel” \]
|
|
220
|
+
|
|
221
|
+
> The generated token is single-use for each transaction and cannot be consumed more than once. In addition, the transactional token will be valid for 60 seconds.
|
|
222
|
+
|
|
223
|
+
Generates a transactional token for payment link service.
|
|
209
224
|
|
|
210
225
|
**Parámetros:**
|
|
211
226
|
|
|
@@ -215,7 +230,17 @@ POST /trx-token/generate
|
|
|
215
230
|
|
|
216
231
|
### `transactional_token_method`
|
|
217
232
|
|
|
218
|
-
|
|
233
|
+
This service allows security validation for the execution of a transaction on the platform, generating a single-use token.
|
|
234
|
+
|
|
235
|
+
> The transactional token service is obtained in three ways, depending on the action to be performed. For this, the value sent in the _**service**_ parameter must be set according to what is required:
|
|
236
|
+
1\. For Payment Link: **“/cash-in/generate/payment-link/token”**.
|
|
237
|
+
2\. For Payment method: **“/cash-in/generate/payment-method/token”**.
|
|
238
|
+
3\. For Withdraw: **“/cash-out/generate/withdraw-method/token”**.
|
|
239
|
+
4\. For Merchant Key: \[ “/merchant-key/create”, “/merchant-key/cancel” \]
|
|
240
|
+
|
|
241
|
+
> The generated token is single-use for each transaction and cannot be consumed more than once. In addition, the transactional token will be valid for 60 seconds.
|
|
242
|
+
|
|
243
|
+
Generates a transactional token for payment method service.
|
|
219
244
|
|
|
220
245
|
**Parámetros:**
|
|
221
246
|
|
|
@@ -225,7 +250,17 @@ POST /trx-token/generate
|
|
|
225
250
|
|
|
226
251
|
### `transactional_token_withdraw`
|
|
227
252
|
|
|
228
|
-
|
|
253
|
+
This service allows security validation for the execution of a transaction on the platform, generating a single-use token.
|
|
254
|
+
|
|
255
|
+
> The transactional token service is obtained in three ways, depending on the action to be performed. For this, the value sent in the _**service**_ parameter must be set according to what is required:
|
|
256
|
+
1\. For Payment Link: **“/cash-in/generate/payment-link/token”**.
|
|
257
|
+
2\. For Payment method: **“/cash-in/generate/payment-method/token”**.
|
|
258
|
+
3\. For Withdraw: **“/cash-out/generate/withdraw-method/token”**.
|
|
259
|
+
4\. For Merchant Key: \[ “/merchant-key/create”, “/merchant-key/cancel” \]
|
|
260
|
+
|
|
261
|
+
> The generated token is single-use for each transaction and cannot be consumed more than once. In addition, the transactional token will be valid for 60 seconds.
|
|
262
|
+
|
|
263
|
+
Generates a transactional token for withdraw service.
|
|
229
264
|
|
|
230
265
|
**Parámetros:**
|
|
231
266
|
|
|
@@ -235,7 +270,17 @@ POST /trx-token/generate
|
|
|
235
270
|
|
|
236
271
|
### `transactional_token_merchan_key_create`
|
|
237
272
|
|
|
238
|
-
|
|
273
|
+
This service allows security validation for the execution of a transaction on the platform, generating a single-use token.
|
|
274
|
+
|
|
275
|
+
> The transactional token service is obtained in three ways, depending on the action to be performed. For this, the value sent in the _**service**_ parameter must be set according to what is required:
|
|
276
|
+
1\. For Payment Link: **“/cash-in/generate/payment-link/token”**.
|
|
277
|
+
2\. For Payment method: **“/cash-in/generate/payment-method/token”**.
|
|
278
|
+
3\. For Withdraw: **“/cash-out/generate/withdraw-method/token”**.
|
|
279
|
+
4\. For Merchant Key: \[ “/merchant-key/create”, “/merchant-key/cancel” \]
|
|
280
|
+
|
|
281
|
+
> The generated token is single-use for each transaction and cannot be consumed more than once. In addition, the transactional token will be valid for 60 seconds.
|
|
282
|
+
|
|
283
|
+
Generates a transactional token for creating merchant keys.
|
|
239
284
|
|
|
240
285
|
**Parámetros:**
|
|
241
286
|
|
|
@@ -245,7 +290,17 @@ POST /trx-token/generate
|
|
|
245
290
|
|
|
246
291
|
### `transactional_token_merchant_key_cancel`
|
|
247
292
|
|
|
248
|
-
|
|
293
|
+
This service allows security validation for the execution of a transaction on the platform, generating a single-use token.
|
|
294
|
+
|
|
295
|
+
> The transactional token service is obtained in three ways, depending on the action to be performed. For this, the value sent in the _**service**_ parameter must be set according to what is required:
|
|
296
|
+
1\. For Payment Link: **“/cash-in/generate/payment-link/token”**.
|
|
297
|
+
2\. For Payment method: **“/cash-in/generate/payment-method/token”**.
|
|
298
|
+
3\. For Withdraw: **“/cash-out/generate/withdraw-method/token”**.
|
|
299
|
+
4\. For Merchant Key: \[ “/merchant-key/create”, “/merchant-key/cancel” \]
|
|
300
|
+
|
|
301
|
+
> The generated token is single-use for each transaction and cannot be consumed more than once. In addition, the transactional token will be valid for 60 seconds.
|
|
302
|
+
|
|
303
|
+
Generates a transactional token for canceling merchant keys.
|
|
249
304
|
|
|
250
305
|
**Parámetros:**
|
|
251
306
|
|
|
@@ -255,7 +310,9 @@ POST /trx-token/generate
|
|
|
255
310
|
|
|
256
311
|
### `cash_in_generate_payment_link_token`
|
|
257
312
|
|
|
258
|
-
|
|
313
|
+
With the following request you can obtain a payment resource with a link that will redirect your customer to the payment gateway where he will see a list of the different payment methods available.
|
|
314
|
+
|
|
315
|
+
## 📥 Request Body Parameters
|
|
259
316
|
|
|
260
317
|
| **Field** | **Type** | **Required** | **Description** |
|
|
261
318
|
| --- | --- | --- | --- |
|
|
@@ -609,7 +666,23 @@ This is **not** an error in our platform.
|
|
|
609
666
|
|
|
610
667
|
### `cash_out_generate_withdraw_method_token`
|
|
611
668
|
|
|
612
|
-
This
|
|
669
|
+
This service allows you to generate withdrawal requests through the enabled dispersion means.
|
|
670
|
+
|
|
671
|
+
> 🔐 Authentication
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
All requests must include the following headers:
|
|
675
|
+
|
|
676
|
+
| **Header** | **Description** | **Example** |
|
|
677
|
+
| --- | --- | --- |
|
|
678
|
+
| Authorization | Bearer token generated by the authentication service. | Bearer eyJhbGciOiJIUzI1NiIs... |
|
|
679
|
+
| x-transaction-token | Transactional token specific to the service. | 9b48edde-652d-11ed-984e-02c840fe**** |
|
|
680
|
+
| Content-Type | Content type of the request body. | application/json |
|
|
681
|
+
|
|
682
|
+
> Important fields within the requests:
|
|
683
|
+
Webhook: This is the url of the client's webhook to where our service sends the transaction status and transaction detail information.
|
|
684
|
+
|
|
685
|
+
This endpoint allows you to **generate withdrawal (cash-out) requests** through the available payout methods.
|
|
613
686
|
|
|
614
687
|
---
|
|
615
688
|
|
|
@@ -701,7 +774,23 @@ The `key` field must contain a valid Bre-B account alias in the format `@USERNAM
|
|
|
701
774
|
|
|
702
775
|
### `customer_getbalance`
|
|
703
776
|
|
|
704
|
-
This service allows you to
|
|
777
|
+
This service allows you to generate withdrawal requests through the enabled dispersion means.
|
|
778
|
+
|
|
779
|
+
> 🔐 Authentication
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
All requests must include the following headers:
|
|
783
|
+
|
|
784
|
+
| **Header** | **Description** | **Example** |
|
|
785
|
+
| --- | --- | --- |
|
|
786
|
+
| Authorization | Bearer token generated by the authentication service. | Bearer eyJhbGciOiJIUzI1NiIs... |
|
|
787
|
+
| x-transaction-token | Transactional token specific to the service. | 9b48edde-652d-11ed-984e-02c840fe**** |
|
|
788
|
+
| Content-Type | Content type of the request body. | application/json |
|
|
789
|
+
|
|
790
|
+
> Important fields within the requests:
|
|
791
|
+
Webhook: This is the url of the client's webhook to where our service sends the transaction status and transaction detail information.
|
|
792
|
+
|
|
793
|
+
This service allows you to consult the balance exchange and the dispersion exchange associated with the client's identifier.
|
|
705
794
|
|
|
706
795
|
> To use the service, an authentication token is required, which must be sent as an Authorization header.
|
|
707
796
|
|
|
@@ -723,7 +812,23 @@ Body
|
|
|
723
812
|
|
|
724
813
|
### `payment_transfiya_banks`
|
|
725
814
|
|
|
726
|
-
This service allows you to
|
|
815
|
+
This service allows you to generate withdrawal requests through the enabled dispersion means.
|
|
816
|
+
|
|
817
|
+
> 🔐 Authentication
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
All requests must include the following headers:
|
|
821
|
+
|
|
822
|
+
| **Header** | **Description** | **Example** |
|
|
823
|
+
| --- | --- | --- |
|
|
824
|
+
| Authorization | Bearer token generated by the authentication service. | Bearer eyJhbGciOiJIUzI1NiIs... |
|
|
825
|
+
| x-transaction-token | Transactional token specific to the service. | 9b48edde-652d-11ed-984e-02c840fe**** |
|
|
826
|
+
| Content-Type | Content type of the request body. | application/json |
|
|
827
|
+
|
|
828
|
+
> Important fields within the requests:
|
|
829
|
+
Webhook: This is the url of the client's webhook to where our service sends the transaction status and transaction detail information.
|
|
830
|
+
|
|
831
|
+
This service allows you to consult the balance exchange and the dispersion exchange associated with the client's identifier.
|
|
727
832
|
|
|
728
833
|
> To use the service, an authentication token is required, which must be sent as an Authorization header.
|
|
729
834
|
|
|
@@ -745,7 +850,9 @@ Body
|
|
|
745
850
|
|
|
746
851
|
### `payment_status`
|
|
747
852
|
|
|
748
|
-
|
|
853
|
+
These services will allow us to validate the status of a transaction and consult the characteristics of a payment method.
|
|
854
|
+
|
|
855
|
+
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.
|
|
749
856
|
|
|
750
857
|
In the response you will get the _status_ _id_ which will mean the following
|
|
751
858
|
|
|
@@ -778,7 +885,9 @@ Body
|
|
|
778
885
|
|
|
779
886
|
### `payment_customer_reference_status`
|
|
780
887
|
|
|
781
|
-
|
|
888
|
+
These services will allow us to validate the status of a transaction and consult the characteristics of a payment method.
|
|
889
|
+
|
|
890
|
+
## 🔍 Check Transaction by Customer Reference
|
|
782
891
|
|
|
783
892
|
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:
|
|
784
893
|
|
|
@@ -829,7 +938,9 @@ This endpoint **requires** a valid Bearer Token in the request headers. Requests
|
|
|
829
938
|
|
|
830
939
|
### `payment_features`
|
|
831
940
|
|
|
832
|
-
|
|
941
|
+
These services will allow us to validate the status of a transaction and consult the characteristics of a payment method.
|
|
942
|
+
|
|
943
|
+
This service allows you to consult the necessary characteristics of a payment method to successfully generate a resource. For example, obtain the PSE banks
|
|
833
944
|
|
|
834
945
|
Headers
|
|
835
946
|
|
|
@@ -848,7 +959,109 @@ Body
|
|
|
848
959
|
|
|
849
960
|
### `webhook_notify`
|
|
850
961
|
|
|
851
|
-
|
|
962
|
+
This component must be built by the merchant to receive the transaction notification data.
|
|
963
|
+
|
|
964
|
+
You must take into account the following steps:
|
|
965
|
+
|
|
966
|
+
**1.**You must create a Webhook without authentication.
|
|
967
|
+
|
|
968
|
+
**2\. The** Url created will be the one you send in all requests when generating the payment resource in the “_WebhookUrl_” field. It is important to keep in mind that if for some reason you change the webhook you must modify the urls that you send in each generated resource.
|
|
969
|
+
|
|
970
|
+
<img src="https://content.pstmn.io/10fdac74-e60a-41f2-b9ff-8b5777a7afc0/aW1hZ2UucG5n" width="322" height="117">
|
|
971
|
+
|
|
972
|
+
A signature must be generated to validate the integrity of the messages sent to the webhook and the fields must be concatenated in the following way:
|
|
973
|
+
|
|
974
|
+
_**HASH_KEY**_ _\=This data must be requested to the support area_.
|
|
975
|
+
|
|
976
|
+
_**let signature**_ _\= referenceId-resourceId-amount-updatedAt-HASH_KEY; signature = crypto.createHmac(“sha1”, HASH_KEY).update(signature).digest(“hex”);_
|
|
977
|
+
|
|
978
|
+
Example of a response that will reach your Webhook
|
|
979
|
+
|
|
980
|
+
**Response**
|
|
981
|
+
|
|
982
|
+
``` json
|
|
983
|
+
{
|
|
984
|
+
"realAmount": 20000,
|
|
985
|
+
"amount": 19405,
|
|
986
|
+
"cost": "$595.00",
|
|
987
|
+
"referenceId": "38**",
|
|
988
|
+
"moduleId": 9,
|
|
989
|
+
"productId": 117,
|
|
990
|
+
"referenceKey": "3538d790-ae14-11ed-be2d-4d9b1bc987e6",
|
|
991
|
+
"paymentMethod": "PSE",
|
|
992
|
+
"userId": 189067,
|
|
993
|
+
"resourceId": "10024**",
|
|
994
|
+
"updatedAt": "2023-02-16 11:11:55",
|
|
995
|
+
"providerId": 8,
|
|
996
|
+
"providerReference": "3122330",
|
|
997
|
+
"reference1": "435sdfsd**",
|
|
998
|
+
"reference2": {
|
|
999
|
+
"Label": {
|
|
1000
|
+
"Information": "Por seguridad algunos datos se encuentran cifrados",
|
|
1001
|
+
"Name": "L**A",
|
|
1002
|
+
"Email": "l**am@**",
|
|
1003
|
+
"CellPhone": "3**4",
|
|
1004
|
+
"DocumentType": "C",
|
|
1005
|
+
"DocumentNumber": "52019859",
|
|
1006
|
+
"Description": "Abono",
|
|
1007
|
+
"Commerce": "Skandia",
|
|
1008
|
+
"Reference1": null,
|
|
1009
|
+
"Reference2": null,
|
|
1010
|
+
"Reference3": null
|
|
1011
|
+
},
|
|
1012
|
+
"Data": {
|
|
1013
|
+
"ConciliationCode": "FCO",
|
|
1014
|
+
"ConciliationContract": "1277840",
|
|
1015
|
+
"DocType": "N",
|
|
1016
|
+
"DocNumber": "800194363"
|
|
1017
|
+
},
|
|
1018
|
+
"returnUrl": "https://www.google.com/"
|
|
1019
|
+
},
|
|
1020
|
+
"bankId": "1022",
|
|
1021
|
+
"bankName": "BANCO UNION COLOMBIANO",
|
|
1022
|
+
"status": 2,
|
|
1023
|
+
"transfiyaStatus": "PENDING",
|
|
1024
|
+
"sign": "aa2f472ad7e84524a02d1716b56fc16ec2a87***",
|
|
1025
|
+
"error": {
|
|
1026
|
+
"code": "20-07A",
|
|
1027
|
+
"message": "Error técnico en Lambda"
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
```
|
|
1032
|
+
|
|
1033
|
+
- Within the webhook an **"error** ” object is sent that shows the error _**code**_ and _**message**_ associated with rejections received from the supplier/bank or cancellation of the transaction when the generation of the resource is not completed.
|
|
1034
|
+
|
|
1035
|
+
- The error codes are printed when the transaction is _**Rejected**_ by the bank or when it is _**Cancelled**_ because the resource generation could not be completed.
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
**Notification for Withdraw**
|
|
1039
|
+
|
|
1040
|
+
For withdraws, a notification will be sent to the webhook provided in the application. This notification will follow the structure mentioned above and will additionally include the withdrawal data. An example is provided below:
|
|
1041
|
+
|
|
1042
|
+
``` json
|
|
1043
|
+
{
|
|
1044
|
+
..."webhook",
|
|
1045
|
+
"withdraw": {
|
|
1046
|
+
"id": "1403**",
|
|
1047
|
+
"transactionId": "5690**",
|
|
1048
|
+
"userId": 189067,
|
|
1049
|
+
"providerReference": "3122330",
|
|
1050
|
+
"accountNumber": "3051000002",
|
|
1051
|
+
"accountId": null,
|
|
1052
|
+
"createdAt": "2023-02-16 11:10:55",
|
|
1053
|
+
"updatedAt": "2023-02-16 11:12:55",
|
|
1054
|
+
"deletedAt": null,
|
|
1055
|
+
"infoReference": "435sdfsd**",
|
|
1056
|
+
"observation": null
|
|
1057
|
+
},
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
```
|
|
1061
|
+
|
|
1062
|
+
> _**The implementation of the webhook by the API user is mandatory. The reception and storage of the information for the reconciliation process by the API user with RefácilPay must be ensured.**__**This item will be evaluated during the certification process and will be mandatory for the transition to Production.**_
|
|
1063
|
+
|
|
1064
|
+
Body
|
|
852
1065
|
|
|
853
1066
|
|
|
854
1067
|
|
|
@@ -875,15 +1088,153 @@ Body
|
|
|
875
1088
|
|
|
876
1089
|
### `merchant_enrollment`
|
|
877
1090
|
|
|
878
|
-
This
|
|
1091
|
+
This service allows merchants to enroll for the use of the QR interoperable payment method and key creation.
|
|
1092
|
+
|
|
1093
|
+
To use the service, an authentication token is required and must be sent as an `Authorization` header.
|
|
1094
|
+
|
|
1095
|
+
---
|
|
1096
|
+
|
|
1097
|
+
### **Enrollment Process**
|
|
1098
|
+
|
|
1099
|
+
1. **Merchant Enrollment**
|
|
1100
|
+
|
|
1101
|
+
- Initiates the enrollment process. The enrollment can take up to **7 minutes** to complete.
|
|
1102
|
+
|
|
1103
|
+
2. **Retrieve Enrollment Data**
|
|
1104
|
+
|
|
1105
|
+
- Retrieves the merchant’s enrollment information once the process is completed.
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
---
|
|
1109
|
+
|
|
1110
|
+
### **Merchant Enrollment Statuses**
|
|
1111
|
+
|
|
1112
|
+
- **`approved`**
|
|
1113
|
+
|
|
1114
|
+
The merchant has been approved and is authorized to generate QR codes.
|
|
1115
|
+
|
|
1116
|
+
- **`enrolled_other`**
|
|
1117
|
+
|
|
1118
|
+
The merchant is already enrolled with another entity. To proceed:
|
|
1119
|
+
|
|
1120
|
+
- Contact the commercial representative and request unenrollment from the current entity.
|
|
1121
|
+
|
|
1122
|
+
- Submit a letter signed by the legal representative.
|
|
1123
|
+
|
|
1124
|
+
- Be aware that this process may take up to **5 business days**.
|
|
1125
|
+
|
|
1126
|
+
The commercial representative will provide guidance throughout the process.
|
|
1127
|
+
|
|
1128
|
+
- **`rejected`**
|
|
1129
|
+
|
|
1130
|
+
The merchant has been rejected. Please contact your commercial representative for further details.
|
|
1131
|
+
|
|
1132
|
+
- **`pending`**
|
|
1133
|
+
|
|
1134
|
+
The enrollment is in progress. The query may take a few minutes. If a final status is not received shortly, contact **RefacilPay support** to verify the situation.
|
|
1135
|
+
|
|
1136
|
+
- **`not_started`**
|
|
1137
|
+
|
|
1138
|
+
No enrollment process has been initiated for the requested merchant.
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
---
|
|
1142
|
+
|
|
1143
|
+
### **Important Note on the "cellphone" Field in the Enrollment Process**
|
|
1144
|
+
|
|
1145
|
+
During the merchant creation flow for the QR Interoperable product, the API retrieves the merchant's registered information from the system. However, for the **"cellphone number"** field, the **Refacil** system automatically replaces the merchant’s actual phone number with a **generic alias number**.
|
|
1146
|
+
|
|
1147
|
+
This behavior follows technical and operational requirements from the provider, as the real phone number may already exist in the provider’s databases, potentially causing integration conflicts.
|
|
1148
|
+
|
|
1149
|
+
To avoid these issues, a randomly generated alias is used as a placeholder. This alias is **exclusive to this product** and does **not affect** the merchant’s operation in other services.
|
|
1150
|
+
|
|
1151
|
+
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.
|
|
879
1152
|
|
|
880
1153
|
### `merchant_enrollment_data`
|
|
881
1154
|
|
|
882
|
-
This
|
|
1155
|
+
This service allows merchants to enroll for the use of the QR interoperable payment method and key creation.
|
|
1156
|
+
|
|
1157
|
+
To use the service, an authentication token is required and must be sent as an `Authorization` header.
|
|
1158
|
+
|
|
1159
|
+
---
|
|
1160
|
+
|
|
1161
|
+
### **Enrollment Process**
|
|
1162
|
+
|
|
1163
|
+
1. **Merchant Enrollment**
|
|
1164
|
+
|
|
1165
|
+
- Initiates the enrollment process. The enrollment can take up to **7 minutes** to complete.
|
|
1166
|
+
|
|
1167
|
+
2. **Retrieve Enrollment Data**
|
|
1168
|
+
|
|
1169
|
+
- Retrieves the merchant’s enrollment information once the process is completed.
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
---
|
|
1173
|
+
|
|
1174
|
+
### **Merchant Enrollment Statuses**
|
|
1175
|
+
|
|
1176
|
+
- **`approved`**
|
|
1177
|
+
|
|
1178
|
+
The merchant has been approved and is authorized to generate QR codes.
|
|
1179
|
+
|
|
1180
|
+
- **`enrolled_other`**
|
|
1181
|
+
|
|
1182
|
+
The merchant is already enrolled with another entity. To proceed:
|
|
1183
|
+
|
|
1184
|
+
- Contact the commercial representative and request unenrollment from the current entity.
|
|
1185
|
+
|
|
1186
|
+
- Submit a letter signed by the legal representative.
|
|
1187
|
+
|
|
1188
|
+
- Be aware that this process may take up to **5 business days**.
|
|
1189
|
+
|
|
1190
|
+
The commercial representative will provide guidance throughout the process.
|
|
1191
|
+
|
|
1192
|
+
- **`rejected`**
|
|
1193
|
+
|
|
1194
|
+
The merchant has been rejected. Please contact your commercial representative for further details.
|
|
1195
|
+
|
|
1196
|
+
- **`pending`**
|
|
1197
|
+
|
|
1198
|
+
The enrollment is in progress. The query may take a few minutes. If a final status is not received shortly, contact **RefacilPay support** to verify the situation.
|
|
1199
|
+
|
|
1200
|
+
- **`not_started`**
|
|
1201
|
+
|
|
1202
|
+
No enrollment process has been initiated for the requested merchant.
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
---
|
|
1206
|
+
|
|
1207
|
+
### **Important Note on the "cellphone" Field in the Enrollment Process**
|
|
1208
|
+
|
|
1209
|
+
During the merchant creation flow for the QR Interoperable product, the API retrieves the merchant's registered information from the system. However, for the **"cellphone number"** field, the **Refacil** system automatically replaces the merchant’s actual phone number with a **generic alias number**.
|
|
1210
|
+
|
|
1211
|
+
This behavior follows technical and operational requirements from the provider, as the real phone number may already exist in the provider’s databases, potentially causing integration conflicts.
|
|
1212
|
+
|
|
1213
|
+
To avoid these issues, a randomly generated alias is used as a placeholder. This alias is **exclusive to this product** and does **not affect** the merchant’s operation in other services.
|
|
1214
|
+
|
|
1215
|
+
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.
|
|
883
1216
|
|
|
884
1217
|
### `merchant_key_create`
|
|
885
1218
|
|
|
886
|
-
|
|
1219
|
+
These services allow merchants to create and manage their Bre-b keys.
|
|
1220
|
+
|
|
1221
|
+
To use these services, an authentication token is required, which must be sent as an authorization header.
|
|
1222
|
+
|
|
1223
|
+
---
|
|
1224
|
+
|
|
1225
|
+
⚠ **Important**: Before using this payment method, the merchant enrollment process must be completed. Detailed instructions can be found in the **Merchant Enrollment** section.
|
|
1226
|
+
|
|
1227
|
+
**🔄 Open resource:** The creation of a key functions as an open resource, which means that once the Bre-b key has been generated, the user can receive multiple transactions through it.
|
|
1228
|
+
|
|
1229
|
+
---
|
|
1230
|
+
|
|
1231
|
+
### Recommendations
|
|
1232
|
+
|
|
1233
|
+
- API users are strongly encouraged to **implement additional application-level validations** to detect, identify, and manage multiple payment records originating from a Bre-b key.
|
|
1234
|
+
|
|
1235
|
+
- **Actively monitor transactions** originating from generated keys and validate the status of operations before confirming payment to the end user.
|
|
1236
|
+
|
|
1237
|
+
This endpoint will allow you to create 4 types of keys: `alias`, `email`, `cellphone`, and `document`.
|
|
887
1238
|
|
|
888
1239
|
⚠ **Important**:
|
|
889
1240
|
|
|
@@ -922,7 +1273,25 @@ Body
|
|
|
922
1273
|
|
|
923
1274
|
### `merchant_key_cancel`
|
|
924
1275
|
|
|
925
|
-
|
|
1276
|
+
These services allow merchants to create and manage their Bre-b keys.
|
|
1277
|
+
|
|
1278
|
+
To use these services, an authentication token is required, which must be sent as an authorization header.
|
|
1279
|
+
|
|
1280
|
+
---
|
|
1281
|
+
|
|
1282
|
+
⚠ **Important**: Before using this payment method, the merchant enrollment process must be completed. Detailed instructions can be found in the **Merchant Enrollment** section.
|
|
1283
|
+
|
|
1284
|
+
**🔄 Open resource:** The creation of a key functions as an open resource, which means that once the Bre-b key has been generated, the user can receive multiple transactions through it.
|
|
1285
|
+
|
|
1286
|
+
---
|
|
1287
|
+
|
|
1288
|
+
### Recommendations
|
|
1289
|
+
|
|
1290
|
+
- API users are strongly encouraged to **implement additional application-level validations** to detect, identify, and manage multiple payment records originating from a Bre-b key.
|
|
1291
|
+
|
|
1292
|
+
- **Actively monitor transactions** originating from generated keys and validate the status of operations before confirming payment to the end user.
|
|
1293
|
+
|
|
1294
|
+
This endpoint allows you to cancel an existing key, which will then become inactive and unable to receive transactions.
|
|
926
1295
|
|
|
927
1296
|
Headers
|
|
928
1297
|
|
|
@@ -944,7 +1313,25 @@ Body
|
|
|
944
1313
|
|
|
945
1314
|
### `merchant_key_generate_otp`
|
|
946
1315
|
|
|
947
|
-
|
|
1316
|
+
These services allow merchants to create and manage their Bre-b keys.
|
|
1317
|
+
|
|
1318
|
+
To use these services, an authentication token is required, which must be sent as an authorization header.
|
|
1319
|
+
|
|
1320
|
+
---
|
|
1321
|
+
|
|
1322
|
+
⚠ **Important**: Before using this payment method, the merchant enrollment process must be completed. Detailed instructions can be found in the **Merchant Enrollment** section.
|
|
1323
|
+
|
|
1324
|
+
**🔄 Open resource:** The creation of a key functions as an open resource, which means that once the Bre-b key has been generated, the user can receive multiple transactions through it.
|
|
1325
|
+
|
|
1326
|
+
---
|
|
1327
|
+
|
|
1328
|
+
### Recommendations
|
|
1329
|
+
|
|
1330
|
+
- API users are strongly encouraged to **implement additional application-level validations** to detect, identify, and manage multiple payment records originating from a Bre-b key.
|
|
1331
|
+
|
|
1332
|
+
- **Actively monitor transactions** originating from generated keys and validate the status of operations before confirming payment to the end user.
|
|
1333
|
+
|
|
1334
|
+
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.
|
|
948
1335
|
|
|
949
1336
|
Headers
|
|
950
1337
|
|
|
@@ -964,7 +1351,25 @@ Body
|
|
|
964
1351
|
|
|
965
1352
|
### `merchant_key_get_keys`
|
|
966
1353
|
|
|
967
|
-
|
|
1354
|
+
These services allow merchants to create and manage their Bre-b keys.
|
|
1355
|
+
|
|
1356
|
+
To use these services, an authentication token is required, which must be sent as an authorization header.
|
|
1357
|
+
|
|
1358
|
+
---
|
|
1359
|
+
|
|
1360
|
+
⚠ **Important**: Before using this payment method, the merchant enrollment process must be completed. Detailed instructions can be found in the **Merchant Enrollment** section.
|
|
1361
|
+
|
|
1362
|
+
**🔄 Open resource:** The creation of a key functions as an open resource, which means that once the Bre-b key has been generated, the user can receive multiple transactions through it.
|
|
1363
|
+
|
|
1364
|
+
---
|
|
1365
|
+
|
|
1366
|
+
### Recommendations
|
|
1367
|
+
|
|
1368
|
+
- API users are strongly encouraged to **implement additional application-level validations** to detect, identify, and manage multiple payment records originating from a Bre-b key.
|
|
1369
|
+
|
|
1370
|
+
- **Actively monitor transactions** originating from generated keys and validate the status of operations before confirming payment to the end user.
|
|
1371
|
+
|
|
1372
|
+
This endpoint allows you to obtain all keys created and in active status that belong to the merchant.
|
|
968
1373
|
|
|
969
1374
|
|
|
970
1375
|
## 📝 Logs
|
package/dist/core/resources.js
CHANGED
|
@@ -23,7 +23,7 @@ export const resources = [
|
|
|
23
23
|
"name": "Transactional token - Documentation",
|
|
24
24
|
"description": "This service allows security validation for the execution of a transaction on the platform, generating a single-use token.\n\n> The transactional token service is obtained in three ways, depending on the action to be performed. For this, the value sent in the _**service**_ parameter must be set according to what is required: \n1\\. For Payment Link: **“/cash-in/generate/payment-link/token”**. \n2\\. For Payment method: **“/cash-in/generate/payment-method/token”**. \n3\\. For Withdraw: **“/cash-out/generate/withdraw-method/token”**. \n4\\. For Merchant Key: \\[ “/merchant-key/create”, “/merchant-key/cancel” \\] \n \n> The generated token is single-use for each transaction and cannot be consumed more than once. In addition, the transactional token will be valid for 60 seconds.",
|
|
25
25
|
"mimeType": "text/markdown",
|
|
26
|
-
"content": "# Transactional token\n\nThis service allows security validation for the execution of a transaction on the platform, generating a single-use token.\n\n> The transactional token service is obtained in three ways, depending on the action to be performed. For this, the value sent in the _**service**_ parameter must be set according to what is required: \n1\\. For Payment Link: **“/cash-in/generate/payment-link/token”**. \n2\\. For Payment method: **“/cash-in/generate/payment-method/token”**. \n3\\. For Withdraw: **“/cash-out/generate/withdraw-method/token”**. \n4\\. For Merchant Key: \\[ “/merchant-key/create”, “/merchant-key/cancel” \\] \n \n> The generated token is single-use for each transaction and cannot be consumed more than once. In addition, the transactional token will be valid for 60 seconds.\n\n## Endpoints\n\n### Transactional token link\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string |
|
|
26
|
+
"content": "# Transactional token\n\nThis service allows security validation for the execution of a transaction on the platform, generating a single-use token.\n\n> The transactional token service is obtained in three ways, depending on the action to be performed. For this, the value sent in the _**service**_ parameter must be set according to what is required: \n1\\. For Payment Link: **“/cash-in/generate/payment-link/token”**. \n2\\. For Payment method: **“/cash-in/generate/payment-method/token”**. \n3\\. For Withdraw: **“/cash-out/generate/withdraw-method/token”**. \n4\\. For Merchant Key: \\[ “/merchant-key/create”, “/merchant-key/cancel” \\] \n \n> The generated token is single-use for each transaction and cannot be consumed more than once. In addition, the transactional token will be valid for 60 seconds.\n\n## Endpoints\n\n### Transactional token link\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\nGenerates a transactional token for payment link service.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/cash-in/generate/payment-link/token` |\n\n### Transactional token method\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\nGenerates a transactional token for payment method service.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/cash-in/payment-method/token` |\n\n### Transactional token withdraw\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\nGenerates a transactional token for withdraw service.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/cash-out/generate/withdraw-method/token` |\n\n### Transactional token merchan key create\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\nGenerates a transactional token for creating merchant keys.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/merchant-key/create` |\n\n### Transactional token merchant key cancel\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\nGenerates a transactional token for canceling merchant keys.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/merchant-key/cancel` |\n\n"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"uri": "postman://collection/refacil-pay-api/folder/payments",
|
|
@@ -84,37 +84,37 @@ export const resources = [
|
|
|
84
84
|
{
|
|
85
85
|
"uri": "postman://collection/refacil-pay-api/endpoint/post/trx-token/generate",
|
|
86
86
|
"name": "POST /trx-token/generate - Endpoint Documentation",
|
|
87
|
-
"description": "| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string |
|
|
87
|
+
"description": "Generates a transactional token for payment link service.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/cash-in/generate/payment-link/token` |",
|
|
88
88
|
"mimeType": "text/markdown",
|
|
89
|
-
"content": "# Transactional token link\n\n## Request Details\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\n## Description\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string |
|
|
89
|
+
"content": "# Transactional token link\n\n## Request Details\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\n## Description\n\nGenerates a transactional token for payment link service.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/cash-in/generate/payment-link/token` |\n\n## Headers\n\n- **Authorization**: Bearer {{tokenLogin}}\n\n## Request Body\n\n**Type**: `raw`\n\n```json\n{\n \"service\": \"/cash-in/generate/payment-link/token\"\n}\n```\n\n"
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
"uri": "postman://collection/refacil-pay-api/endpoint/post/trx-token/generate",
|
|
93
93
|
"name": "POST /trx-token/generate - Endpoint Documentation",
|
|
94
|
-
"description": "| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string |
|
|
94
|
+
"description": "Generates a transactional token for payment method service.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/cash-in/payment-method/token` |",
|
|
95
95
|
"mimeType": "text/markdown",
|
|
96
|
-
"content": "# Transactional token method\n\n## Request Details\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\n## Description\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string |
|
|
96
|
+
"content": "# Transactional token method\n\n## Request Details\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\n## Description\n\nGenerates a transactional token for payment method service.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/cash-in/payment-method/token` |\n\n## Headers\n\n- **Authorization**: Bearer {{tokenLogin}}\n\n## Request Body\n\n**Type**: `raw`\n\n```json\n{\n \"service\": \"/cash-in/payment-method/token\"\n}\n```\n\n"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"uri": "postman://collection/refacil-pay-api/endpoint/post/trx-token/generate",
|
|
100
100
|
"name": "POST /trx-token/generate - Endpoint Documentation",
|
|
101
|
-
"description": "| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string |
|
|
101
|
+
"description": "Generates a transactional token for withdraw service.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/cash-out/generate/withdraw-method/token` |",
|
|
102
102
|
"mimeType": "text/markdown",
|
|
103
|
-
"content": "# Transactional token withdraw\n\n## Request Details\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\n## Description\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string |
|
|
103
|
+
"content": "# Transactional token withdraw\n\n## Request Details\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\n## Description\n\nGenerates a transactional token for withdraw service.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/cash-out/generate/withdraw-method/token` |\n\n## Headers\n\n- **Authorization**: Bearer {{tokenLogin}}\n\n## Request Body\n\n**Type**: `raw`\n\n```json\n{\n \"service\": \"/cash-out/generate/withdraw-method/token\"\n}\n```\n\n"
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
"uri": "postman://collection/refacil-pay-api/endpoint/post/trx-token/generate",
|
|
107
107
|
"name": "POST /trx-token/generate - Endpoint Documentation",
|
|
108
|
-
"description": "| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string |
|
|
108
|
+
"description": "Generates a transactional token for creating merchant keys.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/merchant-key/create` |",
|
|
109
109
|
"mimeType": "text/markdown",
|
|
110
|
-
"content": "# Transactional token merchan key create\n\n## Request Details\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\n## Description\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string |
|
|
110
|
+
"content": "# Transactional token merchan key create\n\n## Request Details\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\n## Description\n\nGenerates a transactional token for creating merchant keys.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/merchant-key/create` |\n\n## Headers\n\n- **Authorization**: Bearer {{tokenLogin}}\n\n## Request Body\n\n**Type**: `raw`\n\n```json\n{\n \"service\": \"/merchant-key/create\"\n}\n```\n\n"
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
"uri": "postman://collection/refacil-pay-api/endpoint/post/trx-token/generate",
|
|
114
114
|
"name": "POST /trx-token/generate - Endpoint Documentation",
|
|
115
|
-
"description": "| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string |
|
|
115
|
+
"description": "Generates a transactional token for canceling merchant keys.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/merchant-key/cancel` |",
|
|
116
116
|
"mimeType": "text/markdown",
|
|
117
|
-
"content": "# Transactional token merchant key cancel\n\n## Request Details\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\n## Description\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string |
|
|
117
|
+
"content": "# Transactional token merchant key cancel\n\n## Request Details\n\n**Method**: `POST`\n\n**Path**: `/trx-token/generate`\n\n## Description\n\nGenerates a transactional token for canceling merchant keys.\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| **service** \\* | string | MUST be: `/merchant-key/cancel` |\n\n## Headers\n\n- **Authorization**: Bearer {{tokenLogin}}\n\n## Request Body\n\n**Type**: `raw`\n\n```json\n{\n \"service\": \"/merchant-key/cancel\"\n}\n```\n\n"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
"uri": "postman://collection/refacil-pay-api/endpoint/post/cash-in/generate/payment-link/token",
|