PayPay integration guide
Learn how to accept subscriptions payments with the PayPay wallet through Adyen, using Recurly's Purchase endpoint and Recurly.js.
Prerequisites
- Familiarity with Recurly's API v3, webhooks, and basic REST concepts
- Completed the Quickstart guide
- Familiarity with Recurly.js
- An Adyen gateway account with PayPay enabled, configured with a SALE acquirer setup
Limitations
- An Auth-and-Capture acquirer setup only supports one-time transactions — recurring payments require a SALE acquirer setup
- Your Adyen account must send the correct webhooks to your Recurly sandbox and/or production site so that tokens and status updates sync correctly. Without this, testing and production behavior will be significantly degraded.
Definition
Creating purchases
Send a request to the create_purchase method on Recurly's API, including:
- Customer account data — code, name, billing info, phone number, and email address
- Subscriptions — with plan codes
- A Recurly.js token
{
"currency": "JPY",
"account": {
"code": "JohnSmith",
"email":"[email protected]",
"billing_info": {
"token_id":"FtwEuwdbulS0YsDAVgNARA"
//"three_d_secure_action_result_token_id":"Or8w_yF27FjtBKHHLUkPFg"
}
},
"subscriptions": [
{
"plan_code": "plan-code"
}
],
"gateway_code":"gateway-code"
}Obtain the action result value from the response
The response includes a redirect blob in transactions.gateway_response_values.action_result. You will only provide three_d_secure_action_result_token_id on follow-up stepsif you are using Third Party Checkout, which does not use action_result responses.
{
"action_result": "{\"method\":\"GET\",\"paymentMethodType\":\"paypay\",\"type\":\"redirect\",\"url\":\"https://checkoutshopper-test.adyen.com/checkoutshopper/checkoutPaymentRedirect?redirectData=X3XtfGC9%2...eWteWFSyDxkTo3iXeATHjO%2BxTyV4nnN155A%3D\"}"
}"transaction_error": {
"object": "transaction_error",
"transaction_id": "transaction-id",
"category": "three_d_secure_action_required",
"code": "three_d_secure_action_required",
"decline_code": null,
"message": "Your card must be authenticated with 3-D Secure before continuing.",
"merchant_advice": "Your payment gateway is requesting that the transaction be completed with 3-D Secure.",
"three_d_secure_action_token_id": "i0_mWYjn3kXQWW83PgJqTg",
"fraud_info": null
}Recurly.js Native: PayPay requires consumer authentication, so the customer needs to authenticate and authorize the payment in their mobile app through Recurly.js. Submit the action_result value to Recurly.js to render that modal.
For more detail, see our Alternative payment methods documentation.
Third Party Checkout | Adyen Components: PayPay requires consumer authentication regardless of checkout method, so customers will need to authenticate. Third Party Checkout utlilizes the redirect flow instead of action result methods. You will handle the action token ID returned in the initial response, and interact with Recurly.js using the 3DS redirect flow.
For more detail, see our Redirect documentation.
Updated about 3 hours ago