Cancellation

A short-lived token safe to give a browser

Exchanges the stored capability for a token that carries the authorization fields needed to build a revoke transaction - and neither the customer's signature nor any ability to charge. Safe to put in a URL fragment; the contract still requires the payer's own wallet to send the transaction, so holding it grants nobody anything.

post/v1/subscriptions/revoke/session

Request

  • Base URL: https://api.p2flux.com
  • URL: https://api.p2flux.com/v1/subscriptions/revoke/session
  • 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

A cancel token.

cancel_tokenstring

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.

expires_atinteger
subscription_idstring

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

payerstring

An EVM address.

Example response

{
  "subscription_id": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708",
  "payer": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9"
}

Changes

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