#ky - create sub
1 messages · Page 1 of 1 (latest)
Hi yes. How are you currently creating the subscription? Can you share a request ID?
Or request body
yup, that's perfect (i'm hopping in since @edgy hornet has to head out soon)
If you set 'default_payment_method' when you create the subscription (see https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method) that will override the default payment method that's set on the customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
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
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"
Gotcha - and why don't you want to use the default payment method?
because when we get a null payment method, it means it is a invalid payment method
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?
yes the second option
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?
because we want to handle as an explicit error in our application, but when stripe uses the default payment method the payment succeeds.
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?
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
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)
@tender zealot Does that make sense?