Update Subscription Card
When a subscriber needs to change the card used for their subscription, the flow has two steps:
- Tokenize the new card — Create a checkout in “setup” mode and send the link to the customer so they can enter their new card.
- Update the subscription — When the customer completes the checkout, you receive the
payment_method_idvia webhook and use it to update the subscription.
Step 1: Create a tokenization checkout
Create a checkout with an item of amount 0 and charge_type: "one_time". This checkout only tokenizes the card without charging anything.
Response:
Send the checkout_url to your customer (via email, WhatsApp, within your app, etc.) so they can enter their new card.
Include the subscriber’s user_id so the checkout pre-fills their information (name, email, etc.).
Step 2: Receive the payment_method_id via webhook
When the customer completes the checkout, Recurrente sends a setup_intent.succeeded webhook to your configured endpoint. The payload includes the new card’s payment_method_id:
Save the payment_method.id — you’ll need it in the next step.
If you don’t have webhooks configured, you can also get the payment_method_id by doing a GET /api/checkouts/{id} on the checkout once it’s been paid. The payment_method.id field will be in the response.
Step 3: Update the subscription with the new card
Use the payment_method_id obtained to update the subscription:
Response:
From this point on, all future automatic charges for the subscription will use the new card.
If the subscription has a pending payment (e.g., a failed charge), Recurrente will automatically attempt to charge it with the new card when you update it.

