Get a subscription
shop.subscription.getStatus of a subscription you pay for: status (active | past_due | canceled | expired), period_no, current_period_end, next_charge_at. From 72 h before to 72 h after current_period_end the answer carries renew {quote_id, expires_at, total_usd, period_no, pay}: pay that quote with x402 (shop.order.pay) to buy the next period; the same quote is returned while it lives, a new one once it expired. Nothing is charged automatically unless a pull is set up (pull_mode base_preauth, tempo_keychain or mpp_subscription): otherwise the buyer's agent renews by paying. pull_mode mpp_subscription (day/week plans paid on Tempo with the MPP subscription intent) shows renewal_key = the address of the key you authorized; the platform renews each period with it and pays the gas, and cancel never touches the chain (revoke the key yourself with accessKey.revoke). Once the period is over unpaid the call fails with 402 subscription_renewal_due (same renew attached); 72 h later the subscription is canceled (status_reason unpaid). Another identity's subscription is 404.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subscription_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | Yes | ||
| renew | No | ||
| status | Yes | ||
| period_no | Yes | ||
| pull_mode | Yes | ||
| pull_setup | No | ||
| canceled_at | No | ||
| max_periods | Yes | ||
| renewal_key | No | ||
| access_until | No | ||
| status_reason | Yes | ||
| next_charge_at | Yes | ||
| subscription_id | Yes | ||
| current_period_end | Yes | ||
| preauthorized_periods | No |