SDK reference · Node SDK

prov.authorize.network.cancel

prov.authorize.network.cancel in Node SDK. Store side: a cancelled or refunded order gives the budget back.

Signature

prov.authorize.network.cancel(intentToken: string): Promise<{ object: "network_cancellation"; id: string; status: "cancelled"; amount: number; currency: string }>

Parameters

intentTokenstringRequired

Request fields

intent_tokenstringRequired
The order's token (an expired one is fine).

Returns

Promise<{ object: "network_cancellation"; id: string; status: "cancelled"; amount: number; currency: string }> The cancellation.

HTTP operation

POST /v1/authorize/network_orders/cancel: Cancel a network order

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/network_orders/cancel`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJuZXR3b3JrIjp0cnVlfQ.sig" }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.