Cancel a Payment
POST
/v1/payments/{id}/cancel
const url = 'https://api.parasta.io/v1/payments/example/cancel';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.parasta.io/v1/payments/example/cancel \ --header 'Authorization: Bearer <token>'Cancels an unpaid payment. Returns 409 if already in a terminal state.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Responses
Section titled “ Responses ”Payment canceled
Media type application/json
object
id
required
string
amount
required
Smallest unit
integer format: int64
currency
required
string
network
required
string
status
required
string
pay_address
required
string
expires_at
required
string format: date-time
settlement
object
mode
required
Coin = keep crypto; krw = exchange to KRW at confirmation; splits = mixed
string
krw_account
Required when mode=krw
string
splits
Array<object>
object
destination
required
string
percent
required
number
metadata
object
key
additional properties
string
created
string format: date-time
Example
{ "id": "pi_abc123", "currency": "USDT", "network": "POLYGON", "status": "pending", "pay_address": "0x1234...abcd", "settlement": { "mode": "coin", "splits": [ { "destination": "coin" } ] }}Object not found
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
string
Example
{ "error": { "type": "authentication_error" }}Payment is not cancelable
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
string
Example
{ "error": { "type": "authentication_error" }}