#Mr Stinky Pants
1 messages · Page 1 of 1 (latest)
im trying to move from another card system
👋 Thanks for reaching out
the nth day of month to start a subscription?
Bit of a broad question! Is there a specific use case you're trying to account for?
these customers already have invoice dates
if you start a new subscription it starts today
i thought i could make life easy and just use the customers start date for the subscription
which could be years ago
and it would work the day of month out
Do you mean creating a subscription in a later day ?
yes
e.g. on card payment fails on the old system
say thats the 9th
customer comes today to update card
i still charge from the 9th
i dont want any pro rata
When creating a subscription you can set billing_cycle_anchor to a future timestamp to anchor the subscription’s billing cycle:
https://stripe.com/docs/api/subscriptions/create#create_subscription-billing_cycle_anchor
if i do this in dashboard it seems to make an invoice today and it says theres an upcoming invoice today also
yes that was the question - how to calculate that date
It depends on your integration and business logic. but you set the target future timestamp and pass it to that field:
subscription.billing_cycle_anchor
The timestamp need to be in UTC format
ill have a look cheers
how can you find a price with a certain £?
It's not possible right now to filter/search Prices by unit_amount
is it ok to put it in meta data?
Sure! unit_amount is immutable anyway so it can't be updated/changed
Then you can use the Search API: https://stripe.com/docs/search#query-fields-for-prices
We do encourage use of the lookup_key for use cases like this, where you want to find a Price object by some arbitrary field
its just i give some customers a different price for a product
i was going to add a new price if it doesnt exist
yes lookup key looks right cheers
Yes guess you could use professional-40-monthly or something
No, that sets nickname: https://stripe.com/docs/api/prices/create#create_price-nickname
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
lookup_key is API only yep
ok cheers