#manuel_api

1 messages ¡ Page 1 of 1 (latest)

raven karmaBOT
#

👋 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/1417144784417718436

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

random flame
gentle wren
#

But then when I make a payment I don't see anything wrong.

random flame
#

That card is used to decline after you attach the payment method to the customer. If you try to charge again, 4000000000000341 it should error out.

#

Can you try that?

gentle wren
#

let me try again because i did that and nothing happened and the payment was succesful

random flame
#

Did it work?

raven karmaBOT
gentle wren
#

nah

#

the subscription has changed evt_1S7d1jESRxUGxqvh551NdbkC

delicate wind
#

Hello, that invoice succeeded because it has a balance due of 0 so the card didn't factor in

gentle wren
#

and this request? req_Uet09uzQKVbUto

#

the same thing?

delicate wind
#

Looking, but you can check this yoruself by retrieving the invoice in the API or looking at it in the dashboard

gentle wren
#

yeah im seeing the invoice

#

but why is 0 ?

delicate wind
#

For that second event, the invoice is more than 0, but you used Link as a payment method. I don't think the test card is expected to work that way when you use it through Link

gentle wren
#

so... how can i test the cards for failed payments?

delicate wind
#

In the first case it was because the customer had enough balance to cover the amount of the invoice

#

When the payment element gives you the option to pay with different payment methods, you choose "Card" not "Link"

#

Here, I would recccommend creating a new customer to test with

gentle wren
#

When a card is used with insufficient funds, is there a way to know if the payment has failed? How can I do this?

There are also use cases where a customer has a card already added and has made payments previously, and suddenly one day there's no more money on the card. What happens when this happens? Is there an event? How can I find out?

delicate wind
gentle wren
#

ok

#

and can i get those payment intent for every customer_

#

?*

delicate wind
#

Apologies for missing that quesiton. Can you tell me more about what you are trying to do overall here? Like are you trying to handle declines during your payment process, or do something else?

There are also use cases where a customer has a card already added and has made payments previously, and suddenly one day there's no more money on the card. What happens when this happens? Is there an event? How can I find out?
Unfortunately Stripe isn't notified of this so there isn't a way to get notified of this automatically. Either the user would have to try to initiate the payment again or you would

gentle wren
#

im trying to test the payment failed cards

#

but i cant test it with the test card

#

when a payment method has been created

#

When I use card 4000000000000341 it works as it's supposed to

#

but when i create the subscription and wants to upgrade the subscription how can i get a payment intent failed?

delicate wind
#

Once the card with that number has been saved to the customer, you should be able to just upgrade the subscription with prorations and that will try to charge them

#

It would have worked before, but the specific customer you tested with already had a credit balance for some reason, so the balance paid for the invoice without a payment being attempted. That is why I suggested creating a new customer, they won't have a balance

gentle wren
#

i created a new customer and the payment wasnt succesful because the test card that i was using (4000000000000341)

#

then i used the test card that allows me to do succesful payments (424242424242)

raven karmaBOT
gentle wren
#

._.

delicate wind
#

Nice, so you are able to test this properly now?

gentle wren
#

no

#

im getting this error

urban tree
#

Hi there - I'll be taking over for Pompey here, who needed to step away

#

the request that set pm_1S7f8WESRxUGxqvhAKKaPml5 as the invoice_settings.default_payment_Method on the Customer, which is what we're talking about in a Subscriptions context here, happened about 5 minutes after req_bqBBAoLrDihoKQ

#

req_bqBBAoLrDihoKQ = 2025-09-15 16:15:53
req_eyU3g3Sho0frM6 = 2025-09-15 16:20:17 (adding payment method)

gentle wren
#

what means 'past_due'?

urban tree