#lokis

1 messages ยท Page 1 of 1 (latest)

tame sedgeBOT
gaunt mesa
#

customer id - cus_O2c1crGrBWRPFJ

ashen kayak
#

req_xxx

gaunt mesa
#

req_UJihEA64N8xo8S

ashen kayak
#

That Invoice is $0, meaning it won't need a payment

#

So it will succeed automatically

gaunt mesa
#

hmmm, there was an invoice item added to it for $16 though

#

This is the flow:

  1. Created invoice item first using stripe.invoiceItems.create(customer: customerId, price: trialPriceId, currency),
  2. created the invoice using stripe.invoices.create(customer: customerId),
  3. Paid it using stripe.invoices.pay(invoice.id)

is this correct?

#

I'm not sure where the $0 invoice is coming from though

ashen kayak
#

Yeah but looks like the Invoice didn't pick up your Invoice Item. I don't know why but how about specifically specify it?

#

Create the Invoice first, then create the InvoiceItem point to it

gaunt mesa
#

sure, let me give it a try

#

that worked, thanks so much

#

how can I test incorrect cvc failures?

#

I tried the test card 4000000000000127 but since it is configured differently, it is failing much earlier in the flow

ashen kayak
#

That seems to be the correct card for incorect cvc

#

what do you mean by much earlier?

gaunt mesa
#

it is failing at the setup intent stage

#

before it even attempts to charge the card

ashen kayak
#

Ah yes because SetupIntent will trigger an authentication under the hood

#

There is only one card simulate decline after attaching 0341 but yes it's only for general decline

#

Sorry, I guess you can try a real card but with a wrong CVC?

gaunt mesa
#

Does stripe test mode accept real cards?

ashen kayak
#

Oh you are right, sorry that's not possible

gaunt mesa
#

๐Ÿ˜…

#

is there any other way to test this? we want to ensure our payment flows are working correctly before we go live

ashen kayak
#

If it's just for incorrect CVC, you could just use your Live key and use your own card, with incorrect cvc. Be sure to set minimal amount for avoid any accidental passing through transaction.

#

Sorry can't think of anything better

gaunt mesa
#

ok

#

thanks foe your help