- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hi there @jamtech 👋
I was able to run your questions by an API specialist, and here's what they had to say:
- Sounds true - I highly doubt we validate that a subscription already exists for the customer, because you have the ability to create multiple subscriptions for a single customer.
- What extra data do you have in mind? The full body of a Subscription can be seen here, and you cannot send anything beyond the fields listed here.
- You can update a subscription by using the UpdateSubscription endpoint.
As for reactivating a canceled subscription, you can pass null to the canceled_date field in the above UpdateSubscription endpoint to clear the cancellation. The customer should then be sent an invoice as usual at the end of the subscription. However - if it’s already been canceled (in a CANCELED state), then it can’t be updated, so you would need to create a new subscription.
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! ✨
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
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.
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
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.
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report