Use /customers/:customerId/subscriptions
endpoint to fetch customer's subscriptions. This endpoint lists all active and stopped subscriptions, but it doesn't return expired ones.
You can find details about customer subscriptions here, like status, expiration date, price, payment method, or period.
NOTE: This API requires JWT to run. It should be put in the request header. See more in Authorization.
Tips!
nextPaymentPrice
includes applied coupons
Important
This API endpoint is not guaranteed to provide real-time results. Updating transaction status may be delayed due to required communication with a payment provider and other processes. Usually, such delay is minimal (<1 second). Because of such behavior, this API should not be used for validating entitlements - please use Get entitlements instead.
Please also note that granting entitlements is based on subscription status, not its expiration date. Even if the
expiresAt
date is in the past, a subscription status can still beactive
. This may occur for example during a Grace period, where access is allowed to continue for a set time after the expiration date is reached, therefore the subscription is terminated only after grace period ends.
Errors
HTTP Status code | Error code | Message |
---|---|---|
400 | REQ0003 | Invalid path parameters |
401 | AUTH0001 | Missing required JWT |
401 | AUTH0002 | Invalid JWT token |
500 | SXXXX (X - number) | Internal Server Error |