#stripe_dev-connect
1 messages · Page 1 of 1 (latest)
I am already looking at this article, but am still not sure how to complete the last step.
Hi, in above guide we are using the PaymentIntent API. What do you mean by PaymentMethod API?
This is the header on top of that section
So in the past I have used the customer id to create a charge on the connected account. Can I do it the same way if I have a cloned token?
I don't have a Payment Method Id, like it shows in the code
Any ideas @quaint elm ?
Sure, looking into this
Thanks
So in the past I have used the customer id to create a charge on the connected account. Can I do it the same way if I have a cloned token?
When you have a cloned token, you would need to create a Customer on your Connected Account first (according to the 3rd step in the guide), after that you can you that Customer Id as you have used before
The doc mentioned that you should have a PaymentMethod ID returned
Then, use the customer ID (e.g., cus_xxx) and the payment method ID (e.g., card_yyy) returned by the customers.create call to charge the customer.
Ok, yes I attach the token to the customer on the connected account and get a new customer. I then use the id of the new customer to create a charge
Good question, I am still using the payment intent. I should probably using something else
May be a ChargeService()?
You are using the PaymentIntentAPI?
Well I copied the code from the doc. But now that I am NOT using payment method id. I am thinking it will not work, so is there something else that I can use to create a charge?
This is what it looks like, would this work?
I added comments so you can follow it better
@quaint elm you think this would work?
Sorry, I am a bit swamped by other asks by now, will get back later!
ok, thanks. Let me know what you think after you have looked at the code
Okie, after you created a Customer you should have the Customer Id, alongside with a default_source. You then will need to use that Customer Id and Source Id to create a Charge like you are doing
Inside that ChargeCreateOptions, specify source: https://stripe.com/docs/api/charges/create?lang=curl#create_charge-source
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.