POST
Criar Transação
Cria uma transação de pagamento. Suporta PIX, BOLETO e CREDIT_CARD. Valores monetários são sempre em centavos (inteiros).
Endpoint
POST /api/v1/transactions/createHeaders
| Header | Valor | Status |
|---|---|---|
| Content-Type | application/json | Obrigatório |
| Accept | application/json | Obrigatório |
| X-Client-Id | <client_id> | Obrigatório |
| X-API-Key | <api_key> | Obrigatório |
| Idempotency-Key | tx_<unique> | Recomendado |
ℹO header Idempotency-Key é recomendado para evitar duplicidade de transações.
Request Body (PIX)
⚠Importante: Todos os valores monetários (amount, unitPrice, fee) devem ser informados em centavos (inteiros).
{
"amount": 500,
"currency": "BRL",
"paymentMethod": "PIX",
"installments": 1,
"customer": {
"id": "CUST-1729131560000",
"name": "João Teste",
"email": "joao.teste@exemplo.com",
"document": { "number": "24577481600", "type": "CPF" },
"phone": "11987654321",
"externalRef": "LEAD-1234"
},
"items": [
{
"title": "Produto X",
"unitPrice": 500,
"quantity": 1,
"tangible": true
}
],
"pix": { "expiresInDays": 1 },
"traceable": true,
"ip": "177.123.45.67"
}Response 200 (PIX)
{
"data": {
"id": "43836dbe-be02-47bc-965b-c51487b83b06",
"amount": 500,
"paymentMethod": "PIX",
"status": "WAITING_PAYMENT",
"pix": {
"qrcode": "0002010102122682...6304",
"expirationDate": "2025-10-18T01:38:51.943Z"
}
},
"status": 200,
"message": "Transação criada com sucesso."
}Exemplo cURL
curl -X POST https://www.wolfcash.app/api/v1/transactions/create \
-H "Content-Type: application/json" \
-H "X-Client-Id: <CLIENT_ID>" \
-H "X-API-Key: <API_KEY>" \
-d '{
"amount": 500,
"currency": "BRL",
"paymentMethod": "PIX",
"customer": {
"name": "João",
"email": "joao@ex.com"
}
}'