Set or change the organization's FeitPay username
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.feitpay.com/v1/account-handle"
payload := strings.NewReader("{ \"handle\": \"example\" }")
req, _ := http.NewRequest("PUT", 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/account-handle';const options = { method: 'PUT', headers: { 'FeitPay-Environment': 'test', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"handle":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.feitpay.com/v1/account-handle \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'FeitPay-Environment: test' \ --data '{ "handle": "example" }'3–30 characters of a-z, 0-9, . and _ (stored lower-case; a leading @ is ignored), not starting or ending with a dot and without two dots in a row. Usernames are unique (case-insensitive); some words are reserved (handle_reserved). A username given up stays held for the organization that used it for 30 days, so transfers meant for it cannot reach another account (handle_taken). Dashboard sessions with org:manage; the change is audited (organization.handle_updated).
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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The new username (a leading @ is ignored; stored lower-case).
Example generated
{ "handle": "example"}Responses
Section titled “Responses”The username after the change.
object
The username, or null while none is set.
What a sender sees when looking the username up (the organization name).
A free username built from the organization name, while none is set.
Example
{ "object": "account_handle"}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" }}