#_nerder

1 messages · Page 1 of 1 (latest)

languid shoreBOT
gray agate
#

Can you share a request id where you got that error?

woeful lake
#

let me check one sec

#

where i would find it?

#

in the platform account or connected account?

gray agate
#

Do you do direct or destination charges?

#

Based on your question it sounds like destination

#

But if you're doing direct, then that would explain the error. Direct charges use the connect account's payment method settings

woeful lake
#

here you have it

#

an example

#

oh no this is different

#

sorry

gray agate
#

Yep that's a direct charge

#

So it'll use the connect account's payment methods

woeful lake
#

oh ok 😦

#

what should I do then?

gray agate
#

Enable the pm on the connect account

woeful lake
#

ok, but one consideration is that the customer wasn't attempting to pay using sepa here

#

also, this account should not have sepa active at all (since is in the UK)

#

right now i'm hardcoding the payment methods in my request

#

like this:

    const stripeSub: Stripe.Subscription = await this.stripe.subscriptions.create(
      {
        customer: customerId,
        items: [
          {
            price: subscriptionPlan.code,
          },
        ],
        default_payment_method: paymentMethodId,
        cancel_at_period_end: subscriptionPlan.oneOff,
        application_fee_percent: gym.transactionFee.percent,
        trial_period_days: subscriptionPlan.freeTrial?.days ?? 0,
        payment_behavior: 'default_incomplete',
        off_session: true,
        payment_settings: {
          payment_method_types: ['card', 'sepa_debit'],
        },
        expand: ['latest_invoice.payment_intent', 'pending_setup_intent'],
        metadata: {
          profileId,
        },
      },
      {
        stripeAccount: gym.accountId.value,
      },
    );
#

what if I omit that entirely?

#

it would cause any issue?

gray agate
#

If you omit it then it'll use automatic payment methods

#

Assuming you're on one of the newer api versions and client libraries

woeful lake
#

yes I am

#

ok then, probably i should simply remove and use the default payment method the customer has setted up

languid shoreBOT
gray agate
#

Up to you

#

But direct charges are what you should be doing with standard connect, and that's what you're using

#

So the flow looks good