Feature: Two Clicks

Two Click feature allows your customers to make purchases with just two clicks using previously saved card information and CVV number. Customers can save their card credentials and to trigger a payment, the customer has to input CVV only.

You need a token from Get Card Token response to charge with Two Clicks feature.




Two Clicks Initial Charge


{
    "payment_type": "credit_card",
    "credit_card": {
        "token_id": "4811117d16c884-2cc7-4624-b0a8-10273b7f6cc8",
        "save_token_id": true     // To flag that token is saved during initial charge
    },
    "transaction_details": {
        "order_id": "A87550",
        "gross_amount": 145000
    }
}

The credit_card object in Charge request to charge the initial transaction for Two Clicks feature is identical with Card Charge Request, with the additional attributes given below.

JSON AttributeDescriptionType
token_idToken ID represents customer's card information acquired from Get Card Token response.String



Two Clicks Initial Charge Response and Notifications


{
    "status_code": "200",
    "status_message": "Success, Credit Card 3D Secure transaction is successful",
    "transaction_id": "f50c0aef-b629-4a5b-957b-4c52f45e2e63",
    "order_id": "A87550",
    "payment_type": "credit_card",
    "transaction_time": "2014-08-25 11:21:48",
    "transaction_status": "capture",
    "fraud_status": "accept",
    "masked_card": "48111111-1114",
    "saved_token_id": "4811117d16c884-2cc7-4624-b0a8-10273b7f6cc8",
    "saved_token_id_expired_at": "2024-08-25 11:21:48",
    "approval_code": "1408940508666",
    "gross_amount": "145000.00",
    "bank": "bni",
    "channel_response_code": "00",
    "channel_response_message": "Approved",
    "currency": "IDR",
    "card_type": "credit",
    "on_us": true
}
{
  "masked_card": "48111111-1114",
  "approval_code": "1408940508666",
  "bank": "bni",
  "eci": "05",
  "saved_token_id": "4811117d16c884-2cc7-4624-b0a8-10273b7f6cc8",
  "saved_token_id_expired_at": "2024-08-25 11:21:48",
  "transaction_time": "2014-08-25 11:21:48",
  "gross_amount": "145000.00",
  "order_id": "A87550",
  "payment_type": "credit_card",
  "signature_key": "c77f17bf6a8dee35c19f02f2c33f9e4a2ee61b4bad15370a9f0f149a96909c8d887a0e0cddeb47bd02e88f369422aee6e323aaf938bb7bc5c55228459babbdb1",
  "status_code": "200",
  "transaction_id": "f50c0aef-b629-4a5b-957b-4c52f45e2e63",
  "transaction_status": "capture",
  "fraud_status": "accept",
  "status_message": "midtrans payment notification",
  "channel_response_code": "00",
  "channel_response_message": "Approved",
  "card_type": "credit",
  "on_us": false
}

Two Clicks initial Charge response is identical with Card Payment Charge Response, with the additional attributes given below.

JSON AttributeDescriptionType
saved_token_idToken ID of a card to be charged for the following transaction.String
saved_token_id_expired_atExpiry date of the Token ID.String

🚧

When initial transaction is successful, save the saved_token_id in your database.
This parameter is required for Two Clicks GET token in every following transaction.




Two Clicks Subsequent Charge


{
    "payment_type": "credit_card",
    "credit_card": {
        "token_id": "48111111-1114-7baba36c-5698-47cf-9170-80efd6a2e973"
    },
    "transaction_details": {
        "order_id": "A87551",
        "gross_amount": 145000
    }
}

In order to charge the Two Clicks transaction, you need the Card Token from GET Token.

JSON AttributeDescriptionType
token_idToken ID represents customer's card information acquired from Get Card Token response.String



Two Clicks Subsequent Payment Response and Notifications.

Subsequent Two Clicks Charge response is identical with Card Payment Charge Response.
Successful Two Clicks transaction is described as capture and is ready for settlement.