- METHOD TYPEE-wallet
- PAYMENTS
- PAYOUTS
- REFUNDS
- RECURRING
Introduction
Merpay is a mobile payment service integrated with Mercari, Japan’s leading flea market app. It simplifies transactions for users, allowing them to spend their Mercari sales proceeds, charge their balance from a bank account, and use deferred payments within the Mercari app.
Supported Countries
- Japan
Supported Currencies
- JPY
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:
userTokenIdamountcurrencypaymentOption.alternativePaymentMethodclass containing:paymentMethod: “apmgw_Merpay“
deviceDetailsclass containing:ipAddressbillingAddressclass containing:firstName,lastName,email,countryuserDetailsclass containing:firstName,lastName,email,countryurlDetailsclass containing:successUrl,failureUrl,pendingUrl
Example /payment Request
{
"sessionToken":"<sessionToken from /getSessionToken>",
"merchantId":"<your merchantId>",
"merchantSiteId":"<your merchantSiteId>",
"clientRequestId":"<unique request ID in merchant system>",
"amount":"1000",
"currency":"JPY",
"userTokenId":"<unique customer identifier in merchant system>",
"clientUniqueId":"<unique transaction ID in merchant system>",
"paymentOption":{
"alternativePaymentMethod":{
"paymentMethod":"apmgw_Merpay"
}
},
"deviceDetails":{
"ipAddress":"<customer's IP address>"
},
"billingAddress":{
"firstName":"John",
"lastName":"Smith",
"email":"[email protected]",
"country":"JP"
},
"userDetails":{
"firstName":"John",
"lastName":"Smith",
"email":"[email protected]",
"country":"JP"
},
"urlDetails": {
"successUrl": "<http://merchantsuccessURL.html?deep_link=parameter>",
"failureUrl": "<http://merchantfailureURL.html?deep_link=parameter>",
"pendingUrl": "<<http://merchantpendingURL.html?deep_link=parameter>"
},
"timeStamp":"<YYYYMMDDHHmmss>",
"checksum":"<calculated checksum>"
}
Example /payment Response
{
"internalRequestId": 1711974991539,
"status": "SUCCESS",
"errCode": 0,
"reason": "",
"merchantId": "5416795427517477813",
"merchantSiteId": "186111",
"version": "1.0",
"clientRequestId": "20240401153632",
"sessionToken": "a377efc3-7d76-4a9f-a2d8-05ef9c5cfe8c",
"orderId": "42301531",
"paymentOption": {
"redirectUrl": "https://webapp-apm-globalpay-api-qa.nuvei.com/Home?PaymentToken=8F38C5D78910160568DF5D18C103001D.6888762",
"userPaymentOptionId": "",
"card": {}
},
"transactionStatus": "REDIRECT"
}
After the transaction is processed, Nuvei sends a Direct Merchant Notification (DMN) to urlDetails.notificationUrl, which Nuvei recommends including in the /payment request. The DMN includes the result of the transaction and the transaction key received from the APM in apmPayerInfo.
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=42298551&userid=ScMigrationTest3&merchant_unique_id=97c10831-d399-48d7-8ea5-41f89619d2fa6&customData=QA+test+merchant&productId=test_name_1&first_name=John&last_name=Doe&email=ivanp%40abv.bg¤cy=JPY&customField1=meccabingo.com&customField2=a2db82db-8186-44bb-a6d9-cb9f8f7ea25e&customField3=&customField4=&customField5=&customField6=&customField7=&customField8=&customField9=&customField10=&customField11=&customField12=&customField13=&customField14=&customField15=rnk_pr01&invoice_id=&address1=Test+Address&address2=&country=Japan&state=&city=Ontario&zip=M6T+1J1&phone1=%2B14161238888&phone2=&phone3=&client_ip=127.0.0.1&nameOnCard=&cardNumber=&bin=&noCVV=&acquirerId=&acquirerBank=Smart2Pay-PI&expMonth=&expYear=&Token=&tokenId=&AuthCode=&AvsCode=&Cvv2Reply=&shippingCountry=JP&shippingState=&shippingCity=Ontario&shippingAddress=Test+Address&shippingZip=M6T+1J1&shippingFirstName=John&shippingLastName=Doe&shippingPhone=%2B14161238888&shippingCell=%2B14161238888&shippingMail=ivanp%40abv.bg&total_discount=0.00&total_handling=0.00&total_shipping=0.00&total_tax=0.00&buyButtonProductBundleId=&merchant_site_id=3111&merchant_status=&action=&requestVersion=&message=PENDING&merchantLocale=en_US&unknownParameters=&payment_method=apmgw_Merpay&ID=&merchant_id=4972436454212160565&responseTimeStamp=2024-04-01.09%3A35%3A59&buyButtonProductId=&webMasterId=&appliedPromotions=&uniqueCC=&transactionType=Sale&externalEmail=&cardCompany=&eci=&user_token_id=Siltoken&user_token=auto&userPaymentOptionId=2153178211&TransactionID=2610000000000016486&externalTransactionId=6888719&APMReferenceID=087FC2667A99FC0954753D3735FD2AD6&orderTransactionId=23736171&totalAmount=700.00&dynamicDescriptor=QA+Test+site&item_name_1=test_name_1&item_number_1=&item_amount_1=700.00&item_quantity_1=1&item_discount_1=0.00&item_handling_1=0.00&item_shipping_1=0.00&feeAmount=&amountWithoutFee=&houseNumber=&customCurrency=&externalToken_blockedCard=&externalToken_cardAcquirerId=&externalToken_cardAcquirerName=&externalToken_cardBin=&externalToken_cardBrandId=&externalToken_cardBrandName=&externalToken_cardExpiration=&externalToken_cardLength=&externalToken_cardMask=&externalToken_cardName=&externalToken_cardTypeId=&externalToken_cardTypeName=&externalToken_clubName=&externalToken_creditCompanyId=&externalToken_creditCompanyName=&externalToken_extendedCardType=&externalToken_Indication=&externalToken_tokenValue=&externalToken_tokenProvider=&ECIRaw=&cryptogram=&upoRegistrationDate=20240327&type=DEPOSIT&clientRequestId=&relatedTransactionId=&apmPayerInfo=ae0f4e50-4219-4892-a89c-05f4e5371da5&sessionId=903701cc232252738de409aed812&responsechecksum=229111d79d10924c517f79c02261a398&advanceResponseChecksum=9ae1d0cfad9dd067aa6c2a6cd264fda7',
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=42298551&userid=ScMigrationTest3&merchant_unique_id=97c10831-d399-48d7-8ea5-41f89619d2fa6&customData=QA+test+merchant&productId=test_name_1&first_name=John&last_name=Doe&email=ivanp%40abv.bg¤cy=JPY&customField1=meccabingo.com&customField2=a2db82db-8186-44bb-a6d9-cb9f8f7ea25e&customField3=&customField4=&customField5=&customField6=&customField7=&customField8=&customField9=&customField10=&customField11=&customField12=&customField13=&customField14=&customField15=rnk_pr01&invoice_id=&address1=Test+Address&address2=&country=Japan&state=&city=Ontario&zip=M6T+1J1&phone1=%2B14161238888&phone2=&phone3=&client_ip=127.0.0.1&nameOnCard=&cardNumber=&bin=&noCVV=&acquirerId=&acquirerBank=Smart2Pay-PI&expMonth=&expYear=&Token=&tokenId=&AuthCode=&AvsCode=&Cvv2Reply=&shippingCountry=JP&shippingState=&shippingCity=Ontario&shippingAddress=Test+Address&shippingZip=M6T+1J1&shippingFirstName=John&shippingLastName=Doe&shippingPhone=%2B14161238888&shippingCell=%2B14161238888&shippingMail=ivanp%40abv.bg&total_discount=0.00&total_handling=0.00&total_shipping=0.00&total_tax=0.00&buyButtonProductBundleId=&merchant_site_id=3111&merchant_status=&action=&requestVersion=&message=APPROVED&merchantLocale=en_US&unknownParameters=&payment_method=apmgw_Merpay&ID=&merchant_id=4972436454212160565&responseTimeStamp=2024-04-01.09%3A36%3A04&buyButtonProductId=&webMasterId=&appliedPromotions=&uniqueCC=&transactionType=Sale&externalEmail=&cardCompany=&eci=&user_token_id=Siltoken&user_token=auto&userPaymentOptionId=2153178211&TransactionID=2610000000000016486&externalTransactionId=6888719&APMReferenceID=087FC2667A99FC0954753D3735FD2AD6&orderTransactionId=23736171&totalAmount=700.00&dynamicDescriptor=QA+Test+site&item_name_1=test_name_1&item_number_1=&item_amount_1=700.00&item_quantity_1=1&item_discount_1=0.00&item_handling_1=0.00&item_shipping_1=0.00&feeAmount=&amountWithoutFee=&houseNumber=&customCurrency=&externalToken_blockedCard=&externalToken_cardAcquirerId=&externalToken_cardAcquirerName=&externalToken_cardBin=&externalToken_cardBrandId=&externalToken_cardBrandName=&externalToken_cardExpiration=&externalToken_cardLength=&externalToken_cardMask=&externalToken_cardName=&externalToken_cardTypeId=&externalToken_cardTypeName=&externalToken_clubName=&externalToken_creditCompanyId=&externalToken_creditCompanyName=&externalToken_extendedCardType=&externalToken_Indication=&externalToken_tokenValue=&externalToken_tokenProvider=&ECIRaw=&cryptogram=&upoRegistrationDate=20240327&type=DEPOSIT&clientRequestId=&relatedTransactionId=&apmPayerInfo=ae0f4e50-4219-4892-a89c-05f4e5371da5&sessionId=903701cc232252738de409aed812&responsechecksum=28e508286e3e13bf7ef44fb170e13e2f&advanceResponseChecksum=61ce5e6c010d59b012262b6c740f32e8',
Testing
In the sandbox environment, you can simulate an approval or a decline request. To simulate an approval, press Payment. To simulate a decline and be redirected to the merchant page, press Cancel.
