#Granat
1 messages · Page 1 of 1 (latest)
hmm. Not sure payment_intent should be null. What is the ID sub_xxx of a Subscription you've created so I can have a look?
still there @left relic ?
Sorry I did not anticipate such a fast response 😅 I can see now that the subscription with the product I linked didn't actually work. However, I tried this with another subscription with a monthly flat fee of 100 SEK as well and had the same issue sub_1N55ZcLOozXXwmpsXYoW7uBg
Here is the response of the POST and the body
I did expand the "latest_invoice.payment_intent" as you can see
yeah unfortunately the guide doesn't work for usage-based pricing that bills in arrears and thus has the first invoice be $0
what you can do instead is use the pending_setup_intent: "seti_1N55ZdLOozXXwmpsh0SGWEbM", and confirm that on the frontend to accept a card instead
it's not well documented but https://stripe.com/docs/billing/subscriptions/overview#using-setupintents is the general information
but basically you can expand pending_setup_intent as well, the SetupIntent has a client_secret, and you can use that on the frontend with https://stripe.com/docs/js/setup_intents/confirm_setup to accept and save a card to the customer. I believe you unfortunately also have to make sure to remember to update https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method manually too after it completes