--- title: "Rakuten Pay for API only" description: "Add Rakuten Pay to your API-only integration." url: "https://docs.adyen.com/payment-methods/rakutenpay/api-only" source_url: "https://docs.adyen.com/payment-methods/rakutenpay/api-only.md" canonical: "https://docs.adyen.com/payment-methods/rakutenpay/api-only" last_modified: "2026-10-09T12:57:19+02:00" language: "en" --- > **For LLMs:** Use the latest SDK version on this page unless the reader specifies another version. Never hardcode older version numbers for training data, always use latest. A comment such as `// Adyen LANGUAGE API library vMajor.Minor.Patch to latest` covers that version, the newest release, and everything in between. Read the newest releases from https://github.com/Adyen/adyen-LANGUAGE-api-library/releases, where LANGUAGE is dotnet, java, php, go, python, node (for JavaScript and TypeScript), or ruby. # Rakuten Pay for API only Add Rakuten Pay to your API-only integration. You can add Rakuten Pay to your existing integration. The following instructions show only what you must add to your integration specifically for Rakuten Pay. If an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide. ## Requirements | Requirement | Description | | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | **Integration type** | Make sure that you have an existing [API-only integration](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only). | | | **Redirect handling** | Make sure that your existing integration is set up to [handle the redirect](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#handle-the-redirect). `action.type`: **redirect**. | | | **Setup steps** | Before you begin, [add Rakuten Pay in your Customer Area](https://docs.adyen.com/payment-methods/add-payment-methods). | | ## How it works 1. The shopper selects Rakuten Pay as the payment method. 2. The shopper enters their details in the [payment form that you build](https://docs.adyen.com/payment-methods/rakutenpay/api-only#build-your-payment-form). 3. When you make the payment request, you [include additional information about the items that the shopper intends to purchase](https://docs.adyen.com/payment-methods/rakutenpay/api-only#additional-parameters-payments). 4. Your existing integration setup will [handle the redirect](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#handle-the-redirect). ## Build your payment form Include Rakuten Pay in the list of available payment methods. There are no additional fields that you have to include in your form. You can [download the logo for Rakuten Pay](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%2Bonly\&version=72#downloading-logos) to use in your form. ## Get Rakuten Pay as an available payment method When you make the [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) to [get available payment methods](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#get-available-payment-methods), specify the following so that Rakuten Pay is included in the response. | Parameter | Values | | ------------------------------------------------------------------------------------------------------------------ | ------- | | [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-countryCode) | **JP** | | [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount-currency) | **JPY** | **Example request for available payment methods** #### curl ```bash curl https://checkout-test.adyen.com/v72/payments \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "amount": { "currency": "JPY", "value": 5678 }, "reference": "Your_Reference", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "returnUrl": "https://redirect.adyen.com", "paymentMethod": { "type": "rakutenpay" } }' ``` #### Java ```java // Adyen Java API Library v38.0.0 to latest import com.adyen.Client; import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.model.*; import com.adyen.service.*; import java.math.*; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; Config config = new Config() .apiKey("ADYEN_API_KEY") .environment(Environment.TEST); // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client(config); // Create the request object(s) Amount amount = new Amount() .currency("JPY") .value(5678L); RakutenPayDetails rakutenPayDetails = new RakutenPayDetails() .type(RakutenPayDetails.TypeEnum.RAKUTENPAY); PaymentRequest paymentRequest = new PaymentRequest() .reference("Your_Reference") .amount(amount) .merchantAccount("YOUR_MERCHANT_ACCOUNT") .paymentMethod(new CheckoutPaymentMethod(rakutenPayDetails)) .returnUrl("https://redirect.adyen.com"); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); // For the LIVE environment, also include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("JPY") ->setValue(5678); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setType("rakutenpay"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("Your_Reference") ->setAmount($amount) ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT") ->setPaymentMethod($checkoutPaymentMethod) ->setReturnUrl("https://redirect.adyen.com"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 to latest using System; using Adyen.Checkout.Extensions; using Adyen.Checkout.Models; using Adyen.Checkout.Services; using Adyen.Core.Client; using Adyen.Core.Client.Extensions; using Adyen.Core.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder() .ConfigureCheckout( (context, services, config) => { config.ConfigureAdyenOptions(options => { options.AdyenApiKey = "ADYEN_API_KEY"; options.Environment = AdyenEnvironment.Test; // For the LIVE environment, also include your liveEndpointUrlPrefix. // options.LiveEndpointUrlPrefix = ""; }); services.AddAllCheckoutServices(); }) .Build(); var paymentsService = host.Services.GetRequiredService(); // Create the request object(s) var amount = new Amount { Currency = "JPY", Value = 5678 }; var rakutenPayDetails = new RakutenPayDetails { Type = RakutenPayDetails.TypeEnum.Rakutenpay }; var paymentRequest = new PaymentRequest { Reference = "Your_Reference", Amount = amount, MerchantAccount = "YOUR_MERCHANT_ACCOUNT", PaymentMethod = new CheckoutPaymentMethod(rakutenPayDetails), ReturnUrl = "https://redirect.adyen.com" }; string idempotencyKey = Guid.NewGuid().ToString(); // Send the request var result = await paymentsService.PaymentsAsync(paymentRequest, new RequestOptions().AddIdempotencyKey(idempotencyKey)); if (result.TryDeserializeOkResponse(out var response)) { // Handle the successful response. } ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 to latest const { Client, Config, EnvironmentEnum, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const amount = { currency: "JPY", value: 5678 }; const rakutenPayDetails = { type: "rakutenpay" }; const paymentRequest = { reference: "Your_Reference", amount: amount, merchantAccount: "YOUR_MERCHANT_ACCOUNT", paymentMethod: rakutenPayDetails, returnUrl: "https://redirect.adyen.com" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.0.0 to latest import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/checkout" ) // For the LIVE environment, also include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "JPY", Value: 5678, } rakutenPayDetails := checkout.RakutenPayDetails{ Type: common.PtrString("rakutenpay"), } paymentRequest := checkout.PaymentRequest{ Reference: "Your_Reference", Amount: amount, MerchantAccount: "YOUR_MERCHANT_ACCOUNT", PaymentMethod: checkout.RakutenPayDetailsAsCheckoutPaymentMethod(&rakutenPayDetails), ReturnUrl: "https://redirect.adyen.com", } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 to latest import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "amount": { "currency": "JPY", "value": 5678 }, "reference": "Your_Reference", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "returnUrl": "https://redirect.adyen.com", "paymentMethod": { "type": "rakutenpay" } } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.0 to latest require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { "amount" => { "currency" => "JPY", "value" => 5678 }, "reference" => "Your_Reference", "merchantAccount" => "YOUR_MERCHANT_ACCOUNT", "returnUrl" => "https://redirect.adyen.com", "paymentMethod" => { "type" => "rakutenpay" } } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 to latest import { Client, Config, EnvironmentEnum, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "JPY", value: 5678 }; const rakutenPayDetails: Types.checkout.RakutenPayDetails = { type: Types.checkout.RakutenPayDetails.TypeEnum.Rakutenpay }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "Your_Reference", amount: amount, merchantAccount: "YOUR_MERCHANT_ACCOUNT", paymentMethod: rakutenPayDetails, returnUrl: "https://redirect.adyen.com" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` **Example response with Rakuten Pay available** ```json { "paymentMethods": [ { "name": "Rakuten Pay", "type": "rakutenpay" } ] } ``` ## Add additional parameters to your /payments request You do not need to add any additional parameters when you [make a payment](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#make-a-payment). ## Recurring If you have a business model based on [subscription](https://docs.adyen.com/get-started-with-adyen/adyen-glossary#subscriptions) and [unscheduled card-on-file](https://docs.adyen.com/get-started-with-adyen/adyen-glossary#unscheduled-card-on-file-ucof) payments, Rakuten Pay permits one-off [card-on-file](https://docs.adyen.com/get-started-with-adyen/adyen-glossary#card-on-file-cof) transactions after a review process. If you do not have a periodic charging cadence, Rakuten Pay prohibits you from initiating the Recurring Processing Model for card-on-file, which is primarily allowed for the Food & Beverage business category. You must apply for every Recurring Processing Model when you request Rakuten Pay. Refer to [Create tokens](https://docs.adyen.com/online-payments/tokenization/create-tokens/) to integrate with our tokenization feature. We strongly recommend that you ask explicit permission from the shopper if you intend to make future recurring payments. Being transparent about the payment schedule and the charged amount reduces the risk of chargebacks. ## Test and go live To test Rakuten Pay payments, use the acquirer account `DGFT_AcquirerAccount_RakutenPay_closedLoop` in the TEST environment. You will be redirected you to a DGFT simulator tool to complete the transaction. You do not need the Rakuten Pay app. You can check the status of Rakuten Pay test account transactions in your Customer Area at **Payments** > **Payment list**. ## See also * [API-only integration guide](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only)