#alvaro_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1406000614898405557
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Is this for the same customer as well? Currency/locale matters in terms of what payment methods are surfaced
Can you share 2 different invoice id's that were created identically?
API created invoice (Show few payment methods)
in_1RwSnOHNldZ6iRNjiBOJc46V
Manually created invoice (Show all payment methods)
in_1RwRe6HNldZ6iRNj1Zaaz01j
The first one explicitly was created with only 2 payment method types in the request
Those 2 creation requests are far from identical
collection_method: "send_invoice",
customer: "cus_SfiPM4EKgikG9n",
due_date:
"1759269600"
,
payment_settings: {
payment_method_types: {
0: "sofort",
1: "card",
},
},
pending_invoice_items_behavior: "exclude",
}```
You only passed in sofort and card as options
this was something I tried to see if it works
this invoice was manually created: in_1RwRe6HNldZ6iRNj1Zaaz01j
and has more payment methods, I can share another API invoice that we created
For example: in_1RuxGJHNldZ6iRNjl029u5Zg
this should show more payment methods
I'm taking over from my colleague. Give me a moment to catch up on the thread.
as you can see, the second invoice has more methods. Why do we have that difference?
Can you test this using the same customer and amount? Right now you're using different customers
Can you provide the invoice IDs here
not working id (first one): in_1RuxGJHNldZ6iRNjl029u5Zg
working id: in_1RwUeAHNldZ6iRNjOoaIZV61
both have the same customer and same amount
can this user: frank_gs_50111 join the thread?
Discord is actually closed, and I can't stay much longer. I'm looking internally to see if there's anything that stands out.
thanks, I appreciate your help
Ok, it looks like the requests being sent via the API is using a different payment method configuration (pmc_1PyfKvHNldZ6iRNjJph2ejoD) than the dashboard (pmc_1OPTivHNldZ6iRNjNwSwsCUJ)
You have two options here:
- Specify the payment method configuration to use when creating the Invoice [0]
- Enable the payment methods in the Billing Payments configuration within the Dashboard
[0] https://docs.stripe.com/payments/payment-method-configurations
Also, it looks like you're using a dated version of the API (2020-08-27) we recommend that you update the version of the API being used.
Create an Invoice
invoice = stripe.Invoice.create(
customer=...
collection_method='send_invoice',
due_date=...
pending_invoice_items_behavior="exclude"
)
# Create an Invoice Item
stripe.InvoiceItem.create(
customer=...
amount=...
currency="eur",
invoice=invoice.id,
description=...
this is they way I create the invoice
do you know how to create a invoice with the payment method configuration
It looks like updated the Payment Method Settings for "Billing Payments" should work now.