API Reference

Subscriptions allow you to charge a customer on a recurring basis.

Related guide: Creating Subscriptions.

Subscription Object

{
  "id": "sub_c26WqxP13PEG0pIt2TvAGPmyK9kDnD4kGR4tri",
  "object": "subscription",
  "amount": 10.99,
  "blockchain": "Ethereum",
  "checkout_session_id": "cs_a1U7SSk86e6DUcjD9Zg7c26WqxP13PEG0pIt2TvAGPmyK9kDnD4kGR4tri",
  "created": 1671995248,
  "duration": 3600,
  "from": "0x7C5E84A6b64435783D6A793Aeff1cd517fF8d246",
  "next_charge": 1671995248,
  "status": "active",
  "to": "0x7C5E84A6b64435783D6A793Aeff1cd517fF8d246",
  "token": "USDT",
  "transaction_hash": "0x0460f2b4ae63bfb2dfc91afb0abca1ca17097651caa145c7a9a6bfd0f1e2bd48"
}

Attributes

AttributeTypeDescription
idstringUnique identifier for the object.
objectstringA string representing the object’s type. Objects of the same type share the same value.
amountnumberThe total amount of the subscription.
blockchainstringBlockchain of the subscription, one of BNB Smart Chain, Ethereum, Arbitrum, Optimism, Polygon, Polygon zkEVM.
checkout_session_idstringThe ID of the Checkout Session for a link between objects.
creatednumberThe time at which the Subscription was created. Measured in seconds since the Unix epoch.
durationnumberPeriod of subscription in seconds.
fromstringThe address of the customer.
next_chargenumberThe time at which the next charge is. Measured in seconds from the Unix era.
statusstringThe status of the Subscription is one of active, canceled, failed, or waiting.
tostringThe address to which the subscription payment is made.
tokenstringToken of subscription, one of USDT, USDC, DAI, and BUSD.
transaction_hashstringThe transaction hash.