#vikasjson
1 messages ยท Page 1 of 1 (latest)
Hi @somber agate
You'd use a trial to offset the billing date as you desire: https://stripe.com/docs/billing/subscriptions/billing-cycle
can you please help me out in this
hi @somber agate thanks for your response
but i want to use this without trail, because i took amount from customer in the form of wallet
Form of wallet? I don't understand
actually we are providing the facility of wallet
customer can use their wallet amount to purchase the membership/subscription so they are not paying amount on the payment gateway so i want to create subscription without amount charge as i took amount from customer wallet
and this is not a trail also for the customer
its a actual subscription
I guess you could credit their balance then, to offset the payment of the initial invoice: https://stripe.com/docs/billing/customer/balance
Then the subscription will start as normal, not be a trial, and then there'll be an actual payment due in the next cycle
can we directly add the credit balance to customer account to stripe without making any payment
?
credit balance is the virtual money in customer stripe account right ?
Yep. Read the docs, outlines all of this
So the Stripe customer balance could reflect your 'wallet' balance
you mean the amount i took from the customer wallet, we can add that amount to the customer stripe account as a credit balance right and then use that credit balance for the current month subscription and next month it will start charging from the customer card ?
am i correct ?
Correct
ok thanks
i have 2 more questions
1 while we are creating subscription through api how can we use the credit balance for the current month and charging the amount from customer card next month as i need to set the default payment method to the subscription
this is my code for creating the subscription
const newSubscription = await stripe.subscriptions.create({
customer: pgCustomerId, // <-- your customer id from the request body
items: [{ plan: plan_price_id, quantity: 1 }],
// <-- plans and prices are compatible Prices is a newer API
default_payment_method: paymentMethodId, // <-- your payment method ID collected via Stripe.js
});
can you please help me in this
The balance will be automatically applied: https://stripe.com/docs/billing/customer/balance#:~:text=The credit balance automatically applies toward the next invoice finalized to a customer.
ohh okk means before creating the subscription i need to create the credit balance to the customer account and then it will automatically for the subscription creation from the credit balance instead of charging from the payment method and next month it will charge from the payment method if i am not wrong ?
Yep, should work! Easy enough for you to test
okk thanks
can you please share me the api doc for creating the credit balance to customer stripe account ?
some nodejs api doc or curl doc
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@somber agate thank you so much for your valuable support
i will reach out to you again if i faced any issue
np!
Thank you ๐