Route to get subscription details via susbcription ID

Jack Zabolotnyi's Avatar

Jack Zabolotnyi

24 Nov, 2016 10:19 AM

In response to customer request, CG replies with subscription which has it's own id. We're storing this id in our system. Is there any way to get subscription details based on this id in a separate route?

Same question can be extended to all invoices, plans, charges and other parts of models.

  1. Support Staff 1 Posted by Marc Guyer on 25 Nov, 2016 02:42 PM

    Marc Guyer's Avatar

    Hi Jack -

    Is there any way to get subscription details based on this id in a separate route?

    There isn't a way to get a customer record by subscription id. The subscription record can change. A pricing plan change, for example, includes a new subscription record. I expect that you'll want to reference a customer by code which is intended to be used as your system's unique identifier. Using that, you don't have to store any identifier in your app that you're not already storing.

    When you get the customer record via customers/get/code/[your_customer_code], you can get a subscription record by id from that response but it may not be the current subscription. The latest subscription record is the current one. The others are history.

    Same question can be extended to all invoices, plans, charges and other parts of models.

    The supported endpoints are specified in the documentation. Generally speaking, you reference records by your defined code.

  2. Jack Zabolotnyi closed this discussion on 29 Nov, 2016 03:05 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM