HomeProduct DocsAPI ReferenceChangelog
RecurlyAPI GuidesRecurly.jsWebhooksAPI ReferenceSupportBook demo
Product Docs

PayPay integration guide

Learn how to accept subscriptions payments with the PayPay wallet through Adyen, using Recurly's Purchase endpoint and Recurly.js.

This guide shows you how to use Recurly's Purchase endpoint to create new subscriptions with the PayPay wallet payment method through Adyen. It also covers how to test the flow using the Adyen sandbox simulator.
Available on all Recurly plans

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 a purchase means generating a new customer account and its subscription in a single call to Recurly's Purchase endpoint. This bundles everything a checkout needs — account, billing info, and subscription — into one request instead of several.

Creating purchases

1

Generate a PayPay wallet payment request

Use a supported client library along with Recurly.js to configure your checkout. PayPay uses Recurly.js whether you're on native Recurly.js checkout or Adyen Web Components through Third-Party Checkout.

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"
}
2

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.

3

Handle the action result or action token ID with Recurly.js

Call paymentMethod.handleAction(action_result) or threeDSecure.attach() to let the customer complete the flow in the PayPay app on their phone.

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.

NoteAdyen returns the result of that interaction to Recurly through webhooks, including the final transaction status and the token for renewals once approved. Minimum required webhooks: Standard and Token Lifecycle events.



Did this page help you?