Add balance
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.feitpay.com/v1/balance-deposits"
payload := strings.NewReader("{ \"asset\": \"example\", \"amount\": \"59.90\", \"currency\": \"EUR\" }")
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/balance-deposits';const options = { method: 'POST', headers: { 'FeitPay-Environment': 'test', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"asset":"example","amount":"59.90","currency":"EUR"}'};
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/balance-deposits \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'FeitPay-Environment: test' \ --data '{ "asset": "example", "amount": "59.90", "currency": "EUR" }'Live mode only. Creates a deposit into the organization’s own custodial balance: the response carries the address, the exact amount of the coin to send and, on memo networks, the memo to include. Once the payment processor confirms the funds they are credited once to the balance as a deposit (never a sale: no payment webhook, not part of payment statistics or fees). Partial and late deposits follow the rules of payments (the amount received is credited once confirmed). amount is in currency (default: the organization’s default_currency) and must be at least the coin’s minimum (deposit_options of GET /v1/wallet). An optional per-organization daily limit may apply (deposit_limit_reached), and an organization creates at most 20 deposits per hour in each mode (429 rate_limited; deployments may configure another limit). Honors Idempotency-Key.
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
Asset key from deposit_options (usdt-trx, sol, …).
Amount in currency.
Default: the organization’s default_currency.
Responses
Section titled “Responses”Deposit created; send the amount to the address shown.
object
The transfer must include pay_extra_id.
Requested amount in currency.
Awaiting_payment (send the amount to the address) → confirming (funds seen, waiting for confirmations; also a partial or late deposit being credited) → succeeded (credited to the balance). expired: nothing arrived in time. failed: the processor reports the deposit failed. review: funds arrived but FeitPay checks them before crediting.
Exact amount of the coin to send.
Memo / destination tag to include.
Wallet URI for the QR code when the processor gives one.
PIX deposits only (asset: brl): the PIX “copia e cola” payload to pay from a Brazilian bank app (also drawn as the QR code). pay_address is empty for them.
PIX deposits only, once credited: the FeitPay PIX fee deducted when the deposit was credited (BRL, exact decimal); credited_amount is then the amount minus this fee.
What reached the balance (exact, in the coin).
Example
{ "object": "balance_deposit", "amount": "59.90", "status": "awaiting_payment"}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" }}