#alvaro_api

1 messages ¡ Page 1 of 1 (latest)

light islandBOT
#

👋 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.

lament prairie
#

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?

shy portal
#

API created invoice (Show few payment methods)
in_1RwSnOHNldZ6iRNjiBOJc46V

Manually created invoice (Show all payment methods)
in_1RwRe6HNldZ6iRNj1Zaaz01j

light islandBOT
lament prairie
#

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

shy portal
#

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

hallow hound
#

I'm taking over from my colleague. Give me a moment to catch up on the thread.

shy portal
#

as you can see, the second invoice has more methods. Why do we have that difference?

hallow hound
#

Can you test this using the same customer and amount? Right now you're using different customers

shy portal
hallow hound
#

Can you provide the invoice IDs here

shy portal
#

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?

hallow hound
#

Discord is actually closed, and I can't stay much longer. I'm looking internally to see if there's anything that stands out.

shy portal
#

thanks, I appreciate your help

hallow hound
#

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)

#

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.

shy portal
#

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

hallow hound
#

It looks like updated the Payment Method Settings for "Billing Payments" should work now.