Recurring payments

Current state, read from the chain

Everything about this subscription as the chain sees it. Use it to reconcile after downtime, and to decide whether a renewal is due without guessing from your own clock.

The signed terms are echoed under terms - compare terms.salt against the setup you finalized if you need to be certain a capability belongs to the plan you think it does.

post/v1/subscriptions/status

Request

  • Base URL: https://api.p2flux.com
  • URL: https://api.p2flux.com/v1/subscriptions/status
  • Auth: none required

Request body

subscriptionstring required

A signed P2Flux capability: payment intent (p2f1.), setup token (p2setup2.), subscription capability (p2s2.), cancel token (p2cancel1.) or refund token (p2refund1.). Opaque to the caller and unforgeable - the signature is what authorises the call. Treat it as a bearer secret: keep it server-side, never in a URL query or a log.

Response

Chain-derived state.

activeboolean
revokedboolean
revoked_confirmedboolean

Revoked deeply enough to act on. revoked is read at the head; only this one is settled.

expiredboolean
dueboolean
charged_this_periodboolean
subscription_idstring

A 32-byte hex value, lowercase. Transaction hashes and references.

period_indexinteger nullable
period_startstring nullable
period_endstring nullable
next_period_atstring nullable
allowance_unitsstring

An integer count of micro-USDC (6 decimals), as a string. 2500000 is 2.50 USDC. Used wherever a decimal would invite a rounding error - notably refund amounts.

allowance_unlimitedboolean
balance_unitsstring

An integer count of micro-USDC (6 decimals), as a string. 2500000 is 2.50 USDC. Used wherever a decimal would invite a rounding error - notably refund amounts.

expires_atinteger
termsobject

The signed authorization: payer, recipient, token, amount, amount_units, period, start, end, salt.

Example response

{
  "subscription_id": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708",
  "allowance_units": "2500000",
  "balance_units": "2500000"
}

Changes

No recorded changes to this operation across all 1 revision of this API.