Search

Are you looking for test card numbers?

Would you like to contact support?

Payment-method icon

Japanese convenience stores Component

Accept payments through Japanese convenience stores using your existing Components integration.

Our Japanese convenience stores Component renders 7-Eleven and other Japanese convenience stores in your payment form and collects the shopper's full name, phone number, and email. When the shopper proceeds to pay, the Component handles showing the voucher to your shopper depending on which convenience store they selected.

  • 7-Eleven: The Component redirects your shopper to a 7-Eleven page where they see the voucher.
  • Other Japanese convenience stores: The Component presents the voucher natively within your website.

The shopper can then take note of the voucher reference or print the voucher, and pay in cash either at 7-Eleven or other convenience stores.

Japanese convenience stores is supported from Components version 3.1.0 and later. For more information, refer to Release notes.

Before you begin

This page explains how to add Japanese convenience stores to your existing Web Components integration. The Web Components integration works the same way for all payment methods. If you haven't done this integration yet, refer to our Components integration guide.

Before starting your Japanese convenience stores integration:

  1. Make sure that you have set up your back end implementation, and created an instance of AdyenCheckout.
  2. Add Japanese convenience stores in your test Customer Area.

Show Japanese convenience stores in your payment form

To present the 7-Eleven Component and other Japanese convenience stores Components in your payment form:

  1. From your server, make a POST /paymentMethods request specifying:

  2. Pass the full response from the /paymentMethods call as the paymentMethodsResponse object when creating an instance of the AdyenCheckout.

  3. Add 7-Eleven and other Japanese convenience stores Component:

    a. Create DOM elements for 7-Eleven and other Japanese convenience stores, placing the elements where you want the form to be rendered:

    <div id="jpseveneleven-container"></div>
    <div id="konbini-container"></div>

    b. Create and mount instances of the 7-Eleven and other Japanese convenience stores Components, using their respective component names, econtext_seven_eleven and econtext_stores.

    const jpseveneleven = checkout.create('econtext_seven_eleven').mount('jpseveneleven-container');
    const konbini = checkout.create('econtext_stores').mount('konbini-container');

When the shopper provides their information, the Component calls the onChange event (or onSubmit if you're using the Pay button), which contains a state.data object. If your integration is set up correctly, the state.data is passed on to your server.

Optional configuration

When the Component displays vouchers natively within your website, you can also present the voucher in Japanese. To do this, set the locale to ja-JP in your AdyenCheckout instance.

Make a payment

From your server, make a POST /payments request, specifying:

Parameters Required Description
paymentMethod -white_check_mark- The state.data.paymentMethod from the onChange or onSubmit event from your front end. This also contains the information collected from the shopper, including their firstName, lastName, telephoneNumber, and shopperEmail.
shopperLocale -white_check_mark- Language and country code to be used in the payment. For example, ja-JP.
returnUrl -white_check_mark- The URL where the shopper will be redirected back to after they see the voucher. This URL can have a maximum of 1024 characters.

Select a convenience store in the tabs below to see how you would make a payment with a value of 1,000 JPY, and how you would show the voucher to the shopper:

curl https://checkout-test.adyen.com/v64/payments \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
  "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
  "reference":"YOUR_ORDER_NUMBER",
  "amount":{
    "currency":"JPY",
    "value":1000
  },
  "{hint:state.data.paymentMethod from onSubmit}paymentMethod{/hint}":{
    "type":"econtext_seven_eleven",
    "firstName": "Simon",
    "lastName": "Hopper",
    "shopperEmail": "s.hopper@email.com",
    "telephoneNumber": "1234567890"
  },
  "shopperLocale": "ja-JP",
  "returnUrl":"https://your-company.com/checkout?shopperOrder=12xy.."
}'
# Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen::Client.new
adyen.api_key = "YOUR_X-API-KEY"
 
response = adyen.checkout.payments({
  :amount => {
    :currency => "JPY",
    :value => 1000
  },
  :reference => "YOUR_ORDER_NUMBER",
  :paymentMethod => {
    :type => "econtext_seven_eleven",
    :firstName => "Simon",
    :lastName => "Hopper",
    :shopperEmail => "s.hopper@email.com",
    :telephoneNumber => "1234567890"
  },
  :returnUrl => "https://your-company.com/checkout?shopperOrder=12xy..",
  :merchantAccount => "YOUR_MERCHANT_ACCOUNT"
})
// Set your X-API-KEY with the API key from the Customer Area.
$client = new \Adyen\Client();
$client->setXApiKey("YOUR_X-API-KEY");
$service = new \Adyen\Service\Checkout($client);

$params = array(
  "amount" => array(
    "currency" => "JPY",
    "value" => 1000
  ),
  "reference" => "YOUR_ORDER_NUMBER",
  "paymentMethod" => array(
    "type" => "econtext_seven_eleven",
    "firstName" => "Simon",
    "lastName" => "Hopper",
    "shopperEmail" =>  "shopper@email.com",
    "telephoneNumber" =>  "1234567890"
  ),
  "returnUrl" => "https://your-company.com/checkout?shopperOrder=12xy..",
  "shopperLocale" => "ja-JP",
  "merchantAccount" => "YOUR_MERCHANT_ACCOUNT"
);
$result = $service->payments($params);
#Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen.Adyen()
adyen.client.xapikey = 'YOUR_X-API-KEY'

