Send to another FeitPay account
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.feitpay.com/v1/internal-transfers"
payload := strings.NewReader("{ \"asset\": \"example\", \"recipient\": \"example\", \"amount\": \"59.90\", \"note\": \"example\" }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("FeitPay-Environment", "test") req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.feitpay.com/v1/internal-transfers';const options = { method: 'POST', headers: { 'FeitPay-Environment': 'test', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"asset":"example","recipient":"example","amount":"59.90","note":"example"}'};
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.feitpay.com/v1/internal-transfers \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'FeitPay-Environment: test' \ --data '{ "asset": "example", "recipient": "example", "amount": "59.90", "note": "example" }'Moves amount of asset from this organization’s available balance to the account behind recipient (a username), in the same mode (live to live, test to test). Nothing is sent on a network: both balances stay in FeitPay’s custody. Free by default; when a transfer fee is configured it is taken from amount and the recipient gets net_amount. When the organization’s payouts need a second member’s approval, the transfer does too: it is created pending_approval with the amount held, and completes when another member with payouts:approve approves it (POST /v1/internal-transfers/{transfer_id}/approve). Otherwise it is completed at once. Refused: the organization itself (transfer_to_self), an unknown username (recipient_not_found), an account that cannot receive now (recipient_unavailable), more than the available balance (insufficient_balance). Honors Idempotency-Key: a repeated request returns the same transfer and never moves the amount twice.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Active organization for dashboard sessions. Ignored for API keys (the key determines the organization).
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.
Unique key per logical create operation (max 255 chars). Replays return the original response; reuse with a different body returns idempotency_error.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The coin account to send from (asset key).
The recipient’s username, with or without @.
Amount of asset taken from the available balance.
Optional message the recipient sees.
Responses
Section titled “Responses”The transfer, completed or waiting for approval.
object
How this organization took part.
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.
Taken from the sender’s balance.
Integer amount in the asset’s smallest unit.
FeitPay’s transfer fee taken from amount (0 by default).
Integer amount in the asset’s smallest unit.
What the recipient gets (amount − fee).
Integer amount in the asset’s smallest unit.
The recipient (sent) or the sender (received).
object
The account’s username when the transfer was made (null if it had none).
The account’s name when the transfer was made.
The member or API key that asked for it (sent only).
The member who approved it (sent only).
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.
object
object
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.
Human-readable explanation in English.
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.
object
object
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.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}State conflict.
object
object
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.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Validation failed.
object
object
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.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Too many requests. See Retry-After.
object
object
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.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}