Are you looking for test card numbers?

Would you like to contact support?

Atenção, esta página não se encontra disponível em Português
Payment-method icon


Add Indonesian payment methods to an existing Component integration.

Use our Component to render Alfamart, Indomaret or bank transfer options in your payment form, and present the shopper with the payment voucher to complete the payment.

Before you begin

This page explains how to add to accept cash payments at convenience stores and bank transfers 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 Indonesian payments integration:

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

Show the payment method in your payment form

To present the Component in your payment form:

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

    • countryCode: ID
    • amount.currency: IDR.

    The response should now include type corresponding to the type of Indonesian payment method (bank transfer or convenience store).

    name type Kind of payment method
    Mandiri VA doku_mandiri_va Bank transfer
    CIMB VA doku_cimb_va Bank transfer
    Danamon VA doku_danamon_va Bank transfer
    BNI VA doku_bni_va Bank transfer
    BRI VA doku_bri_va (only available with a local entity) Bank transfer
    BCA Bank Transfer doku_bca_va (only available with a local entity) Bank transfer
    Alfamart doku_alfamart Convenience store
    Indomaret doku_indomaret Convenience store
    Bank Transfer doku_permata_lite_atm Bank transfer
  2. Add the payment method Component:

    a. Create a DOM element for the Component, placing it where you want the form to be rendered:

    <div id="doku-container"></div>

    b. Create an instance of the Component, and mount it. In this example, we'll mount the component for Alfamart using its component name doku_alfamart. You should also include:

    • dokuAlfamart.type: The contents of the type array of the object that you stored in the previous step. Alternatively, you can pass the entire paymentMethodsResponse object in AdyenCheckout.
    const dokuComponent = checkout.create("doku_alfamart", {
        type: dokuAlfamartData.type,
        onChange: handleOnChange

Make a payment

When the shopper selects to pay, the Component calls the onChange event, which contains a

  1. If state.isValid is true, collect the and pass this to your server.

  2. From your server, make a /payments request, specifying:

    • paymentMethod: The from the onChange event from your front end.
    • amount.value: The amount of the transaction, in minor units without decimals. For example, submit a value of 10000 IDR as 10000.

    Here is how you would make a payment request for 10000 IDR.

    curl \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
      "{ from onSubmit}paymentMethod{/hint}":{
    # Set your X-API-KEY with the API key from the Customer Area.
    adyen =
    adyen.api_key = "YOUR_X-API-KEY"
    response = adyen.checkout.payments({
      :amount => {
        :currency => "IDR",
        :value => 10000
      :reference => "YOUR_ORDER_NUMBER",
      :paymentMethod => {
        :type => "doku_alfamart",
        :firstName => "John",
        :lastName => "Smith",
        :shopperEmail => ""
      :returnUrl => "",
      :merchantAccount => "YOUR_MERCHANT_ACCOUNT"
    // Set YOUR_X-API-KEY with the API key from the Customer Area.
    // Change to Environment.LIVE and add the Live URL prefix when you're ready to accept live payments.
        Client client = new Client("YOUR_X-API-KEY", Environment.TEST);
        Checkout checkout = new Checkout(client);
        PaymentsRequest paymentsRequest = new PaymentsRequest();
        String merchantAccount = "YOUR_MERCHANT_ACCOUNT";
        Amount amount = new Amount();
        DefaultPaymentMethodDetails paymentMethodDetails = new DefaultPaymentMethodDetails();
        PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);
    // Set your X-API-KEY with the API key from the Customer Area.
    $client = new \Adyen\Client();
    $service = new \Adyen\Service\Checkout($client);
    $params = array(
      "amount" => array(
        "currency" => "IDR",
        "value" => 10000
      "reference" => "YOUR_ORDER_NUMBER",
      "paymentMethod" => array(
        "type" => "doku_alfamart",
        "firstName" => "John",
        "lastName" => "Smith",
        "shopperEmail" => ""
      "returnUrl" => "",
      "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': 10000,
          'currency': 'IDR'
       'reference': 'YOUR_ORDER_NUMBER',
       'paymentMethod': {
          'type': 'doku_alfamart',
          'firstName': 'John',
          'lastName': 'Smith',
          'shopperEmail': ''
       'returnUrl': '',
       'merchantAccount': 'YOUR_MERCHANT_ACCOUNT'
    // Set your X-API-KEY with the API key from the Customer Area.
    var client = new Client ("YOUR_X-API-KEY", Environment.Test);
    var checkout = new Checkout(client);
    var amount = new Model.Checkout.Amount("IDR", 10000);
    var details = new Model.Checkout.DefaultPaymentMethodDetails{
      Type = "doku_alfamart",
      FirstName = "John",
      LastName = "Smith",
      ShopperEmail = ""
    var paymentRequest = new Adyen.Model.Checkout.PaymentRequest
      Reference = "YOUR_ORDER_NUMBER",
      Amount = amount,
      ReturnUrl = @"",
      MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
      PaymentMethod = details
    var paymentResponse = checkout.Payments(paymentsRequest);
    // 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 });
    const checkout = new CheckoutAPI(client);
        amount: { currency: "IDR", value: 10000 },
        paymentMethod: {
            type: 'doku_alfamart',
            firstName: 'John',
            lastName: 'Smith',
            shopperEmail: ''
        reference: "YOUR_ORDER_NUMBER",
        returnUrl: "",
        merchantAccount: config.merchantAccount
    }).then(res => res);

    The /payments response contains:

    • resultCode: PresentToShopper
    • action: Object containing information about the voucher.
    /payments response
          "shopperName":"J Smith",
  3. Pass the action object to your front end. The Component needs the action object to present the voucher.

Present the payment result

Use the action object from the /payments response in createFromAction to present the voucher to the shopper.

As the voucher is an offline payment method, there is no need to handle the redirect back from the acquirer. We will send you a webhook notification informing you about the payment status.
The eventCode values you receive with your notification are:

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

Optional customization

You can customize the expiry date of the payment voucher. By default, the validity period is 48 hours. To change the validity of the voucher, contact the Support Team.

You can change the language of the payment voucher to Indonesian by using the language code id-ID.

Test and go live

Use our test vouchers and card numbers to simulate the payments.

Check the status of the test payments in your Customer Area, under Transactions > Payments.

Before you can accept live payments, you need to submit a request for online banking and cash payments at convenience stores in Indonesia in your live Customer Area.

See also