result = adyen.checkout.payments({
   'amount': {
      'value': 1000,
      'currency': 'JPY'
   },
   'reference': 'YOUR_ORDER_NUMBER',
   'paymentMethod': {
      'type': 'econtext_seven_eleven'
      'firstName': 'Simon',
      'lastName': 'Hopper',
      'shopperEmail': 's.hopper@email.com',
      'telephoneNumber': '1234567890'
   },
   'returnUrl': 'https://your-company.com/checkout?shopperOrder=12xy..',
   'shopperLocale': 'ja-JP'
   'merchantAccount': 'YOUR_MERCHANT_ACCOUNT'
})
// Set your X-API-KEY with the API key from the Customer Area.
const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
const config = new Config();
// Set your X-API-KEY with the API key from the Customer Area.
config.apiKey = '[API_KEY]';
config.merchantAccount = '[YOUR_MERCHANT_ACCOUNT]';
const client = new Client({ config });
client.setEnvironment("TEST");
const checkout = new CheckoutAPI(client);
checkout.payments({
    amount: { currency: "JPY", value: 1000 },
    paymentMethod: {
        type: 'econtext_seven_eleven',
        firstName: 'Simon',
        lastName: 'Hopper',
        shopperEmail: 'shopper@email.com',
        telephoneNumber: '1234567890'
    },
    reference: "YOUR_ORDER_NUMBER",
    merchantAccount: config.merchantAccount,
    returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.."
    shopperLocale: "ja-JP"
}).then(res => res);

The /payments response contains an action object with type: redirect.

/payments response
{
    "resultCode": "RedirectShopper",
    "action": {
        "paymentData": "Ab02b4c0!BQABAgAZb4...==",
        "paymentMethodType": "econtext_seven_eleven",
        "url": "https://test.adyen.com/hpp/skipDetails.shtml?brandCode=...",
        "method": "GET",
        "type": "redirect"
    },
    "details": [
        {
            "key": "payload",
            "type": "text"
        }
    ],
    "paymentData": "Ab02b4c0!BQABAgAZb4...==",
    "redirect": {
        "method": "GET",
        "url": "https://test.adyen.com/hpp/skipDetails.shtml?brandCode=..."
    }
}

If your integration is set up correctly, the action object is passed from your server to the client, and the action.paymentData temporarily stored on your server.

Handle the redirect to 7-Eleven

7-Eleven voucher payments can only be tested in the live environment. Contact our Support Team to set up 7-Eleven on the live environment for penny testing.

Handling the redirect works the same way for all redirect payment methods.

  1. Call createFromAction, passing the action object from the previous step. This will return a new Component that you need to mount:

    checkout.createFromAction(action).mount('#my-container');

The Component redirects the shopper to a 7-Eleven page, where they see the voucher. The shopper can then print the voucher and pay in cash at any 7-Eleven store.

When the shopper completes the payment at a 7-Eleven store, you'll get to know the outcome of the payment through notification webhooks.

curl https://checkout-test.adyen.com/v64/payments \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
  "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
  "reference":"YOUR_ORDER_NUMBER",
  "amount":{
    "currency":"JPY",
    "value":1000
  },
  "{hint:state.data.paymentMethod from onSubmit}paymentMethod{/hint}":{
    "type":"econtext_stores",
    "firstName": "Simon",
    "lastName": "Hopper",
    "shopperEmail": "s.hopper@email.com",
    "telephoneNumber": "1234567890"
  },
  "shopperLocale": "ja-JP",
  "returnUrl":"https://your-company.com/checkout?shopperOrder=12xy.."
}'
# Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen::Client.new
adyen.api_key = "YOUR_X-API-KEY"
 
response = adyen.checkout.payments({
  :amount => {
    :currency => "JPY",
    :value => 1000
  },
  :reference => "YOUR_ORDER_NUMBER",
  :paymentMethod => {
    :type => "econtext_stores",
    :firstName => "Simon",
    :lastName => "Hopper",
    :shopperEmail => "s.hopper@email.com",
    :telephoneNumber => "1234567890"
  },
  :returnUrl => "https://your-company.com/checkout?shopperOrder=12xy..",
  :merchantAccount => "YOUR_MERCHANT_ACCOUNT"
})
// Set your X-API-KEY with the API key from the Customer Area.
$client = new \Adyen\Client();
$client->setXApiKey("YOUR_X-API-KEY");
$service = new \Adyen\Service\Checkout($client);

$params = array(
  "amount" => array(
    "currency" => "JPY",
    "value" => 1000
  ),
  "reference" => "YOUR_ORDER_NUMBER",
  "paymentMethod" => array(
    "type" => "econtext_stores",
    "firstName" => "Simon",
    "lastName" => "Hopper",
    "shopperEmail" =>  "shopper@email.com",
    "telephoneNumber" =>  "1234567890"
  ),
  "returnUrl" => "https://your-company.com/checkout?shopperOrder=12xy..",
  "shopperLocale" => "ja-JP",
  "merchantAccount" => "YOUR_MERCHANT_ACCOUNT"
);
$result = $service->payments($params);
#Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen.Adyen()
adyen.client.xapikey = 'YOUR_X-API-KEY'

