- METHOD TYPECash Payment
- PAYMENTS
- PAYOUTS
- REFUNDS
- RECURRING
Introduction
Paycash allows cash payments in all main cash collection networks in Mexico. It enables cash payments and transfers in the largest network in Latin America.
Supported Countries
- Colombia
- Ecuador
- Mexico
- Peru
Supported Currencies
- COP
- MXN
- PEN
- USD
Payment (Deposit) Flow
Follow these steps to perform a payment using Nuvei REST API integration:
1. Generate a sessionToken
Press here for details.
2. Send a /payment
Request
Perform the payment by sending a /payment
request with its mandatory parameters including:
userTokenId
amount
currency
paymentOption.alternativePaymentMethod
class containing:paymentMethod
: “apmgw_PayCash“
deviceDetails
class containing:ipAddress
billingAddress
class containing:firstName
,lastName
,country
,email
userDetails
class containing:firstName
,lastName
,country
,email
Example /payment
Request
{ "sessionToken":"<sessionToken from /getSessionToken>", "merchantId":"<your merchantId>", "merchantSiteId":"<your merchantSiteId>", "clientRequestId":"<unique request ID in merchant system>", "amount":"1000", "currency":"MXN", "userTokenId":"<unique customer identifier in merchant system>", "clientUniqueId":"<unique transaction ID in merchant system>", "paymentOption":{ "alternativePaymentMethod":{ "paymentMethod":"apmgw_PayCash" } }, "deviceDetails":{ "ipAddress":"<customer's IP address>" }, "billingAddress":{ "firstName": "John", "lastName": "Smith", "email":"[email protected]", "country":"MX" }, "userDetails":{ "firstName": "John", "lastName": "Smith", "email":"[email protected]", "country":"MX" }, "timeStamp":"<YYYYMMDDHHmmss>", "checksum":"<calculated checksum>" }
The response generates and returns a redirect URL (redirectUrl
) to redirect the customer to the payment page, as well as a UPO (userPaymentOptionId
) for use in future transactions.
Example /payment
Response
{ "internalRequestId": 566817868, "status": "SUCCESS", "errCode": 0, "reason": "", "merchantId": "2439523627382132721", "merchantSiteId": "224428", "version": "1.0", "clientRequestId": "20221130100249", "sessionToken": "19a943d1-6f5a-46a6-8023-09d8f4a5919a", "clientUniqueId": "20180327175242", "orderId": "345146698", "userTokenId": "UT_1007", "paymentOption": { "redirectUrl": "https://cdn-int.safecharge.com/safecharge_resources/v1/payment-details-22193.html?purchaseDate=2022-11-30+17%3A02%3A41&transactionStatus=pending&buyerEmail=john.smith%40email.com&description=Approved&methodName=payCash&language=EN&buyerName=UT_1007&paymentAmount=218.0&transactionId=PCSH-154&merchantName=Jake&mode=barcode&showBanks=1&barcode=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAN0AAAABAQAAAAByQ5bjAAAAH0lEQVR42mP4DwbTTI5NPHHjqVruWY6Nk8wK%2FcGCPwArcRQ1q4FW2AAAAABJRU5ErkJggg%3D%3D&paymentNumber=1242215900041", "userPaymentOptionId": "84419408", "transactionStatus": "REDIRECT" }
After the transaction is processed, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to the URL provided in urlDetails.notificationUrl
, which Nuvei recommends including in the /payment
request.
Example /payment
DMN with status
=PENDING
...'ppp_status=PENDING&Status=PENDING&ExErrCode=0&ErrCode=0&errApmCode=0&errApmDescription=&errScCode=0&errScDescription=&Reason=&ReasonCode=0&PPP_TransactionID=346069318&userid=UT_1007&merchant_unique_id=20180327175242&customData=&productId=&first_name=&last_name=&email=john.smith%40email.com¤cy=MXN&clientUniqueId=20180327175242&customField1=&customField2=&customField3=&customField4=&customField5=&customField6=&customField7=&customField8=&customField9=&customField10=&customField11=&customField12=&customField13=&customField14=&customField15=&invoice_id=&address1=&address2=&country=Mexico&state=&city=&zip=&phone1=&phone2=&phone3=&client_ip=127.0.0.1&nameOnCard=&cardNumber=&bin=&noCVV=&acquirerId=&acquirerBank=Paymentez-PI&expMonth=&expYear=&Token=&tokenId=&AuthCode=&AvsCode=&Cvv2Reply=&shippingCountry=&shippingState=&shippingCity=&shippingAddress=&shippingZip=&shippingFirstName=&shippingLastName=&shippingPhone=&shippingCell=&shippingMail=&total_discount=0.00&total_handling=0.00&total_shipping=0.00&total_tax=0.00&buyButtonProductBundleId=&merchant_site_id=224428&merchant_status=&action=&requestVersion=&message=PENDING&merchantLocale=&unknownParameters=&payment_method=apmgw_PayCash&ID=&merchant_id=2439523627382132721&responseTimeStamp=2022-12-08.13%3A45%3A26&buyButtonProductId=&webMasterId=&appliedPromotions=&uniqueCC=&transactionType=Sale&externalEmail=&cardCompany=&eci=&user_token_id=UT_1007&userPaymentOptionId=84419408&TransactionID=711000000018846226&externalTransactionId=PCSH-187&APMReferenceID=29B1C8D4E299818D806AC6153488E1A4&orderTransactionId=1170312678&totalAmount=315.00&dynamicDescriptor=test&item_name_1=NA&item_number_1=&item_amount_1=315.00&item_quantity_1=1&item_discount_1=0.00&item_handling_1=0.00&item_shipping_1=0.00&feeAmount=&amountWithoutFee=&houseNumber=&customCurrency=&upoRegistrationDate=20221130&type=DEPOSIT&clientRequestId=20221208084519&relatedTransactionId=&apmPayerInfo=nullnull&sessionId=1fb77d708df6df80154de0582516&responsechecksum=ef0f40013599ef44e818539c97fdef459d295d50bc07369eea68d72c48745ef6&advanceResponseChecksum=7edbc2bae0f75df187acf8d3f561420f65e944ca2ed272390f3ebe431cc0b2d2',
Example /payment
DMN with status
=APPROVED
...'ppp_status=OK&Status=APPROVED&ExErrCode=0&ErrCode=0&errApmCode=0&errApmDescription=&errScCode=0&errScDescription=&Reason=&ReasonCode=0&PPP_TransactionID=346069318&userid=UT_1007&merchant_unique_id=20180327175242&customData=&productId=&first_name=&last_name=&email=john.smith%40email.com¤cy=MXN&clientUniqueId=20180327175242&customField1=&customField2=&customField3=&customField4=&customField5=&customField6=&customField7=&customField8=&customField9=&customField10=&customField11=&customField12=&customField13=&customField14=&customField15=&invoice_id=&address1=&address2=&country=Mexico&state=&city=&zip=&phone1=&phone2=&phone3=&client_ip=127.0.0.1&nameOnCard=&cardNumber=&bin=&noCVV=&acquirerId=&acquirerBank=Paymentez-PI&expMonth=&expYear=&Token=&tokenId=&AuthCode=&AvsCode=&Cvv2Reply=&shippingCountry=&shippingState=&shippingCity=&shippingAddress=&shippingZip=&shippingFirstName=&shippingLastName=&shippingPhone=&shippingCell=&shippingMail=&total_discount=0.00&total_handling=0.00&total_shipping=0.00&total_tax=0.00&buyButtonProductBundleId=&merchant_site_id=224428&merchant_status=&action=&requestVersion=&message=APPROVED&merchantLocale=&unknownParameters=&payment_method=apmgw_PayCash&ID=&merchant_id=2439523627382132721&responseTimeStamp=2022-12-12.22%3A37%3A14&buyButtonProductId=&webMasterId=&appliedPromotions=&uniqueCC=&transactionType=Sale&externalEmail=&cardCompany=&eci=&user_token_id=UT_1007&userPaymentOptionId=84419408&TransactionID=711000000018846226&externalTransactionId=PCSH-187&APMReferenceID=29B1C8D4E299818D806AC6153488E1A4&orderTransactionId=1170312678&totalAmount=315.00&dynamicDescriptor=test&item_name_1=NA&item_number_1=&item_amount_1=315.00&item_quantity_1=1&item_discount_1=0.00&item_handling_1=0.00&item_shipping_1=0.00&feeAmount=&amountWithoutFee=&houseNumber=&customCurrency=&upoRegistrationDate=20221130&type=DEPOSIT&clientRequestId=20221208084519&relatedTransactionId=&apmPayerInfo=nullnull&sessionId=1fb77d708df6df80154de0582516&responsechecksum=299121640ac367f01d4aa4dfb9f6eabac6eb617056a2925c03a8ac425d317a25&advanceResponseChecksum=e730871a2f49a6df4b3db49d02024e53dcb433960cdefc383671afd161ed1c9a',
Example /payment
DMN with status
=DECLINED
...'ppp_status=FAIL&Status=DECLINED&ExErrCode=0&ErrCode=332&errApmCode=332&errApmDescription=Cancelled+by+User&errScCode=1133&errScDescription=Process+canceled&Reason=Process+canceled&ReasonCode=1133&PPP_TransactionID=332151278&userid=UserID_3557096336&merchant_unique_id=&customData=Jake+Test+Account&productId=Cashier+Test+product&first_name=Wilmington&last_name=Rivera&email=8935790509%40gmail.com¤cy=USD&customField1=&customField2=&customField3=&customField4=&customField5=&customField6=&customField7=&customField8=&customField9=&customField10=&customField11=&customField12=&customField13=&customField14=&customField15=&invoice_id=&address1=15941+Harlem+Ave&address2=&country=United+States&state=ILLINOIS&city=TINLEY+PARK&zip=60477&phone1=12012485303&phone2=&phone3=&client_ip=157.167.71.180&nameOnCard=&cardNumber=&bin=&noCVV=&acquirerId=&acquirerBank=Nuvei-PI&expMonth=&expYear=&Token=&tokenId=&AuthCode=&AvsCode=&Cvv2Reply=&shippingCountry=&shippingState=&shippingCity=&shippingAddress=&shippingZip=&shippingFirstName=&shippingLastName=&shippingPhone=&shippingCell=&shippingMail=&total_discount=0.00&total_handling=0.00&total_shipping=0.00&total_tax=0.00&buyButtonProductBundleId=&merchant_site_id=224428&merchant_status=&action=&requestVersion=&message=DECLINED&merchantLocale=en_US&unknownParameters=&payment_method=apmgw_Afterpay&ID=&merchant_id=2439523627382132721&responseTimeStamp=2022-09-13.08%3A05%3A43&buyButtonProductId=&webMasterId=&appliedPromotions=&uniqueCC=&transactionType=Sale&externalEmail=&cardCompany=&eci=&user_token_id=UserID_3557096336&user_token=auto&userPaymentOptionId=80860178&TransactionID=711000000015441863&externalTransactionId=11788019&APMReferenceID=72C5F6856C8B030AE045314AE6147E4B&orderTransactionId=1154144328&totalAmount=1.00&dynamicDescriptor=test&item_name_1=Cashier+Test+product&item_number_1=&item_amount_1=1.00&item_quantity_1=1&item_discount_1=0.00&item_handling_1=0.00&item_shipping_1=0.00&feeAmount=&amountWithoutFee=&houseNumber=&customCurrency=&upoRegistrationDate=20220912&type=DEPOSIT&clientRequestId=&relatedTransactionId=&apmPayerInfo=%7B%22StatusInfo%22%3A%22%7B+StatusCode%3A+332%2C+info%3A+Cancelled+by+User%2C+originalAmount%3A+1.0000%2C+ProcessedAmount%3A+1%7D%22%7D&sessionId=5de5a2944bd39b1f7d0a20ae3fdb&responsechecksum=e6b11353d7631ab5741fbff497e645409029a183a6332e8c2064d77954ce949d&advanceResponseChecksum=3818793dc0b4b5fed30c3196021b026deabbc77090f183bae3932a37be04f329',
User Experience
- The user is redirected to a static page with payment instructions, reference number, and a barcode.
- The user uses the reference number/barcode to pay at the local shop.
Testing
Enter an amount to generate a reference number.