curl -X POST https://api.endofinance.cdc.com.br/v1/pix/charge \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"description": "Pedido #1234"
}'
import requests
response = requests.post(
"https://api.endofinance.cdc.com.br/v1/pix/charge",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"amount": 5000, "description": "Pedido #1234"}
)
print(response.json())
const response = await fetch(
"https://api.endofinance.cdc.com.br/v1/pix/charge",
{
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({ amount: 5000, description: "Pedido #1234" })
}
);
const data = await response.json();
$response = Http::withHeaders([
'Authorization' => 'Bearer ' . $apiKey,
])->post(
'https://api.endofinance.cdc.com.br/v1/pix/charge',
[
'amount' => 5000,
'description' => 'Pedido #1234',
]
);
HttpResponse<String> response = Unirest
.post("https://api.endofinance.cdc.com.br/v1/pix/charge")
.header("Authorization", "Bearer " + apiKey)
.header("Content-Type", "application/json")
.body("{\"amount\": 5000, \"description\": \"Pedido #1234\"}")
.asString();