Route to get subscription details via susbcription ID
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.
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
Support Staff 1 Posted by Marc Guyer on 25 Nov, 2016 02:42 PM
Hi Jack -
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 bycode
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 byid
from that response but it may not be the current subscription. The latest subscription record is the current one. The others are history.The supported endpoints are specified in the documentation. Generally speaking, you reference records by your defined
code
.Jack Zabolotnyi closed this discussion on 29 Nov, 2016 03:05 PM.