Skip to content

Cancel a transfer waiting for approval

POST
/v1/internal-transfers/{transfer_id}/cancel
curl --request POST \
--url https://api.feitpay.com/v1/internal-transfers/example/cancel \
--header 'Authorization: Bearer <token>' \
--header 'FeitPay-Environment: test'

The held amount returns to the available balance. Only a transfer waiting for approval can be canceled.

transfer_id
required
string
FeitPay-Organization
string

Active organization for dashboard sessions. Ignored for API keys (the key determines the organization).

FeitPay-Environment
string
default: test
Allowed values: test live

test (default) or live for dashboard sessions. API keys determine the environment. Until the platform is in production, configuration (stores, webhook endpoints, payment links) is live and money movement answers payments_not_enabled.

The transfer, canceled.

Media typeapplication/json
object
id
required
string
object
required
string
Allowed value: internal_transfer
livemode
required
boolean
direction
required

How this organization took part.

string
Allowed values: sent received
status
required

Pending_approval (the amount is held; another member must approve) → completed (the recipient has it). canceled: canceled while waiting for approval, the held amount is back in the available balance.

string
Allowed values: pending_approval completed canceled
asset
required
string
name
required
string
symbol
required
string
chain
required
string
divisibility
required
integer
amount
required

Taken from the sender’s balance.

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
amount_units
required

Integer amount in the asset’s smallest unit.

string
/^[0-9]+$/
fee
required

FeitPay’s transfer fee taken from amount (0 by default).

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
fee_units
required

Integer amount in the asset’s smallest unit.

string
/^[0-9]+$/
fee_bps
required
integer
<= 10000
fee_rate
required
string
net_amount
required

What the recipient gets (amount − fee).

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
net_amount_units
required

Integer amount in the asset’s smallest unit.

string
/^[0-9]+$/
note
required
string
counterparty
required

The recipient (sent) or the sender (received).

object
handle
required

The account’s username when the transfer was made (null if it had none).

string | null
display_name
required

The account’s name when the transfer was made.

string
requested_by
required

The member or API key that asked for it (sent only).

string | null
approved_by
required

The member who approved it (sent only).

string | null
approved_at
required
string | null format: date-time
completed_at
required
string | null format: date-time
canceled_at
required
string | null format: date-time
created_at
required
string format: date-time
updated_at
required
string format: date-time

Example

{
"id": "trf_3kq8Zr1",
"object": "internal_transfer",
"direction": "sent",
"status": "pending_approval",
"amount": "59.90",
"amount_units": "99834",
"fee": "59.90",
"fee_units": "99834",
"fee_rate": "0%",
"net_amount": "59.90",
"net_amount_units": "99834"
}

Missing or invalid credentials.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}

Authenticated but not permitted. Any route may also answer request_blocked when abuse protection has blocked the client IP for a while.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}

Resource not found (or not visible to this tenant).

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}

State conflict.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}

Too many requests. See Retry-After.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}
Retry-After
integer