#nidhi-connect

1 messages · Page 1 of 1 (latest)

random viper
#

@pallid sleet transfers always come from your Stripe account balance, yes, that's how it works.

If you want to link the transfer to incoming funds from charging a card you should use source_transaction

pallid sleet
#

Ok so what is CHARGE-ID source transcation
source_transaction: "{CHARGE_ID}",

random viper
#

the ID of successful charge. So for a PaymentIntent it's paymentIntent.charges.data[0].id for instance

pallid sleet
#

const paymentIntent = await stripe.paymentIntents.create({
amount: 10000,
currency: 'usd',
payment_method_types: ['card'],
payment_method: paymentMethod, //SAVED_CARD_ID
transfer_group: 'testing',
});

After creating payment intent in response we got this

"data": {
"id": "pi_3KRwe8K2dQ4yKJXn0PCWFOmf",
"object": "payment_intent",
"amount": 10000,
"amount_capturable": 0,
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_3KRwe8K2dQ4yKJXn0PCWFOmf"
},
}

in which charges object contain empty data

random viper
#

you have to actually do the payment first.

#

like you need to confirm the PaymentIntent by providing a payment method, like usual.

pallid sleet
#

const paymentIntent = await stripe.paymentIntents.create({
amount: 10000,
currency: 'usd',
payment_method_types: ['card'],
payment_method: paymentMethod,
confirm: true
});

const transfer = await stripe.transfers.create({
amount: 7000,
currency: 'usd',
destination: 'acct_1KRvW32fSz8u2GJ7',
source_transaction: paymentIntent.charges.data[0].id
});

const secondTransfer = await stripe.transfers.create({
amount: 3000,
currency: 'usd',
destination: 'acct_1KRbnj2cmlKulia3',
source_transaction: paymentIntent.charges.data[0].id
});

#

is this correct now ?

random viper
#

seems like it! you can try it in test mode!

pallid sleet
#

I've tried this but after transferring the platform fee is 3.20 and the remaining amount is 96.80 but still i can transfer 70$ and 30$ in other account how ?

#

because the final amount after the stripe fee was 96.80 isn't it

#

and also i can't see any transfer amount details over here

random viper
#

it just works! but yeah you will give your platform a negative balance by doing that, so you probably don't want to transfer all the money, you should keep some for yourself for your own profit

random viper
pallid sleet
#

Negative balance in My admin account? OR in that accounts where I split and transferred?

#

Can you explain to me the whole calculation? Cos I can not understand this dashboard at all.