#ky - create sub

1 messages · Page 1 of 1 (latest)

edgy hornet
#

Hi yes. How are you currently creating the subscription? Can you share a request ID?

#

Or request body

tender zealot
#

I have the subcription id: sub_1LFfODFnn9huPxukTJo0yveg

#

is it enough?

hard ore
#

yup, that's perfect (i'm hopping in since @edgy hornet has to head out soon)

tender zealot
#

right, but even if I don't send the 'default_payment_method', i don't want to use the default one. The charge must fail

hard ore
#

Let's back up here for a second - can you tell me why you want this behavior? The subscription you sent over is a send_invoice subscription, so it wouldn't be attempting payment automtaically anyways

tender zealot
#

We change to "charge_automatically" when we get the event "invoice.created". We do that because we need to inform a bunch of things such as "statement descriptor", "application/platform fee"

hard ore
#

Gotcha - and why don't you want to use the default payment method?

tender zealot
#

because when we get a null payment method, it means it is a invalid payment method

hard ore
#

Let me rephrase - are you just trying to do this to test things out, or do you actually want your integration to not use the default payment method on the customer?

tender zealot
#

yes the second option

hard ore
#

But again - why do you not want to use the default payment method set on the customer? If the customer has a Payment Method set as the default, why would you not want to use it in the Subscription?

tender zealot
#

because we want to handle as an explicit error in our application, but when stripe uses the default payment method the payment succeeds.

hard ore
#

But if a customer has a default payment method there's no need to error - why would you want to error if they can attempt payment?

tender zealot
#

because the user is trying to pay with a card for example, and the card has some wrong information (ie mistyping) and then the payment will succeed

hard ore
#

We'll attempt payment, but if the card details are wrong enough that the issuer doesn't accept it then payment will fail

#

To be clear - there is no way to not use the default payment method unless you completely remove it from the customer (by unsettings invoice_settings.default_payment_method)

hard ore
#

@tender zealot Does that make sense?