result = adyen.checkout.payments({
   'amount': {
      'value': 1000,
      'currency': 'JPY'
   },
   'reference': 'YOUR_ORDER_NUMBER',
   'paymentMethod': {
      'type': 'econtext_stores'
      'firstName': 'Simon',
      'lastName': 'Hopper',
      'shopperEmail': 's.hopper@email.com',
      'telephoneNumber': '1234567890'
   },
   'returnUrl': 'https://your-company.com/checkout?shopperOrder=12xy..',
   'shopperLocale': 'ja-JP'
   'merchantAccount': 'YOUR_MERCHANT_ACCOUNT'
})
// Set your X-API-KEY with the API key from the Customer Area.
const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
const config = new Config();
// Set your X-API-KEY with the API key from the Customer Area.
config.apiKey = '[API_KEY]';
config.merchantAccount = '[YOUR_MERCHANT_ACCOUNT]';
const client = new Client({ config });
client.setEnvironment("TEST");
const checkout = new CheckoutAPI(client);
checkout.payments({
    amount: { currency: "JPY", value: 1000 },
    paymentMethod: {
        type: 'econtext_stores',
        firstName: 'Simon',
        lastName: 'Hopper',
        shopperEmail: 'shopper@email.com',
        telephoneNumber: '1234567890'
    },
    reference: "YOUR_ORDER_NUMBER",
    merchantAccount: config.merchantAccount,
    returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.."
    shopperLocale: "ja-JP"
}).then(res => res);

The /payments response with action.type voucher:

/payments response
{
    "resultCode": "PresentToShopper",
    "action": {
        "paymentMethodType": "econtext_stores",
        "expiresAt": "2020-02-10T16:21:00",
        "initialAmount": {
            "currency": "JPY",
            "value": 10000
        },
        "instructionsUrl": "https://www.econtext.jp/support/cvs/8brand.html",
        "maskedTelephoneNumber": "12******90",
        "merchantName": "YOUR_MERCHANT_ACCOUNT_NAME",
        "reference": "854573",
        "totalAmount": {
            "currency": "JPY",
            "value": 10000
        },
        "type": "voucher"
    }
}

If your integration is set up correctly, the action object is passed from your server to the front end.

Present the voucher for other convenience stores

  1. Call createFromAction, passing the action object from the previous step. This will return a new Component that you need to mount:

    checkout.createFromAction(action).mount('#my-container');

The Component presents the voucher natively within your website. The shopper can then print the voucher or take note of the reference number, and then pay in cash at convenience stores.

When the shopper completes the payment at a convenience store, you'll get to know the outcome of the payment through notification webhooks.

Present the payment result

Use the resultCode that you received in the /payments response to inform your shopper of the payment status.

The resultCode values you can receive for payments made through 7-Eleven and other Japanese convenience stores are:

resultCode Action to take
RedirectShopper After the shopper is redirected to 7-Eleven's page, reach out to the shopper and inform them that you are waiting for the payment to be completed.
PresentToShopper After the voucher is presented to the shopper, inform the shopper that you are waiting for the payment to be completed.

Wait for notification webhooks to know the outcome of the payment. The notification webhooks you can receive for 7-Eleven and other Japanese convenience stores are:

eventCode success field Description Action to take
PENDING true The voucher reference is successfully created and the payment is pending. Inform the shopper that you are waiting for the payment to be completed.
AUTHORISATION false The transaction failed. Cancel the order and inform the shopper that the payment failed.
AUTHORISATION true The shopper successfully completed the payment. Inform the shopper that the payment has been successful and proceed with the order.
OFFER_CLOSED true The shopper did not complete the payment before the offer expired. Cancel the order and inform the shopper that the payment timed out.

Test and go live

7-Eleven voucher payments can only be tested in the live environment. Contact our Support Team to set up 7-Eleven on the live environment for penny testing.

To test your integration, use the econtext simulator to complete voucher payments in Japanese convenience stores.

  1. Login to the econtext Simulator using the following credentials:
    • Username: ectest
    • Password: #eg0810#
  1. In the first box, provide 742001 as the shopID.
  1. In the second box, provide the acquirer reference following the format below:
    • pspReference-262320-econtext_stores
      For example, 8515814273533258-262320-econtext_stores
    Get the pspReference from the header of the /payments response.
  1. In the third box, select 入金通知 (the first option).
  1. On the next page, choose the convenience store from the list and select 登録.
  1. Wait for 15 minutes for the notification webhook.

Check the status of voucher payments in the test environment in your Customer Area:

  • Vouchers that are pending or that have expired, are under TransactionsOffers.
  • Vouchers that have been paid are under Transactions > Payments.

Before you can accept payments through Japanese convenience stores in live environment, you need to submit a request to add 7-Eleven or other Japanese convenience stores in your live Customer Area.

See also