Overview
Some APM providers have rigorous validations for the input fields required to authenticate user account details. In order streamline your user experience, Nuvei provides an APM account details capture method (the /accountCapture
method) to help you collect and validate the input fields for those APM providers.
Using the /accountCapture
method returns a URL to redirect the user to capture their account details. The method stores the captured details in a userPaymentOptionId
(UPO) identifier (see User Payment Management – Tokenization), which you can then use to send /payout
requests.
Capturing the Account Details
Press tab to open…
The following flow describes how to capture a user’s account details before processing a payout request using Nuvei REST API integration.
- 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
– See the list of APMs that support/accountCapture
.currencyCode
countryCode
Example
/accountCapture
Request{ "sessionToken":"<sessionToken from getSessionToken>", "merchantId":"<your merchantId>", "merchantSiteId":"<your merchantSiteId>", "paymentMethod":"apmgw_<APM provider name>", "userTokenId":"<unique customer identifier in merchant system>", "currencyCode":"USD", "countryCode":"US", "amount":"200", "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>" }, }
The request returns a
redirectUrl
.Example
/accountCapture
Response{ "sessionToken":"9610a8f6-44cf-4c4f-976a-005da69a2a3b", "merchantId":"427583496191624621", "merchantSiteId":"142033", "redirectUrl":"<redirect URL to enter account details>" }
- Use the
redirectUrl
to redirect the customer to the APM’s account details interface, to enter their account details. - Once the information is captured, Nuvei stores the data in a UPO record, and sends a DMN back to you with the newly created
userPaymentOptionId
.
Example DMN Response
ppp_status=OK userid=139619531 currency=BRL country=BR merchant_site_id=142033 payment_method=apmgw_PayRetailers_Payouts merchant_id=427583496191624621 responseTimeStamp=2021-06-07.07:29:04 user_token_id=KUGOKLLCP52V userPaymentOptionId=8030921 type=ACCOUNT_CAPTURE responsechecksum=dc5d86f3b2248c108b1897bc859cb81c advanceResponseChecksum=00c8cb00622ce0dcae6ad443bea56598
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
– See the list of APMs that support/accountCapture
.currencyCode
countryCode
Example accountCapture()
Request
sfc.accountCapture({ sessionToken: "<sessiontoken>", merchantId: "<your merchantId>", merchantSiteId: "<your merchantSiteId>", paymentMethod: "apmgw_<APM provider name>", userTokenId: "<unique customer identifier in merchant system>", currencyCode: "USD", countryCode: "US", 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 back to you with the newly created userPaymentOptionId
.
Example DMN Response
ppp_status=OK
userid=139619531
currency=BRL
country=BR
merchant_site_id=142033
payment_method=apmgw_PayRetailers_Payouts
merchant_id=427583496191624621
responseTimeStamp=2021-06-07.07:29:04
user_token_id=KUGOKLLCP52V
userPaymentOptionId=8030921
type=ACCOUNT_CAPTURE
responsechecksum=dc5d86f3b2248c108b1897bc859cb81c
advanceResponseChecksum=00c8cb00622ce0dcae6ad443bea56598
- REST API
-
The following flow describes how to capture a user’s account details before processing a payout request using Nuvei REST API integration.
- 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
– See the list of APMs that support/accountCapture
.currencyCode
countryCode
Example
/accountCapture
Request{ "sessionToken":"<sessionToken from getSessionToken>", "merchantId":"<your merchantId>", "merchantSiteId":"<your merchantSiteId>", "paymentMethod":"apmgw_<APM provider name>", "userTokenId":"<unique customer identifier in merchant system>", "currencyCode":"USD", "countryCode":"US", "amount":"200", "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>" }, }
The request returns a
redirectUrl
.Example
/accountCapture
Response{ "sessionToken":"9610a8f6-44cf-4c4f-976a-005da69a2a3b", "merchantId":"427583496191624621", "merchantSiteId":"142033", "redirectUrl":"<redirect URL to enter account details>" }
- Use the
redirectUrl
to redirect the customer to the APM’s account details interface, to enter their account details. - Once the information is captured, Nuvei stores the data in a UPO record, and sends a DMN back to you with the newly created
userPaymentOptionId
.
Example DMN Response
ppp_status=OK userid=139619531 currency=BRL country=BR merchant_site_id=142033 payment_method=apmgw_PayRetailers_Payouts merchant_id=427583496191624621 responseTimeStamp=2021-06-07.07:29:04 user_token_id=KUGOKLLCP52V userPaymentOptionId=8030921 type=ACCOUNT_CAPTURE responsechecksum=dc5d86f3b2248c108b1897bc859cb81c advanceResponseChecksum=00c8cb00622ce0dcae6ad443bea56598
- Send an
- Web SDK
-
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()
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
– See the list of APMs that support/accountCapture
.currencyCode
countryCode
Example
accountCapture()
Requestsfc.accountCapture({ sessionToken: "<sessiontoken>", merchantId: "<your merchantId>", merchantSiteId: "<your merchantSiteId>", paymentMethod: "apmgw_<APM provider name>", userTokenId: "<unique customer identifier in merchant system>", currencyCode: "USD", countryCode: "US", 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 back to you with the newly created
userPaymentOptionId
.
Example DMN Response
ppp_status=OK userid=139619531 currency=BRL country=BR merchant_site_id=142033 payment_method=apmgw_PayRetailers_Payouts merchant_id=427583496191624621 responseTimeStamp=2021-06-07.07:29:04 user_token_id=KUGOKLLCP52V userPaymentOptionId=8030921 type=ACCOUNT_CAPTURE responsechecksum=dc5d86f3b2248c108b1897bc859cb81c advanceResponseChecksum=00c8cb00622ce0dcae6ad443bea56598
Sending 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.
Appendix
APMs Supporting /accountCapture
APM | paymentMethod Parameter |
---|---|
Astropay Bank Payouts | apmgw_AstropayBankPayouts |
Bank Transfer Malaysia | apmgw_Bank_Transfer_Malaysia |
Bank Payouts | apmgw_Local_Payouts |
DragonPay | apmgw_DragonPay |
ElementPay Payouts | apmgw_Elementpay_Payouts |
India Payouts | apmgw_India_Payouts |
Instant Bank Transfer | apmgw_Instant_Bank_Transfer |
Interac eCashout | apmgw_Interac_eTransfer |
International Payouts | apmgw_Bank_Payouts |
LATAM Payouts | apmgw_LATAM_Payouts |
Local Bank Payouts | apmgw_BankPayouts |
Local Currency Payouts | apmgw_Local_Currency_Payouts |
Local Payments Africa | apmgw_Local_Payments_Africa |
Local Payments Indonesia | apmgw_Local_Payments_Indonesia |
Local Payments Vietnam | apmgw_Local_Payments_Vietnam |
Mazooma | apmgw_eCheckSelect |
Payretailers Bank Payouts | apmgw_PayRetailers_Payouts |
STPMex | apmgw_STPmex |
SugarPay | apmgw_SugarPay |
Trustly | apmgw_Trustly_DI |