#suraj kumar

1 messages · Page 1 of 1 (latest)

prisma compassBOT
grizzled yarrow
#

Hi
You can't apply coupon to a SetupIntent. A coupon is used for a payment (amount >0)

knotty vector
#

we are having a subscription and we want to enable coupon functionality in it, how can we. do that ?

grizzled yarrow
#

For example, when you create a Subscription you pass the coupon:

const subscription = await stripe.subscriptions.create({
  customer: 'cus_4fdAW5ftNQow1a',
  items: [{price: 'price_CBb6IXqvTLXp3f'}],
  coupon: 'free-period',
});
knotty vector
#

okay.

#

i have some warnings, could you please help me

#

We've detected that you are using payment_method_types to configure payment methods. To manage payment methods from this page, replace payment_method_types with automatic_payment_methods. If you prefer to use payment_method_types, refer to the manual settings page.

grizzled yarrow
#

You should be using automatic_payment_methods instead of using payment_method_types when creating Payment/Setup Intents.

knotty vector
#

i'm using automatic_payment_methods only while creating setup intents but using payment_method_types while creating subscriptions.

#

is there anything wrong in this

grizzled yarrow
knotty vector
#

we have multiple subscription i we want to attach a payment method with a subscription so used it.

grizzled yarrow
alpine lily
#

Hi! I'm taking over from my colleague. Please, let me know if you have any other questions.