- Create a checkout session with the
recurring_paymentobject. - Perform a CIT to authorize and vault the customer’s payment method.
- Then use the returned
vaulted_tokenfor subsequent MIT charges.
Create checkout session for recurring payments
Before creating the transaction, you need to create the checkout session with therecurring_payment object populated in your checkout session request:
Free trial: When offering a free trial period, set the root amount.value to 0 and include the trial_billing object as shown in the example below. The actual recurring charge is defined in regular_billing, which informs the customer of the amount they will be billed once the trial ends.
Customer Initiated Transaction (CIT)
The CIT is the initial transaction where the customer authorizes recurring payments, such as when they subscribe to a monthly service. This transaction requires customer interaction and generates a token for future MIT transactions. The following example shows a complete CIT request:vault_on_success: true: This parameter indicates this is a recurring payment setup and generates the token for future MIT transactionscustomer_payer.id: Required together withvault_on_success. It must reference an existing customer (create it first with Create Customer). Without it the payment still succeeds but nothing is vaulted: the response carries an emptyvaulted_tokenand no errordetail.wallet.stored_credentials.usage: "FIRST": Indicates this is the initial transaction in a recurring seriesverify: Whentrue, enables a card verification flow through the wallet (for example, a zero-dollar authorization) instead of a regular payment charge.
Set
verify: true for free trial flows where amount is 0. Omit the field for standard paid CITs.The
vaulted_token is returned only in the CIT payment response. Wallet-vaulted instruments are intentionally not included in Retrieve Enrolled Payment Methods, so don’t rely on the customer’s payment-methods list to rediscover the token — store it (with any display metadata you need) when the CIT succeeds. A stored token can still be resolved individually with Retrieve Enrolled Payment Method by ID. See Stored Credentials.Merchant Initiated Transaction (MIT)
MIT transactions are processed automatically for subsequent billing cycles using the token generated during the CIT. The following example shows a complete MIT request:vaulted_token: The token returned in the CIT response; used to charge the customer in subsequent billing cycles without requiring re-authorizationtype: "CARD": The vaulted instrument is a card record."APPLE_PAY"is also accepted together with avaulted_tokendetail.card.stored_credentials.usage: "USED": Indicates this is a subsequent transaction in a recurring seriesworkflow: "DIRECT": A server-to-server charge; no checkout session and nopayment_tokenare needed