#Dev-Ahmed-Hasnain
1 messages · Page 1 of 1 (latest)
Do you have an existing payment method ID or how do you collect a payment method?
yeah we have cards saved in the system. we have payment ids.
If you have an existing payment method ID (pm_xxx), you can set it directly to default_payment_method when creating a subscription: https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method
and one more question please.
will the payment deduct automatically after one month if i set the interval to a month after activating the subscription ?
Yes when the collect_method is set to charge_automatically: https://stripe.com/docs/api/subscriptions/create#create_subscription-collection_method
Default for collect_method is charge_automatically
thanks. so if i want to test subscripton how will i do it. like i cant wait one week or a month to make another payment. is there a way to test subscription payment after an hour ?
Stripe provides test clocks for you to advance the time and test subscription: https://stripe.com/docs/billing/testing/test-clocks
No problem! Happy to help 😄