I need to connect my e-commerce website to Square up for the subscription. So I used some API like create customers and create subscriptions over there and face some issues like-
1) If I sent the same customer id and other details for the create subscription, each time it will create the subscription with a new ID. There is no validation for the already existing subscription.
2) Should I sent some extra data to the Create Subscription API so that I will manage it by my side.
3) How should I update the subscription and reactivate the canceled subscription if needed.
Thank you.
Hi there @jamtech 👋
I was able to run your questions by an API specialist, and here's what they had to say:
If you haven't already stumbled upon our resources for developers, I put together a post where I outlined all of the best ways to get help with API related questions over here - check it out! ✨
Hi,
I tried to update subscription by the UpdateSubscription endpoint but it returns the error
"errors": [
{
"code": "CONFLICT",
"detail": "Provided version 0 does not match actual subscription version 160[Redacted].",
"category": "INVALID_REQUEST_ERROR"
}
Please help me out to solve it.
Hey @jamtech,
Our API team said this error means you’re not passing in the correct version, so it can’t update the subscription.
You first should retrieve the subscription, which has the version, and then in UpdateSubscription supply the same version.
Hi,
1) I need to add or update the subscription plan frequency as per month or quarterly. How can I do that?
2) Should I pause the subscription and resume it?
Please explain these points.
Thank you.
The cadence can’t be changed after a subscription is created, so you would need to create a new subscription plan.
I'm getting these answers from our API team btw as I am not trained in API or web development so I can't assist much further than this.
I'd recommend checking out the Developer portal for more information.
Square Community