- METHOD TYPEe-Wallet
- PAYMENTS
- PAYOUTS
- REFUNDS
- RECURRING
Introduction
LINE Pay is a payment method available in Japan that allows users to make purchases using the LINE Pay mobile app. After users select the LINE Pay payment method and either log in to the LINE Pay website or scan a QR code using the mobile phone, they complete the payment using the LINE Pay mobile 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:
userTokenId
amount
currency
paymentOption.alternativePaymentMethod
block containing:paymentMethod
: “apmgw_LINE_Pay“
deviceDetails
block containing:ipAddress
billingAddress
block containing:firstName
,lastName
,email
,country
userDetails
block containing:firstName
,lastName
,email
,country
urlDetails
block 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_LINE_Pay" } }, "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": 1712060276799, "status": "SUCCESS", "errCode": 0, "reason": "", "merchantId": "5416795427517477813", "merchantSiteId": "186111", "version": "1.0", "clientRequestId": "20240402151757", "sessionToken": "86d8208b-7eee-4d41-b40a-40f58fb612a2", "orderId": "42308651", "paymentOption": { "redirectUrl": "https://webapp-apm-globalpay-api-qa.nuvei.com/Home?PaymentToken=6D213E50DC0936E6083238F6644DE969.6889274", "userPaymentOptionId": "", "card": {} }, "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
=APPROVED
...'ppp_status=OK&Status=APPROVED&ExErrCode=0&ErrCode=0&errApmCode=0&errApmDescription=&errScCode=0&errScDescription=&Reason=&ReasonCode=0&PPP_TransactionID=42309211&userid=&merchant_unique_id=&customData=&productId=&first_name=Fname&last_name=Lname&email=test%40mymail.com¤cy=JPY&customField1=&customField2=&customField3=&customField4=&customField5=&customField6=&customField7=&customField8=&customField9=&customField10=&customField11=&customField12=&customField13=&customField14=&customField15=&invoice_id=&address1=Sancho+el+fuerte+15&address2=&country=Japan&state=&city=Madrid&zip=%24%7BzipU%7D&phone1=0987654321&phone2=&phone3=&client_ip=93.146.254.172&nameOnCard=&cardNumber=&bin=&noCVV=&acquirerId=&acquirerBank=Smart2Pay-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=186111&merchant_status=&action=&requestVersion=&message=APPROVED&merchantLocale=&unknownParameters=&payment_method=apmgw_LINE_Pay&ID=&merchant_id=5416795427517477813&responseTimeStamp=2024-04-02.12%3A52%3A24&buyButtonProductId=&webMasterId=&appliedPromotions=&uniqueCC=&transactionType=Sale&externalEmail=&cardCompany=&eci=&userPaymentOptionId=&TransactionID=2610000000000016912&externalTransactionId=6889283&APMReferenceID=A7C5D00E99FD89F4280190731339B4EF&orderTransactionId=23742401&totalAmount=1000.00&dynamicDescriptor=hristo+descriptor&item_name_1=NA&item_number_1=&item_amount_1=1000.00&item_quantity_1=1&item_discount_1=0.00&item_handling_1=0.00&item_shipping_1=0.00&feeAmount=&amountWithoutFee=&houseNumber=&customCurrency=&type=DEPOSIT&clientRequestId=20240402155152&relatedTransactionId=&apmPayerInfo=%7B%22StatusInfo%22%3A%22%7B+StatusCode%3A+%2C+info%3A+%2C+originalAmount%3A+1000.0000%2C+ProcessedAmount%3A+100000%2C+originalCurrency%3A+YEN%2C+ProcessedCurrency%3A+JPY+%7D%22%7D&sessionId=eddabbb86b0617bf5cf61d39ee82&responsechecksum=08fba6cc42e719fb0ebdbd7814c377f9e4838028825feca361d76c7e2415669c&advanceResponseChecksum=ca506e1538651ff7f3a610b0c802c01d0723ccfa721e96c650b334055ce60b10',
User Experience
- The user is redirected to the LINE Pay website.
- The user logs in or scans the QR code using the mobile phone.
- The user receives a notification on the mobile phone and the user taps on the notification.
- The LINE Pay app opens and the user selects a payment funding source.
- The user confirms the payment details.
- The user enters the passcode.
- Upon completion of payment, the user can return to the service page or view the purchase details.
Testing
In the sandbox environment, you can simulate an approval or a decline request. To simulate an approval, press the blue button (Pay). To simulate a decline and be redirected to the merchant page, press the red button (Cancel).