Card Payment - Subscription (Two Clicks)

Two clicks feature allows you to capture customer's card number, expiry date, email and phone number as a TWO_CLICKS_TOKEN. For successive payments by the same customer the TWO_CLICKS_TOKEN can be utilized to pre-fill the details. Customer just needs to fill out the CVV number to finish the payment.

To activate subscriptions/recurring for your merchant account in production, please reach out to your Midtrans PIC or Support team.

There are two steps required to utilize two clicks feature:




Initial Transaction


  • Create SNAP_TOKEN with credit_card.save_card value set to true
  • Customer will be presented with save option when they fill out the credit card details
  • If customer chooses the save option, then the Transaction Result will have two extra fields namely saved_token_id and saved_token_id_expired_at



Successive Transactions


  • Create SNAP_TOKEN with credit_card.card_token value set to TWO_CLICKS_TOKEN saved during the initial transaction
  • Customer will be presented with pre-filled credit card number, expiry date, email and phone number