#francisco-invoice-paymentMethods

1 messages · Page 1 of 1 (latest)

cinder pathBOT
lament wharf
#

Hi 👋

Can you share an example Payment Intent ID?

craggy sparrow
#

Sure thing brb

#

pi_3OIzjiDDQAW5CNoR0cXaAE5m

lament wharf
#

Okay yes this Payment Intent has been created configured for a specific set of payment methods

payment_method_types: [
    "ach_credit_transfer",
    "card",
    "cashapp",
    "link",
    "wechat_pay"
  ],

How are you creating the Payment Element? Are you using Stripe.js to create the elements object with or without a client_secret?

craggy sparrow
#

we create the invoice on our python backend. we fetch the payment intent and return the client secret.

on the client side we conditionally render waiting for the transaction data to resolve with a secret.

#
{transactionData?.clientSecret && (
                <Elements
                  stripe={stripePromise}
                  options={{
                    mode: "payment",
                    currency: "usd",
                    amount: amount,
                  }}
                >
                  <StripePaymentForm
                    scheduledProjectIdForHandoff={scheduledProjectIdForHandoff}
                    projectTitle={projectTitle}
                    artistName={artistName}
                    clientSecret={transactionData?.clientSecret}
#

then in our stripe payment form we use the hooks: useStripe and useElements

lament wharf
#

In the <Elements> provider, try passing the paymentMethodTypes that match the payment methods found in the Payment Intent.

craggy sparrow
#

ok will do and I'll report back. Although one of the reasons we migrated to the new component was that we liked the extensibility of the automatic payment methods.

lament wharf
#

Specifically in the default payment terms section under Payment methods

craggy sparrow
#

yes, but on that screen in test mode we are not able to modify them only when live and the live mode does not have automatic payment methods as an option. Is this something that will be enabled down the line or tbd?

lament wharf
#

Sorry for the delay. This is being looked into but we don't expect any movement on it in the near term.