x

Square Subscription Issues

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.

1,778 Views
Message 1 of 6
Report
5 REPLIES 5
Alumni

Hi there @jamtech 👋

 

I was able to run your questions by an API specialist, and here's what they had to say:
 

  1. 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.
     
  2. 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.
     
  3. 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! 

Valentina
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
1,710 Views
Message 2 of 6
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.

1,704 Views
Message 3 of 6
Report
Square Community Moderator

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.

Ashley C
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
1,672 Views
Message 4 of 6
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.
 

1,662 Views
Message 5 of 6
Report
Square Community Moderator

@jamtech

 

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.

Ashley C
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
1,641 Views
Message 6 of 6
Report