Skip to main content
GET
Get Subscription

Overview

Returns a subscription and its current state. Use it to check whether a customer’s subscription is still running, when it renews, or whether a cancellation is scheduled.
All amounts are in cents (e.g., 999 = $9.99). Dates are ISO 8601 strings.

Authentication

This endpoint requires your Secret API Key (server-side only). See Authentication for details.
Never expose your Secret API Key in client-side code. This endpoint should only be called from your backend server.

Path Parameters

string
required
The Payviox subscription ID (psub_...), as received in the subscription.id field of your webhooks.

The Subscription object

string
required
Payviox subscription ID, prefixed with psub_.
string
required
  • active: paid up, renews automatically. A subscription with a scheduled cancellation stays active until it ends — check cancel_at_period_end.
  • past_due: the last renewal charge failed and Stripe is retrying it.
  • canceled: ended. No further charges.
integer
required
Your price per period, in cents — the amount of the signup session.
integer
required
Amount charged to the customer at each renewal, in cents, fixed at signup. It includes the fees added for the customer at checkout, but not one-time add-on fees (such as fraud screening) charged on the first payment only — so it can be lower than what the customer paid at signup.
string
required
Always USD.
string
required
day, week, month or year.
integer
required
Number of intervals between two charges.
string
required
Human-readable period, e.g. every month or every 3 months.
string
Customer identifier, as passed when creating the signup session.
string
Customer email — the email passed when creating the signup session, or the one entered at checkout. Can be null.
string
required
order_id of the signup session. Renewal payments use {order_id}-{cycle} (e.g. order_12345-2).
array
Items of the signup session (one period).
object
Custom metadata of the signup session. It’s also sent with every renewal webhook.
string
Method the customer subscribed with: credit, apple_pay or google_pay.
string
Provider that charges the renewals: stripe.
string
ID of the subscription on your Stripe account (sub_...). null until Payviox has created it, usually within a minute of the first payment.
integer
required
Billing cycles started so far, signup included: 1 after signup, 2 after the first renewal, and so on. A renewal whose charge failed counts too.
string
End of the current billing period: when the next renewal is charged, or when a scheduled cancellation takes effect.
boolean
required
true when the subscription is scheduled to end at current_period_end (by you or by the customer). See cancel_requested_by for who can undo it.
string
When the subscription ended. null while it isn’t canceled.
string
Who ended it, once status is canceled (null before): api (your backend), manager (your dashboard), admin (Payviox support), payer (the customer, from the management link), provider (on Stripe — after all renewal retries failed, or canceled from your Stripe dashboard), system (Payviox — the signup payment was refunded, or the subscription couldn’t be created on Stripe: setup_failed).
string
Who scheduled the end-of-period cancellation: payer (the customer, from the management link), api (your backend), manager (your dashboard), admin (Payviox support) or system. null when no cancellation is scheduled — or when it was scheduled from your Stripe dashboard.Only the same side can undo it: you can resume api, manager and null; a payer cancellation can only be undone by the customer, and an admin/system one only by Payviox.
string
Set as soon as a cancellation is requested or scheduled:
  • requested_by_merchant — you, from the API or the dashboard
  • requested_by_customer — the customer, from the management link
  • initial_payment_refunded — the signup payment was refunded
  • admin — canceled by Payviox support
  • setup_failed:<code> — Payviox couldn’t create the subscription on Stripe after the first payment
  • a Stripe reason, when it ended on Stripe’s side: payment_failed (Stripe stopped retrying), cancellation_requested (canceled from your Stripe dashboard), provider, provider_deleted
Treat unknown values as informational.
string
required
Session ID of the signup payment.
string
Self-service page where the customer can see the subscription, cancel it at the end of the paid period, and undo that cancellation. Share it with your customer, for example in your confirmation email.
string
required
When the subscription was created (after the first payment succeeded).

Example Requests

Example Response

Error Responses

The API key is missing or invalid. This endpoint only accepts your Secret API Key.
No subscription with this ID belongs to your business. Subscriptions of other businesses are reported as not found too.

Subscriptions guide

End-to-end flow: Stripe setup, signup, renewals, cancellation

List Subscriptions

Filter by status or customer, paginate

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

subscription_id
string
required

Payviox subscription ID (psub_...)

Response

Subscription retrieved successfully

id
string
required

Payviox subscription ID (psub_ prefix)

status
enum<string>
required

active: paid up, renews automatically (also while a cancellation is scheduled, see cancel_at_period_end). past_due: the last renewal charge failed and Stripe is retrying it. canceled: ended, no further charges.

Available options:
active,
past_due,
canceled
amount
integer
required

Your price per period in cents — the amount of the signup session

unit_amount
integer
required

Amount charged to the customer at each renewal, in cents. Includes the fees added for the customer at checkout, but not one-time add-on fees (such as fraud screening) charged on the first payment only, so it can be lower than the first charge.

currency
string
required

Always USD

interval
enum<string>
required
Available options:
day,
week,
month,
year
interval_count
integer
required
interval_label
string
required

Human-readable period, e.g. every month, every 3 months

order_id
string
required

order_id of the signup session. Renewals use {order_id}-{cycle}

cycles_count
integer
required

Billing cycles started so far, signup included (1 = signup only). A renewal whose charge failed counts too.

cancel_at_period_end
boolean
required

true when the subscription is scheduled to end at current_period_end

initial_session_id
string
required

Session ID of the signup payment

created_at
string<date-time>
required
customer
string | null

Customer identifier from the signup session

customer_email
string | null

Customer email, from the signup session or entered at checkout

items
object[]

Items of the signup session (one period)

metadata
object

Metadata of the signup session

payment_method
enum<string>

Method the customer subscribed with (read with provider)

Available options:
credit,
apple_pay,
google_pay
provider
string

Provider that charges the renewals (stripe)

provider_subscription_id
string | null

ID of the subscription on your Stripe account (sub_...). null until Payviox has created it, usually within a minute of the first payment.

current_period_end
string<date-time> | null

End of the current billing period: date of the next renewal charge, or the date a scheduled cancellation takes effect

canceled_at
string<date-time> | null

When the subscription ended (null while not canceled)

canceled_by
enum<string> | null

Who ended it: api (your backend), manager (your dashboard), admin (Payviox support), payer (the customer, from the management link), provider (on Stripe, e.g. after failed retries or a cancellation in the Stripe dashboard), system (Payviox, e.g. signup payment refunded or setup_failed). null until the subscription is canceled.

Available options:
api,
manager,
admin,
payer,
provider,
system,
null
cancel_requested_by
enum<string> | null

Who scheduled the end-of-period cancellation: payer (the customer), api, manager (your dashboard), admin (Payviox support) or system. null when no cancellation is scheduled, or when it was scheduled from your Stripe dashboard. Only the same side can resume it: you (api, manager, null), the customer (payer) or Payviox (admin, system).

Available options:
payer,
api,
manager,
admin,
system,
null
cancellation_reason
string | null

Set as soon as a cancellation is requested or scheduled: requested_by_merchant, requested_by_customer, initial_payment_refunded, admin (canceled by Payviox support), setup_failed:<code>, or a Stripe reason such as payment_failed, cancellation_requested, provider or provider_deleted. Treat unknown values as informational.

management_url
string | null

Customer self-service page (view, cancel at period end, undo). Share it with your customer, e.g. in your confirmation email.