#alexanderfarkas_api

1 messages ยท Page 1 of 1 (latest)

west basinBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1318928290064371754

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

tiny trout
#

๐Ÿ‘‹ happy to help

elfin viper
#

Hello, here is the code in Python if it helps.

invoice = stripe.Invoice.create(
    api_key=secret_key,
    stripe_account=account_id,
    customer=customer_id,
    days_until_due=365,
    description=invoice_description,
    pending_invoice_items_behavior="exclude",
    collection_method="send_invoice",
    application_fee_amount=None
    if secret_key is not None
    else application_fee_amount,
    currency=currency,
    metadata=metadata,
    payment_settings=dict(
        payment_method_types=[*STRIPE_PAYMENT_METHODS, "us_bank_account"],
    ),
)
tiny trout
elfin viper
#

Oh, great. I see. So it's required to exclude ACH in case something except USD is used

tiny trout
#

this is why we recommend using the automatic payment methods

#

which uses LPM filtering

#

instead of passing payment_method_types

elfin viper
#

Could you please suggest how to enable automatic payment methods for Invoices?

tiny trout
#

they are enabled by default

#

you just need to omit the

payment_settings=dict(
        payment_method_types=[*STRIPE_PAYMENT_METHODS, "us_bank_account"],
    )
#

part of your call

elfin viper
#

Still, it would be nice to restrict the payment_methods set, since we might not support some techniques these payment methods use.

E.g. we didn't support "payment_intent.processing" before enabling us_bank_account

#

Is it not possible?

tiny trout
elfin viper
#

If our clients are Stripe Connect accounts, we should configure it for every customer?

tiny trout
#

it depends

#

what charge types are you using?

#

Direct or Destination?

west basinBOT
elfin viper
#

I guess I need some help with this. Is that possible to find that information in the dashboard?

modest marsh
# tiny trout Direct or Destination?

Is your Platform charging the customer and sending the funds to the Connnected accounts?
Or Connected accounts charging the customers directly?

elfin viper
#

Our platform charges customers

#

on behalf of Connected Accounts by specifying "stripe_account" on each request

#

Also, we have several clients connected directly with their own api_key

modest marsh
elfin viper
#

Most of them are actually Connected. Some are not - just shared API key of their standalone Stripe account.

modest marsh
#

just shared API key.
Those will need to manage their payment method configurations themselves.

#

If you're using on_behalf_of it will use the payment method configuration of the Connected account.

#

What kind of Connected accounts are you using? Standard, Express, Custom?

elfin viper
#

Standard

#

We're not using on_behalf_of. Just stripe_account

#

I've looked through the documentation - we're using Direct charges

modest marsh
#

Our platform charges customers
on behalf of Connected Accounts by specifying "stripe_account" on each request
This suggested the oposite initially

#

Then each Standard account will manage their own Payment Method Configurations.

elfin viper
#

I wasn't familiar enough with the terminology, my bad ๐Ÿ™‚

#

Ok, so I guess we will keep using hardcoded set of payment methods ๐Ÿ˜„

#

Thank you very much for the help