- METHOD TYPEReal-Time Bank Transfer
- PAYMENTS
- PAYOUTS
- REFUNDS
- RECURRING
Introduction
MX Payouts is a withdrawal-only method that combines options to process payouts either via STPMEX or via BBVA (Paymentez integration). The traffic split can be done according to the end user bank by using a traffic management rule.
Supported Countries
- Mexico
Supported Currencies
- MXN
Payout (Withdrawal) Flow
REST API
The following two methods can be used to process a /payout request with STPmex:
- By collecting the customer’s bank account details using the
/accountCapturemethod. - By creating a UPO, which represents the customer’s bank account details, with the
/addUPOAPMmethod.
Press tab to open…
- Generate a
sessionToken. Press here for details. - Send an
/accountCapturerequest that includes the following mandatory fields as shown in the example request below:userTokenId– Unique customer identifier in merchant system.paymentMethod: “apmgw_MX_Payouts“currencyCode: MXNcountryCode: MX
Example
/accountCaptureRequest{ "sessionToken": "<sessionToken from /getSessionToken>", "merchantId": "<your merchantId>", "merchantSiteId": "<your merchantSiteId>", "userTokenId": "<unique customer identifier in merchant system>", "paymentMethod": "apmgw_MX_Payouts", "currencyCode": "MXN", "countryCode": "MX", }The request returns a
redirectUrl.Example
/accountCaptureResponse{ "redirectUrl":"https://ppp-test.safecharge.com/ppp/acs/get.do?cccid=111&country=MX&language=en&amount=100¤cy=MXN&ReturnURL=https%3a%2f%2ftest.safecharge.com%2fAPMNotificationGateway%2fSTPmex%2fSTPmexRedirectWithdrawResponse.ashx&APMTransactionID=404EE9CD3BBDDD2622BECE95DA936FF1&AccountInfo5=+", "userTokenId":"1810test", "sessionToken":"89c762b7-06c6-45f4-8517-0e335350d0e3", "internalRequestId":603948068, "status":"SUCCESS", "errCode":0, "reason":"", "merchantId":"221195993304907999", "merchantSiteId":"232618", "version":"1.0" }
- Use
redirectUrlto redirect the customer to the APM’s account details capture interface for them to enter their account details. - Once the information is captured, Nuvei stores the data in a
userPaymentOptionId(UPO) identifier, and sends a with the newly createduserPaymentOptionIdtourlDetails.notificationUrl, which Nuvei recommends including in the/accountCapturerequest. - Send a
/payoutrequest and include theuserPaymentOptionId, which contains the user’s previously stored APM account details. Press here for an example.
1. Register a userTokenId
A userTokenId is a field in the Nuvei system containing the user’s identifier in the merchant system.
If you do not have a userTokenId registered in the Nuvei system for this user, then register one by sending a /createUser request, including email, countryCode, firstName, and lastName.
Example /createUser Request
{
"merchantId":"<your merchantId>",
"merchantSiteId":"<your merchantSiteId>",
"clientRequestId":"<unique request ID in merchant system>",
"userTokenId":"<unique user identifier in merchant system>",
"email":"[email protected]",
"countryCode":"<2-letter ISO country code>",
"firstName":"John",
"lastName":"Smith",
"timeStamp":"<YYYYMMDDHHmmss>",
"checksum":"<calculated checksum>"
}
Example /createUser Response
{
"userId":78403498,
"internalRequestId":552360538,
"status":"SUCCESS",
"errCode":0,
"reason":"",
"merchantId":"2439523627382132721",
"merchantSiteId":"224428",
"version":"1.0",
"clientRequestId":"20221108130736"
}
The request registers the userTokenId (userId) in the Nuvei system, which is needed to generate a userPaymentOptionId in the next step.
2. Create the UPO
Create a UPO by sending an /addUPOAPM request and include:
userTokenId– The unique user identifier in your system.paymentMethodName: “apmgw_MX_Payouts“apmDataclass containing:beneficiaryBank– Press here to see list of supportedbeneficiaryBankcodes.beneficiaryNamebeneficiaryNumberbeneficiaryType
billingAddressclass containing:countryandemail
Example /addUPOAPM Request
{
"merchantId":"<your merchantId>",
"merchantSiteId":"<your merchantSiteId>",
"clientRequestId":"<unique request ID in merchant system>",
"userTokenId":"<unique customer identifier in merchant system>",
"paymentMethodName":"apmgw_MX_Payouts",
"apmData": {
"beneficiaryBank": "<supported beneficiary bank code>",
"beneficiaryName": "John Smith",
"beneficiaryNumber": "<CLABE number>",
"beneficiaryType": "40"
},
"billingAddress":{
"country":"MX",
"email":"[email protected]"
},
"timeStamp":"<YYYYMMDDHHmmss>",
"checksum":"<calculated checksum>"
}
The request returns an encrypted userPaymentOptionId representing the user’s APM account details.
Example /addUPOAPM Response
{
"userPaymentOptionId":83458468,
"internalRequestId":553078068,
"status":"SUCCESS",
"errCode":0,
"reason":"",
"merchantId":"2439523627382132721",
"merchantSiteId":"224428",
"version":"1.0",
"clientRequestId":"20221109154215"
}
3. Send a /payout Request
Send a /payout request and include the userPaymentOptionId, which contains the user’s previously stored APM account details. Press here for an example.
-
/accountCapture -
- Generate a
sessionToken. Press here for details. - Send an
/accountCapturerequest that includes the following mandatory fields as shown in the example request below:userTokenId– Unique customer identifier in merchant system.paymentMethod: “apmgw_MX_Payouts“currencyCode: MXNcountryCode: MX
Example
/accountCaptureRequest{ "sessionToken": "<sessionToken from /getSessionToken>", "merchantId": "<your merchantId>", "merchantSiteId": "<your merchantSiteId>", "userTokenId": "<unique customer identifier in merchant system>", "paymentMethod": "apmgw_MX_Payouts", "currencyCode": "MXN", "countryCode": "MX", }The request returns a
redirectUrl.Example
/accountCaptureResponse{ "redirectUrl":"https://ppp-test.safecharge.com/ppp/acs/get.do?cccid=111&country=MX&language=en&amount=100¤cy=MXN&ReturnURL=https%3a%2f%2ftest.safecharge.com%2fAPMNotificationGateway%2fSTPmex%2fSTPmexRedirectWithdrawResponse.ashx&APMTransactionID=404EE9CD3BBDDD2622BECE95DA936FF1&AccountInfo5=+", "userTokenId":"1810test", "sessionToken":"89c762b7-06c6-45f4-8517-0e335350d0e3", "internalRequestId":603948068, "status":"SUCCESS", "errCode":0, "reason":"", "merchantId":"221195993304907999", "merchantSiteId":"232618", "version":"1.0" }
- Use
redirectUrlto redirect the customer to the APM’s account details capture interface for them to enter their account details. - Once the information is captured, Nuvei stores the data in a
userPaymentOptionId(UPO) identifier, and sends a with the newly createduserPaymentOptionIdtourlDetails.notificationUrl, which Nuvei recommends including in the/accountCapturerequest. - Send a
/payoutrequest and include theuserPaymentOptionId, which contains the user’s previously stored APM account details. Press here for an example.
- Generate a
-
/addUPOAPM -
1. Register a
userTokenIdA
userTokenIdis a field in the Nuvei system containing the user’s identifier in the merchant system.If you do not have a
userTokenIdregistered in the Nuvei system for this user, then register one by sending a/createUserrequest, includingemail,countryCode,firstName, andlastName.Example
/createUserRequest{ "merchantId":"<your merchantId>", "merchantSiteId":"<your merchantSiteId>", "clientRequestId":"<unique request ID in merchant system>", "userTokenId":"<unique user identifier in merchant system>", "email":"[email protected]", "countryCode":"<2-letter ISO country code>", "firstName":"John", "lastName":"Smith", "timeStamp":"<YYYYMMDDHHmmss>", "checksum":"<calculated checksum>" }Example
/createUserResponse{ "userId":78403498, "internalRequestId":552360538, "status":"SUCCESS", "errCode":0, "reason":"", "merchantId":"2439523627382132721", "merchantSiteId":"224428", "version":"1.0", "clientRequestId":"20221108130736" }The request registers the
userTokenId(userId) in the Nuvei system, which is needed to generate auserPaymentOptionIdin the next step.2. Create the UPO
Create a UPO by sending an
/addUPOAPMrequest and include:userTokenId– The unique user identifier in your system.paymentMethodName: “apmgw_MX_Payouts“apmDataclass containing:beneficiaryBank– Press here to see list of supportedbeneficiaryBankcodes.beneficiaryNamebeneficiaryNumberbeneficiaryType
billingAddressclass containing:countryandemail
Example
/addUPOAPMRequest{ "merchantId":"<your merchantId>", "merchantSiteId":"<your merchantSiteId>", "clientRequestId":"<unique request ID in merchant system>", "userTokenId":"<unique customer identifier in merchant system>", "paymentMethodName":"apmgw_MX_Payouts", "apmData": { "beneficiaryBank": "<supported beneficiary bank code>", "beneficiaryName": "John Smith", "beneficiaryNumber": "<CLABE number>", "beneficiaryType": "40" }, "billingAddress":{ "country":"MX", "email":"[email protected]" }, "timeStamp":"<YYYYMMDDHHmmss>", "checksum":"<calculated checksum>" }The request returns an encrypted
userPaymentOptionIdrepresenting the user’s APM account details.Example
/addUPOAPMResponse{ "userPaymentOptionId":83458468, "internalRequestId":553078068, "status":"SUCCESS", "errCode":0, "reason":"", "merchantId":"2439523627382132721", "merchantSiteId":"224428", "version":"1.0", "clientRequestId":"20221109154215" }3. Send a
/payoutRequestSend a
/payoutrequest and include theuserPaymentOptionId, which contains the user’s previously stored APM account details. Press here for an example.
After the transaction is processed, Nuvei sends a DMN that includes the result of the transaction to the URL provided in urlDetails.notificationUrl, which Nuvei recommends including in the /payout request.
Web SDK
When performing a Withdrawal with SPEI, the following two methods can be used to process a Withdrawal request: accountCapture() or addApmUpo().
For information about the Withdrawal flow for WebSDK, see Withdrawal.
Press tab to open…
The following flow describes how to capture a user’s account details before processing a payout request using Nuvei Web SDK integration.
1. Initiate a Session
Before you can submit payment using the client-side Nuvei Web SDK, you need to send the /openOrder API call.
2. Initialize the Web SDK
Instantiate the Web SDK with the sessionToken received from the server call to /openOrder.
3. Send an accountCapture() request
a. Send an accountCapture() request that includes the following mandatory fields (as shown in the example request below):
userTokenId– Unique customer identifier in merchant system.paymentMethod: “apmgw_MX_Payouts“currencyCodecountryCode
Example accountCapture() Request
sfc.accountCapture({
sessionToken: "<sessiontoken>",
merchantId: "<your merchantId>",
merchantSiteId: "<your merchantSiteId>",
paymentMethod: "apmgw_MX_Payouts",
userTokenId: "<unique customer identifier in merchant system>",
currencyCode: "MXN",
countryCode: "MX",
languageCode: "en",
urlDetails:{
successUrl:"<URL the customer is directed to after a successful transaction>",
pendingUrl:"<URL the customer is directed to when the transaction response is pending>",
failureUrl:"<URL the customer is directed to after an unsuccessful transaction>",
notificationUrl:"<URL to which DMNs are sent>"
},
sourceApplication: "WebSDK"
}, function(accountRes) {
console.log(accountRes);
})
The request returns a redirectUrl.
Example accountCapture() Response
{
"redirectUrl": "<redirect URL to enter account details>",
"userTokenId": "bankCaptureUser4",
"sessionToken": "e44a932a-e9fc-4482-a570-cf07175408e0",
"internalRequestId": 23238261,
"status": "SUCCESS",
"errCode": 0,
"reason": "",
"merchantId": "8256777005602846935",
"merchantSiteId": "112106",
"version": "1.0"
}
b. Use the redirectUrl to redirect the customer to the APM’s account details interface, to enter their account details.
c. Once the information is captured, Nuvei stores the data in a UPO record, and sends a DMN with the newly created userPaymentOptionId to urlDetails.notificationUrl, which Nuvei recommends including in the /accountCapture request.
4. Send a /payout Request
Send a /payout request and include the userPaymentOptionId, which contains the user’s previously stored APM account details. Press here for an example.
1. Register a userTokenId
A userTokenId is a field in the Nuvei system containing the user’s identifier in the merchant system.
If you do not have a userTokenId registered in the Nuvei system for this user, then register one by sending a /createUser request, including email, countryCode, firstName, and lastName.
Example /createUser Request
{
"merchantId":"<your merchantId>",
"merchantSiteId":"<your merchantSiteId>",
"clientRequestId":"<unique request ID in merchant system>",
"userTokenId":"<unique user identifier in merchant system>",
"email":"[email protected]",
"countryCode":"<2-letter ISO country code>",
"firstName":"John",
"lastName":"Smith",
"timeStamp":"<YYYYMMDDHHmmss>",
"checksum":"<calculated checksum>"
}
Example /createUser Response
{
"userId":78403498,
"internalRequestId":552360538,
"status":"SUCCESS",
"errCode":0,
"reason":"",
"merchantId":"2439523627382132721",
"merchantSiteId":"224428",
"version":"1.0",
"clientRequestId":"20221108130736"
}
The request registers the userTokenId (userId) in the Nuvei system, which is needed to generate a userPaymentOptionId in the next step.
2. Create the UPO
Create a UPO by sending an addApmUpo() request and include:
userTokenId– The unique user identifier in your system.paymentMethodName: “apmgw_MX_Payouts“apmDataclass containing:beneficiaryBank– Press here to see list of supportedbeneficiaryBankcodes.beneficiaryNamebeneficiaryNumberbeneficiaryType
billingAddressclass containing:countryandemail
Example addApmUpo() Request
function addApmUpo() {
sfc.addApmUpo({
"paymentMethodName": "apmgw_MX_Payouts",
"apmData": {
"beneficiaryBank": "<supported beneficiary bank code>",
"beneficiaryName": "John Smith",
"beneficiaryNumber": "<CLABE number>",
"beneficiaryType": "40"
},
billingAddress: { // optional
email: '[email protected]',
country: 'MX'
} },
function(result) {
console.log(result);
})
The request returns an encrypted userPaymentOptionId representing the user’s APM account details.
Example addApmUpo() Response
{
"result": "ADDED",
"errCode": 0,
"errorDescription": "",
"userPaymentOptionId": "14958143",
"cancelled": false
}
3. Send a /payout Request
Send a /payout request and include the userPaymentOptionId, which contains the user’s previously stored APM account details. Press here for an example.
-
accountCapture() -
The following flow describes how to capture a user’s account details before processing a payout request using Nuvei Web SDK integration.
1. Initiate a Session
Before you can submit payment using the client-side Nuvei Web SDK, you need to send the /openOrder API call.
2. Initialize the Web SDK
Instantiate the Web SDK with the
sessionTokenreceived from the server call to/openOrder.3. Send an
accountCapture()requesta. Send an
accountCapture()request that includes the following mandatory fields (as shown in the example request below):userTokenId– Unique customer identifier in merchant system.paymentMethod: “apmgw_MX_Payouts“currencyCodecountryCode
Example
accountCapture()Requestsfc.accountCapture({ sessionToken: "<sessiontoken>", merchantId: "<your merchantId>", merchantSiteId: "<your merchantSiteId>", paymentMethod: "apmgw_MX_Payouts", userTokenId: "<unique customer identifier in merchant system>", currencyCode: "MXN", countryCode: "MX", languageCode: "en", urlDetails:{ successUrl:"<URL the customer is directed to after a successful transaction>", pendingUrl:"<URL the customer is directed to when the transaction response is pending>", failureUrl:"<URL the customer is directed to after an unsuccessful transaction>", notificationUrl:"<URL to which DMNs are sent>" }, sourceApplication: "WebSDK" }, function(accountRes) { console.log(accountRes); })The request returns a
redirectUrl.Example
accountCapture()Response{ "redirectUrl": "<redirect URL to enter account details>", "userTokenId": "bankCaptureUser4", "sessionToken": "e44a932a-e9fc-4482-a570-cf07175408e0", "internalRequestId": 23238261, "status": "SUCCESS", "errCode": 0, "reason": "", "merchantId": "8256777005602846935", "merchantSiteId": "112106", "version": "1.0" }b. Use the
redirectUrlto redirect the customer to the APM’s account details interface, to enter their account details.c. Once the information is captured, Nuvei stores the data in a UPO record, and sends a DMN with the newly created
userPaymentOptionIdtourlDetails.notificationUrl, which Nuvei recommends including in the/accountCapturerequest.4. Send a
/payoutRequestSend a
/payoutrequest and include theuserPaymentOptionId, which contains the user’s previously stored APM account details. Press here for an example. -
addApmUpo() -
1. Register a
userTokenIdA
userTokenIdis a field in the Nuvei system containing the user’s identifier in the merchant system.If you do not have a
userTokenIdregistered in the Nuvei system for this user, then register one by sending a/createUserrequest, includingemail,countryCode,firstName, andlastName.Example
/createUserRequest{ "merchantId":"<your merchantId>", "merchantSiteId":"<your merchantSiteId>", "clientRequestId":"<unique request ID in merchant system>", "userTokenId":"<unique user identifier in merchant system>", "email":"[email protected]", "countryCode":"<2-letter ISO country code>", "firstName":"John", "lastName":"Smith", "timeStamp":"<YYYYMMDDHHmmss>", "checksum":"<calculated checksum>" }Example
/createUserResponse{ "userId":78403498, "internalRequestId":552360538, "status":"SUCCESS", "errCode":0, "reason":"", "merchantId":"2439523627382132721", "merchantSiteId":"224428", "version":"1.0", "clientRequestId":"20221108130736" }The request registers the
userTokenId(userId) in the Nuvei system, which is needed to generate auserPaymentOptionIdin the next step.2. Create the UPO
Create a UPO by sending an
addApmUpo()request and include:userTokenId– The unique user identifier in your system.paymentMethodName: “apmgw_MX_Payouts“apmDataclass containing:beneficiaryBank– Press here to see list of supportedbeneficiaryBankcodes.beneficiaryNamebeneficiaryNumberbeneficiaryType
billingAddressclass containing:countryandemail
Example
addApmUpo()Requestfunction addApmUpo() { sfc.addApmUpo({ "paymentMethodName": "apmgw_MX_Payouts", "apmData": { "beneficiaryBank": "<supported beneficiary bank code>", "beneficiaryName": "John Smith", "beneficiaryNumber": "<CLABE number>", "beneficiaryType": "40" }, billingAddress: { // optional email: '[email protected]', country: 'MX' } }, function(result) { console.log(result); })The request returns an encrypted
userPaymentOptionIdrepresenting the user’s APM account details.Example
addApmUpo()Response{ "result": "ADDED", "errCode": 0, "errorDescription": "", "userPaymentOptionId": "14958143", "cancelled": false }3. Send a
/payoutRequestSend a
/payoutrequest and include theuserPaymentOptionId, which contains the user’s previously stored APM account details. Press here for an example.
After the transaction is processed, Nuvei sends a DMN that includes the result of the transaction to the URL provided in urlDetails.notificationUrl, which Nuvei recommends including in the /payout request.
User Experience
Payout
- The user is redirected to an account capture page.
- In Account type, the user selects CLABE and then enters the CLABE number.

- Once the user submits the form, a withdrawal request is created.
Testing
Full flow testing is not possible in an integration environment.
Appendix
Bank Codes
The supported codes for beneficiaryBank are presented in the table below.
| Bank | Code |
|---|---|
| BANXICO | 2001 |
| BANCOMEXT | 37006 |
| BANOBRAS | 37009 |
| BANJERCITO | 37019 |
| NAFIN | 37135 |
| BaBien | 37166 |
| HIPOTECARIA FED | 37168 |
| BANAMEX | 40002 |
| BBVA MEXICO | 40012 |
| SANTANDER | 40014 |
| HSBC | 40021 |
| BAJIO | 40030 |
| INBURSA | 40036 |
| MIFEL | 40042 |
| SCOTIABANK | 40044 |
| BANREGIO | 40058 |
| INVEX | 40059 |
| BANSI | 40060 |
| AFIRME | 40062 |
| BANORTE | 40072 |
| BANK OF AMERICA | 40106 |
| MUFG | 40108 |
| JP MORGAN | 40110 |
| BMONEX | 40112 |
| VE POR MAS | 40113 |
| AZTECA | 40127 |
| AUTOFIN | 40128 |
| BARCLAYS | 40129 |
| COMPARTAMOS | 40130 |
| MULTIVA BANCO | 40132 |
| ACTINVER | 40133 |
| INTERCAM BANCO | 40136 |
| BANCOPPEL | 40137 |
| UALA | 40138 |
| CONSUBANCO | 40140 |
| VOLKSWAGEN | 40141 |
| CIBANCO | 40143 |
| BBASE | 40145 |
| BANKAOOL | 40147 |
| PAGATODO. | 40148 |
| INMOBILIARIO | 40150 |
| DONDE. | 40151 |
| BANCREA | 40152 |
| BANCO COVALTO | 40154 |
| ICBC | 40155 |
| SABADELL | 40156 |
| SHINHAN | 40157 |
| MIZUHO BANK | 40158 |
| BANK OF CHINA | 40159 |
| BANCO S3 | 40160 |
| MONEXCB | 90600 |
| GBM | 90601 |
| MASARI | 90602 |
| VALUE | 90605 |
| VECTOR | 90608 |
| FINAMEX | 90616 |
| VALMEX | 90617 |
| PROFUTURO | 90620 |
| CB INTERCAM | 90630 |
| CI BOLSA | 90631 |
| FINCOMUN | 90634 |
| NU MEXICO | 90638 |
| REFORMA | 90642 |
| STP | 90646 |
| CREDICAPITAL | 90652 |
| KUSPIT | 90653 |
| UNAGRA | 90656 |
| ASP INTEGRA OPC | 90659 |
| ALTERNATIVOS | 90661 |
| LIBERTAD | 90670 |
| CAJA POP MEXICA | 90677 |
| CRISTOBAL COLON | 90680 |
| CAJA TELEFONIST | 90683 |
| TRANSFER | 90684 |
| FONDO (FIRA) | 90685 |
| INVERCAP | 90686 |
| FOMPED | 90689 |
| TESORED | 90703 |
| ARCUS | 90706 |
| NVIO | 90710 |
| Mercado Pago W | 90722 |
| CUENCA | 90723 |
| INDEVAL | 90902 |
| CoDi Valida | 90903 |
| SANTANDER2* | 90814 |
| BANAMEX2 | 91802 |
| BBVA BANCOMER2* | 91812 |
| SANTANDER2* | 91814 |
| HSBC2* | 91821 |
| BANORTE2* | 91872 |
| AZTECA2* | 91927 |
| SPIN BY OXXO | 90728 |
| FONDEADORA | 90699 |
| ALBO | 90721 |
| HEY BANCO | 40167 |