#bluelucifer32

1 messages · Page 1 of 1 (latest)

slate badgerBOT
solemn stratus
#

You need to attach the new card to your Customer, then call Update Subscription API with default_payment_method to the new card

quiet plover
#

how can i add that, this is what I not being able to figure out, how could i update the default payment method of existing customer from curl?

solemn stratus
quiet plover
slate badgerBOT
quiet plover
#

clock is not allowing me to add the declined card

#

this is what I am saying

solemn stratus
#

Ah yes because there is a card

#

you can attach first, but will fail later

quiet plover
#

then how can i test subscription cycle?

#

If it fail on the very first attempt?

#

i need to test on billing_reason = subscription_cycle not on subscription_created

solemn stratus
#

Advance past the first creation, to like mid of first cycle

#

then change to this card

#

then advance again pass a cycle change

green prairie
#

👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

quiet plover
#

Yes @green prairie , I need to test invoice.payment_failed case for billing_reason = subscription_cycle and i am having issue on adding card as default card.

green prairie
#

what my colleague was referring to is advancing the test clock

#

have you ever used test clocks before?

#

oh yeah sorry, just read through the conversation

#

so you are

#

then technically what needs to happen is basically you create a subscription with a valid payment method

#

after that

quiet plover
#

yes

green prairie
#

you advance the clock

#

for a week or two

#

then you attach the other payment method to the customer and update the subscription to use that payment method

quiet plover
#

okay, let me try that again

green prairie
#

and finally you advance the clock once more past the billing cycle

quiet plover
#

@solemn stratus @green prairie still not working

#

let me send you screen recording

#
  1. created clock
#
  1. added customer to clock with default payment menthod
#
  1. Created Subscription to product
#
  1. advance 2 weeks
#
  1. now tried to update card
#

now, could you please let me know on which step i am doing it wrong?

green prairie
quiet plover
#

can't i do it the way i am doing?

green prairie
#

I don't think it will work this way

#

oh wait

#

I just saw the card type

#

this will never get attached to the customer

#

the only that you can attach to a client is the pm_card_chargeCustomerFail

quiet plover
#

okay trying with card pm_card_chargeCustomerFail

green prairie
#

I deleted the image because it contains your test mode secret key

#

did it work?

quiet plover
#

testing