Pular para o conteúdo principal
POST
/
payouts
/
cURL
curl --request POST \
  --url https://public-api.kiwify.com/v1/payouts/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-kiwify-account-id: <api-key>' \
  --data '{
  "amount": 5000
}'
import requests

url = "https://public-api.kiwify.com/v1/payouts/"

payload = { "amount": 5000 }
headers = {
"x-kiwify-account-id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'x-kiwify-account-id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: 5000})
};

fetch('https://public-api.kiwify.com/v1/payouts/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.kiwify.com/v1/payouts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 5000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-kiwify-account-id: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://public-api.kiwify.com/v1/payouts/"

payload := strings.NewReader("{\n \"amount\": 5000\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-kiwify-account-id", "<api-key>")
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://public-api.kiwify.com/v1/payouts/")
.header("x-kiwify-account-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 5000\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://public-api.kiwify.com/v1/payouts/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-kiwify-account-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 5000\n}"

response = http.request(request)
puts response.read_body
{
  "id": "8606aae0-e036-4e55-998a-e0a8de7bf54f"
}
{
"error": "auth_error",
"message": "Invalid token: access token is invalid"
}

Autorizações

x-kiwify-account-id
string
header
obrigatório
Authorization
string
header
obrigatório

The access token received from the authorization server in the OAuth 2.0 flow.

Corpo

application/json
amount
number
Exemplo:

5000

Resposta

Request Payout

id
string
Exemplo:

"8606aae0-e036-4e55-998a-e0a8de7bf54f"