Purchase credits
Purchase a fixed credit pack or choose a whole credit quantity at the subscription plan price and minimum. Charges the saved payment method and adds purchased credits. A credit pack that the subscription’s plan version does not sell is rejected with credit_pack_unavailable.
Encabezados
Cuerpo
- Option 1
- Option 2
Where the customer returns after paying. When it is set and the subscription has no saved payment method, or the saved method is declined or asks for authentication, the response has status requires_checkout and a checkoutUrl where the customer pays this purchase and saves the method in one step. Without it, the request is rejected in both cases. A saved method is always charged directly first, and a payment that fails for any other reason is rejected either way.
Respuesta
Success
succeeded when the payment was confirmed and the credits were added. processing when the payment method confirms later: the credits are added once the payment is confirmed, and nothing is added if it is declined. requires_checkout when successUrl was sent and the subscription has no saved payment method or the saved one was declined: the credits are added once the customer pays at checkoutUrl.
succeeded, processing, requires_checkout