Create a subscription (Checkout)
POST/v1/subscriptions
Creates a new subscription linked to a plan.
Payment Method Options:
- Use
cardTokenIdto reference an existing, active card - Use
paymentMethodto register a new card with this subscription
Card Validation Flow (when using paymentMethod):
- If
validateCard: true(default): A small test charge (e.g., R$ 1.50) is made to the card. The customer must check their card statement and callPOST /v1/cards/{cardTokenId}/activatewith the exact value. After activation, pending subscriptions using that card will have their first charge processed automatically. - If
validateCard: false: The card is used immediately and the first charge is processed.
Using an existing card (cardTokenId):
- The card must be active (not pending activation)
- The first charge is processed immediately
Request
Responses
- 201
- 400
- 401
- 404
Subscription successfully created
Invalid data or creation failure
Unauthorized - invalid credentials
Subscription plan not found or inactive