#valyav-subscriptions

1 messages · Page 1 of 1 (latest)

dusty helm
compact radish
dusty helm
#

any reason you can't just use default_payment_method there instead?

#

but yeah, that is expected, default_source is a legacy parameter and only works with legacy card_xxxx and src_xxx objects, not PaymentMethod pm_xxxx objects.

compact radish
dusty helm
#

not sure I understand what you mean, can you elaborate?

compact radish
# dusty helm not sure I understand what you mean, can you elaborate?

we are trying to perform automatic migration of subscription(thats why we cannot use checkouts), we have last4 numbers for card which was used for old subscription:

  1. we retrieve, using Stripe API, paymentmethods(card) for particular customer;
  2. chouse from retrieved paymentmethods card with correspond last4 and get it's ID;
  3. put that paymentmethod ID into request to create subscription, but in responce we've got an error that payment_method is missing.

We cannot use Default payment method, because our customers can have more than 1 card attached to account, and only 1 of that card can be Default payment method.

dusty helm
#
  1. put that paymentmethod ID into request to create subscription, but in responce we've got an error that payment_method is missing
    that's because you'e using default_source. It would work if you use default_payment_method like I said.
#

We cannot use Default payment method, because our customers can have more than 1 card attached to account, and only 1 of that card can be Default payment method.
sorry but that makes no sense:

#

a) default_source is already the same thing, it means "use this one card as the card for any future recurring payments". default_payment_method means exactly the same thing, it's just a new parameter for the current version of the API.

#

b) yes, of course customers can have multiple cards. You have to pick one of them and make it the default_payment_method(or default_source if you were doing this in a legacy way), since you have to have a card set that will actually get charged for future recurring payments, and that parameter is how you do ut.

compact radish
dusty helm
#

do you mean, one customer, with two separate subscriptions?

compact radish
#

yes

#

1 subscription created using first card, second subscription using second card

dusty helm
#

yep, totally possible then!

compact radish
#

as I understood, customer can have only 1 default payment method, and providing paymentID (in request to create subscription) which is not set as default will return an error

dusty helm
#

you can have a default payment method per-subscription

#

that's what you're missing I think.