/subscriptions/{id}

Reads a subscription. status stays active until it really ends; cancel_at holds the end date of a scheduled cancellation.

Server URLhttps://pay.contagorda.com/api/v1
GET/subscriptions/{id}

Authorization

Bearer token: an app key from Apps (sk_app_live_… or sk_app_test_…), or the tenant key from Settings (sk_live_… or sk_test_…). The key picks the mode: a live key only sees live data, a test key only sandbox data.

Parameters

idstring · pathrequired

The resource id.

Response Body

200The subscription.
idstringoptional
Format uuid
statusstringoptional

pending: waiting for the first payment; active: grants access (also while a cancellation is scheduled); past_due: a renewal failed and the gateway is retrying; canceled: ended.

One of pending, active, past_due, canceled
amountstringoptional

Price per interval, decimal with a dot.

currencystringoptional
intervalstringoptional
One of month, year
descriptionstring | nulloptional
gatewayobjectoptional

The configuration that handles the payment.

idstringoptional
Format uuid
namestringoptional
providerstringoptional
One of stripe, asaas, abacatepay, pagarme, cielo
sandboxbooleanoptional
customerobject | nulloptional
idstringoptional
Format uuid
external_refstringoptional

Your own id for the customer, as sent to /connect.

emailstring | nulloptional
namestring | nulloptional
documentstring | nulloptional
phonestring | nulloptional
address_line1string | nulloptional
address_line2string | nulloptional
address_numberstring | nulloptional
neighborhoodstring | nulloptional
citystring | nulloptional
statestring | nulloptional
zipcodestring | nulloptional
countrystring | nulloptional
metadataobjectoptional

What the product sent with the checkout, echoed back on the subscription and on every renewal cycle.

current_period_endstring | nulloptional

End of the paid period, when the next renewal is charged. Can be null in subscription.activated; the date then arrives in subscription.updated.

Format date-time
cancel_at_period_endbooleanoptional

true once a cancellation is scheduled for the end of the period.

cancel_requested_atstring | nulloptional

When the cancellation was asked for.

Format date-time
cancel_atstring | nulloptional

When a scheduled cancellation ends it.

Format date-time
replacesstring | nulloptional

The subscription this one replaced (a plan change).

Format uuid
canceled_atstring | nulloptional

When it ended.

Format date-time
created_atstringoptional
Format date-time
linksobjectoptional
selfstringoptional
Format uri
401Missing or invalid secret key.
errorstringoptional

What went wrong.

404No such resource for this tenant.
errorstringoptional

What went wrong.

Are you sure?

Keyboard shortcuts

⌘ KSearch and navigate⌘ JOpen and close the Workbenchg hHomeg pPaymentsg cCustomersg sSubscriptionsg aAppsg gGateways?This listEscClose