Cadastrar conta de saque
curl --request POST \
--url https://api-payment.safefypay.com.br/v1/cashout-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pixKeyType": "Email",
"pixKey": "financeiro@empresa.com",
"holderName": "Empresa Exemplo LTDA"
}
'import requests
url = "https://api-payment.safefypay.com.br/v1/cashout-accounts"
payload = {
"pixKeyType": "Email",
"pixKey": "financeiro@empresa.com",
"holderName": "Empresa Exemplo LTDA"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pixKeyType: 'Email',
pixKey: 'financeiro@empresa.com',
holderName: 'Empresa Exemplo LTDA'
})
};
fetch('https://api-payment.safefypay.com.br/v1/cashout-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-payment.safefypay.com.br/v1/cashout-accounts"
payload := strings.NewReader("{\n \"pixKeyType\": \"Email\",\n \"pixKey\": \"financeiro@empresa.com\",\n \"holderName\": \"Empresa Exemplo LTDA\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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(string(body))
}HttpResponse<String> response = Unirest.post("https://api-payment.safefypay.com.br/v1/cashout-accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pixKeyType\": \"Email\",\n \"pixKey\": \"financeiro@empresa.com\",\n \"holderName\": \"Empresa Exemplo LTDA\"\n}")
.asString();{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pixKeyType": "Cpf",
"pixKey": "<string>",
"holderName": "<string>",
"bankName": "<string>",
"status": "Active",
"isDefault": true,
"createdAt": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pixKeyType": "Cpf",
"pixKey": "<string>",
"holderName": "<string>",
"bankName": "<string>",
"status": "Active",
"isDefault": true,
"createdAt": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": null,
"message": null,
"error": {
"message": "A criação de contas de saque via API não está habilitada para esta organização.",
"code": "feature_not_enabled"
}
}Cashouts
Create cashout account
Create a PIX cashout account through the API
POST
/
v1
/
cashout-accounts
Cadastrar conta de saque
curl --request POST \
--url https://api-payment.safefypay.com.br/v1/cashout-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pixKeyType": "Email",
"pixKey": "financeiro@empresa.com",
"holderName": "Empresa Exemplo LTDA"
}
'import requests
url = "https://api-payment.safefypay.com.br/v1/cashout-accounts"
payload = {
"pixKeyType": "Email",
"pixKey": "financeiro@empresa.com",
"holderName": "Empresa Exemplo LTDA"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pixKeyType: 'Email',
pixKey: 'financeiro@empresa.com',
holderName: 'Empresa Exemplo LTDA'
})
};
fetch('https://api-payment.safefypay.com.br/v1/cashout-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-payment.safefypay.com.br/v1/cashout-accounts"
payload := strings.NewReader("{\n \"pixKeyType\": \"Email\",\n \"pixKey\": \"financeiro@empresa.com\",\n \"holderName\": \"Empresa Exemplo LTDA\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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(string(body))
}HttpResponse<String> response = Unirest.post("https://api-payment.safefypay.com.br/v1/cashout-accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pixKeyType\": \"Email\",\n \"pixKey\": \"financeiro@empresa.com\",\n \"holderName\": \"Empresa Exemplo LTDA\"\n}")
.asString();{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pixKeyType": "Cpf",
"pixKey": "<string>",
"holderName": "<string>",
"bankName": "<string>",
"status": "Active",
"isDefault": true,
"createdAt": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pixKeyType": "Cpf",
"pixKey": "<string>",
"holderName": "<string>",
"bankName": "<string>",
"status": "Active",
"isDefault": true,
"createdAt": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": null,
"message": null,
"error": {
"message": "A criação de contas de saque via API não está habilitada para esta organização.",
"code": "feature_not_enabled"
}
}Creates and activates a PIX cashout account immediately. Unlike the dashboard flow, this operation does not send a confirmation code.
The returned PIX key is masked. Keep the
The endpoint requires both the
cashoutAccounts.write credential scope and the API cashout accounts feature to be enabled for the merchant by an administrator. The API returns 403 when either is missing.id for future references.Authorizations
Token JWT obtido via /v1/auth/token
Body
application/json
Tipo da chave PIX.
Available options:
Cpf, Cnpj, Email, Phone, Random Example:
"Email"
Chave PIX a cadastrar.
Maximum string length:
100Example:
"financeiro@empresa.com"
Nome do titular da conta.
Maximum string length:
100Example:
"Empresa Exemplo LTDA"
Nome do banco, quando disponível.
Maximum string length:
100Quando true, define esta como a conta padrão de saque.