Search

Are you looking for test card numbers?

Would you like to contact support?

Payment-method icon

Japanese convenience stores Drop-in integration

Add payments through Japanese convenience stores to an existing Drop-in integration.

Our Web Drop-in renders 7-Eleven and other Japanese convenience stores as payment methods in your payment form, collects the shopper details, and presents the voucher to the shopper. The shopper can then take note of the voucher reference or print the voucher, and pay in cash at a convenience store.

Before you begin

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

Before starting your Japanese convenience stores integration:

  1. Make sure that you have set up your back end implementation, and added Drop-in to your payments form.
  2. Add 7-Eleven and other Japanese convenience stores in your test Customer Area.

Show Japanese convenience stores in your payment form

Drop-in uses the countryCode and the amount.currency from your /paymentMethods request to show the available payment methods to your shopper.

To show Japanese convenience stores in your payment form, specify in your /paymentMethods request:

Optional configuration

To present the voucher in Japanese, set the locale to ja-JP in your AdyenCheckout instance.

Make a payment

When the shopper selects the Pay button, Drop-in calls the onSubmit event, which contains a state.data.

  1. Pass the state.data to your server.
  2. From your server, make a /payments request, specifying:

    • paymentMethod: The state.data.paymentMethod from the onSubmit event from your front end.
    • shopperLocale: Language and country code to be used in the payment. For example, ja-JP.

    Select a tab below to see the corresponding sample request:

    curl https://checkout-test.adyen.com/v51/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);
    curl https://checkout-test.adyen.com/v51/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..",
         'shopperLocale': 'ja-JP'
      :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 contains:

    • pspReference: Our unique reference for the payment.
    • resultCode: PresentToShopper
    • action: Object containing information about the voucher:
      • expiresAt: The date and time when the voucher expires.
      • reference: The reference number for the payment. 7-Eleven provides a 16-digit code, while other convenience stores provide a 6-digit code.
      • totalAmount: The currency and value of the amount due.

    Select a tab below to see the corresponding sample response:

    /payments response
    {
        "resultCode": "PresentToShopper",
        "action": {
            "paymentMethodType": "econtext_seven_eleven",
            "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": "7210640405797178",
            "totalAmount": {
                "currency": "JPY",
                "value": 10000
            },
            "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"
        }
    }
  3. Pass the action object to your front end.

Drop-in uses dropin.handleAction(action) to present the voucher to the shopper. The shopper can then print the voucher or take note of the reference number, and then pay in cash at convenience stores.

Present the payment result

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

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

resultCode Description Action to take
PresentToShopper Present the voucher. After you present the voucher 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

Use the econtext simulator to complete voucher payments in the test environment.

  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:
    • 7-Eleven: pspReference-135945-econtext_seven_eleven
      For example, 8815814176395518-135945-econtext_seven_eleven
    • Other convenience stores: pspReference-135945-econtext_stores
      For example, 8515814273533258-135945-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 登録.
    • To test 7-Eleven vouchers, select: セブン‐イレブン
  1. Wait for 15 minutes for the notification webhook.

Check the status of 7-Eleven and other Japanese convenience stores test payments 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