#Avtar-customer

1 messages · Page 1 of 1 (latest)

faint coral
#

Hi. It sounds like you use Customer belongs to another account

#

If you can give me the request id req_xxx it's faster to check

odd plume
#

Can you please let me know how i can create customer with connected account scope

faint coral
#

You want to call Create Customer API, but specify the Stripe header account pointing the connected account

odd plume
#

And from where i get req Id ?

#

You want to call Create Customer API, but specify the Stripe header account pointing the connected account

Yes

faint coral
odd plume
#

req_EQr9NqxY1Nikhe

#

Here is the rewuest id

#

request*

faint coral
#

source: "cus_MHTpF22GKxxWYe",

#

May I know why are you passing a Customer Id to a source? Which Doc are you following?

odd plume
#

I want to pay to connected account , which is working fine. On dashboard it shows guest customer.

Then another requirement is that i want to pay with my saved card when i paid second time.

So card are connected with customer, thats why i pass customer id.

#

Can you please let me know how i pay with saved card second time.

How i can get list of saved card without customer?

I am creating payment intent, then i use payment sheet on flutter side

faint coral
#

I am not familiar with passing a Customer Id to a source. But okie

#

Looking at cus_MHTpF22GKxxWYe I think it belongs to the Platform account acct_1FZxs2CjFYL1YQCi

#

While you are calling this request in Connected account using a Stripe Account header

#

correct?

odd plume
#

Yes correct

#

stripe1.paymentIntents.create({
amount: req.body.amount * 100,
source:customer_id,
currency: "usd",
application_fee_amount: (req.body.amount/100) * 100 ,
automatic_payment_methods: {
enabled: true,
},
}, {

    stripeAccount: account_id,
  }).then((pay) => {
#

Here is my code

faint coral
#

Yep, so it's expected that the Connected Account wouldn't "understand" the Customer

#

an Account only understand things on its own scope

odd plume
#

Okay, Can you guide me how i can save card then how i can pay with saved card seconf time

#

I wnt to pay to connected Account

faint coral
#

Let's taking a step back.

#

Do you want to save the card from your customer and charge them with the saved card?

odd plume
#

YYes

faint coral
#

customer != connected account. Why do you want to pay to Connected Account?

#

Normally there are the customer, the platform merchant (you) then the connected account (other business partner, a company)

odd plume
#

Our application have two type of users

  1. Donor(having customer account)
  2. NGO's (having connected account)
    I want to pay from customer to connected account

For exapmple
i pay $1
Stripe fee 0.33
Application fee 0.01
Transfer to connected account 0.66

faint coral
#

Sure. Have you tried 2 fund flows Destination Charge or Separate Charges and Transfers?

#

Sound perfectly fit for those flows

odd plume
#

Not yet can you share any documentation for that

faint coral
#

Sure

odd plume
#

Okay let me check and will back to you.
Thanks for your time

faint coral
#

Np and good luck!

odd plume
#

The client_secret provided does not match any associated PaymentIntent on this account.

Receive this error when try destination charge

Here is req id : req_C5CnSVkyjAyIKL

faint coral
#

That's a client request? Destination Charge is purely a server flow

odd plume
#

Means i need to remove customer id ?

faint coral
#

No I mean that request doesn't show how you implement Destination Charge. The client secret you passed in, which Payment Intent is it?

odd plume
#

stripe1.paymentIntents.create(
{ amount: req.body.amount * 100,
currency: 'usd',
application_fee_amount: (req.body.amount/100) * 100,
transfer_data: {
destination: account_id,
},
}
).then((pay) => {

#

Here is my code

#

Have a look please

faint coral
#

Yes look good. Can you give me the generated PaymentIntent Id? pi_xxx

#

It's possible that your flutter is using a Stripe Account header, which makes it looks inside the Connected Account. While you are using Destination Charge, the PaymentIntent lives under the Platform account instead

odd plume
#

"pi_3LdTQJCjFYL1YQCi0MLcEBPY"

#

Here is flutter code

await Stripe.instance
.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
paymentIntentClientSecret: paymentSetupIntentClientSecret,
// setupIntentClientSecret: paymentSetupIntentClientSecret,
customerEphemeralKeySecret: ephemeralKey,
customerId: customerID,
applePay: true,
googlePay: true,
testEnv: true,
merchantCountryCode: "US",
allowsDelayedPaymentMethods: true,
currencyCode: "USD",
style: ThemeMode.light,
merchantDisplayName: 'Indigo Donation'))

Can you have a look on it

faint coral
#

It looks fine indeed. But when you initialized flutter, didn't you passing in the stripe account id?

odd plume
#

Yes,

Stripe.stripeAccountId = userStripeID;
Stripe.merchantIdentifier = AppStrings.merchantIdentifier;
Stripe.publishableKey = AppStrings.publishableKey;
await Stripe.instance
.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
paymentIntentClientSecret: paymentIntentClientSecret,
// setupIntentClientSecret: paymentSetupIntentClientSecret,
customerEphemeralKeySecret: ephemeralKey,
customerId: customerID,
applePay: true,
googlePay: true,
testEnv: true,
merchantCountryCode: "US",
allowsDelayedPaymentMethods: true,
currencyCode: "USD",
style: ThemeMode.light,
merchantDisplayName: 'Indigo Donation'))

faint coral
#

Let's remove that line with Stripe.stripeAccountId

odd plume
#

ok let me check

hot sigilBOT
#

This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact