Cancellation

Calldata that cancels one subscription

P2Flux cannot revoke a customer's on-chain authority - only their wallet can. This returns the transaction for them to send. Accepts either the stored capability (server-side) or a cancel token (customer-side).

post/v1/subscriptions/revoke/prepare

Request

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

Unsigned calldata.

chain_idinteger
payerstring

An EVM address.

tostring

An EVM address.

datastring
subscription_idstring

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

descriptionstring

Example response

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

Changes

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