#Anshul-Connect and payments
1 messages · Page 1 of 1 (latest)
Hi, happy to help
So first, since you're still building your integration with no legacy code, we'd recommend you'd use Payment Intents instead of Charges
As for the Connected Accounts, are you using Direct or Destination Charges?
const chargeObj: any = {
amount: Math.ceil(amount),
currency: 'USD',
source: data.token,
}
const chargeData = await stripe.charges.create(chargeObj);
I am using this code for charge
@bright sable
So without payment intent we can't make transfer to connect account @bright sable ?
It depends on the model you're trying to put in place
But in all cases it's recommended to use the PaymentIntents which can give you access to multiple payment methods other than just cards
Actually, I want all transaction money to my stripe account and after that I want to pay some money to the users.
Then you're looking at our Destination Charges model
@bright sable I am little confused in it. From where the amount will be deducted.As I need this amount from the application end user.
whenever we talk about PaymentIntents it's the final customer that will be paying
In this charge we have
const paymentIntent = await stripe.paymentIntents.create({
amount: 1000,
currency: 'eur',
transfer_data: {
destination: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
},
});
So it is used to send money to transfer_data.destination connect account.
And as we are not taking the source from where we have to deduct money then how stripe detect it?
@bright sable
And as we are not taking the source from where we have to deduct money then how stripe detect it?
do you mean how would you get paid?
you could either use the customer https://stripe.com/docs/api/payment_intents/create#create_payment_intent-customer or the payment_method https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method fields
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thanks @bright sable
let me look into these links.
let me know if you need any more help