#dr_ironbeard
1 messages · Page 1 of 1 (latest)
Hello! What help do you need exactly?
Customer is cus_PQfLhkzoFExEeI
So I created a customer locally in order to start a subscription
but never got the proper stripe ID for the customer during the initial transaction
Now that the Customer, Subscription, and Invoice have been properly created..what do I need to do to activate their subscription?
Usually in the checkout process I get a client_secret and pass it to the payment element, but I can't do that right now
Why can't you do that? What's preventing you from fetching the client secret?
Uhm, I guess I can I've just never done it manually.. let's see.
Subscriptions generate Invoices, and Invoices create Payment Intents, and those Payment Intents have client secrets. You can fetch all of those from the API.
Well, wait.. I can get the client secret. But I usually finalize the transacvtion by passing that to the front end and using Stripe Elements.
If there's a specific issue you're hitting let me know and I'd be happy to help further!
So how do I finalize/pay the invoice manually?
You do it the same way, you pass it to the frontend and confirm using Stripe Elements.
But I'm not the customer...I can't log into my website as them and I don't know their card number to fill out in Elements
Usually the client secret would have been passed to the front end, but that process was interupted by a server issue.
So the Customer never provided their payment details?
They did. They have a PaymentMethod on file
Ah, okay, so you want to attempt to pay this in an off-session transaction?
Yeah, I think so.
actually, I just realzied that the PaymentMethod might not have been created on Stripe's servers
Oh wait, their payment method is pm_1OboE2CoTIfwbn28Ll4hNsvR
It might not be attached to the customer though
cus_PQfLhkzoFExEeI
Yeah, that one isn't attached to a Customer.
Hmm, it should be attached to cus_PQfLhkzoFExEeI, I think that process got interupted when the server crashed
You can try to attach the Payment Method to the Customer directly, which is normally not recommended (you should be using a Setup Intent while the Customer is on-session): https://stripe.com/docs/api/payment_methods/attach
If that succeeds you can then attempt to pay the Invoice off-session by setting off_session to true: https://stripe.com/docs/api/invoices/pay
Okay, I think I got the PM attached
Can I use the Stripe dashboard to pay this invoice since the PM is now attached to the user?
I don't know, we're focused on developer questions here, we're not Dashboard experts.
I recommend you attempt to pay it using the API I linked above with off_session set.
I think that worked, thanks!
Happy to help!