curl -X POST 'https://api.goatpay.com.br/v1/billings/create' \
-H 'X-API-Key: gp_live_SUA_CHAVE' \
-H 'Content-Type: application/json' \
-d '{
"method": "BOLETO",
"amount": 79.9,
"description": "Pedido 123",
"dueDate": "2026-08-15",
"externalReference": "pedido-123",
"customer": {
"name": "Cliente Exemplo",
"taxId": "12345678909",
"email": "cliente@exemplo.com"
}
}'
curl -X POST 'https://api.goatpay.com.br/v1/billings/create' \
-H 'X-API-Key: gp_live_SUA_CHAVE' \
-H 'Content-Type: application/json' \
-d '{
"method": "CARD_DEBIT",
"amount": 49.9,
"description": "Pedido 456",
"customer": {
"name": "Cliente Exemplo",
"taxId": "12345678909"
}
}'
{
"success": true,
"message": "Cobrança criada com sucesso",
"data": {
"id": "clx_billing",
"status": "PENDING",
"statusLabel": "Pendente",
"method": "BOLETO",
"amount": 79.9,
"netAmount": 76.91,
"feeAmount": 2.99,
"notificationFeeAmount": 0,
"installmentCount": 1,
"description": "Pedido 123",
"dueAt": "2026-08-15",
"dueDate": "2026-08-15",
"paidAt": null,
"estimatedCreditDate": null,
"invoiceUrl": "https://...",
"bankSlipUrl": "https://...",
"digitableLine": "23790...",
"pixCopyPaste": null,
"pixEncodedImage": null,
"externalId": "pay_abc123",
"externalReference": "pedido-123",
"accountTransactionId": "clx_ledger",
"createdAt": "2026-05-30T10:00:00.000Z",
"customer": {
"id": "12345678909",
"name": "Cliente Exemplo",
"taxId": "12345678909"
}
},
"requestId": "req_abc123"
}
Criar cobrança avulsa
Pagamento único: boleto, cartão ou PIX na Conta Padrão. Não é assinatura recorrente.
POST
/
billings
/
create
curl -X POST 'https://api.goatpay.com.br/v1/billings/create' \
-H 'X-API-Key: gp_live_SUA_CHAVE' \
-H 'Content-Type: application/json' \
-d '{
"method": "BOLETO",
"amount": 79.9,
"description": "Pedido 123",
"dueDate": "2026-08-15",
"externalReference": "pedido-123",
"customer": {
"name": "Cliente Exemplo",
"taxId": "12345678909",
"email": "cliente@exemplo.com"
}
}'
curl -X POST 'https://api.goatpay.com.br/v1/billings/create' \
-H 'X-API-Key: gp_live_SUA_CHAVE' \
-H 'Content-Type: application/json' \
-d '{
"method": "CARD_DEBIT",
"amount": 49.9,
"description": "Pedido 456",
"customer": {
"name": "Cliente Exemplo",
"taxId": "12345678909"
}
}'
{
"success": true,
"message": "Cobrança criada com sucesso",
"data": {
"id": "clx_billing",
"status": "PENDING",
"statusLabel": "Pendente",
"method": "BOLETO",
"amount": 79.9,
"netAmount": 76.91,
"feeAmount": 2.99,
"notificationFeeAmount": 0,
"installmentCount": 1,
"description": "Pedido 123",
"dueAt": "2026-08-15",
"dueDate": "2026-08-15",
"paidAt": null,
"estimatedCreditDate": null,
"invoiceUrl": "https://...",
"bankSlipUrl": "https://...",
"digitableLine": "23790...",
"pixCopyPaste": null,
"pixEncodedImage": null,
"externalId": "pay_abc123",
"externalReference": "pedido-123",
"accountTransactionId": "clx_ledger",
"createdAt": "2026-05-30T10:00:00.000Z",
"customer": {
"id": "12345678909",
"name": "Cliente Exemplo",
"taxId": "12345678909"
}
},
"requestId": "req_abc123"
}
curl -X POST 'https://api.goatpay.com.br/v1/billings/create' \
-H 'X-API-Key: gp_live_SUA_CHAVE' \
-H 'Content-Type: application/json' \
-d '{
"method": "BOLETO",
"amount": 79.9,
"description": "Pedido 123",
"dueDate": "2026-08-15",
"externalReference": "pedido-123",
"customer": {
"name": "Cliente Exemplo",
"taxId": "12345678909",
"email": "cliente@exemplo.com"
}
}'
curl -X POST 'https://api.goatpay.com.br/v1/billings/create' \
-H 'X-API-Key: gp_live_SUA_CHAVE' \
-H 'Content-Type: application/json' \
-d '{
"method": "CARD_DEBIT",
"amount": 49.9,
"description": "Pedido 456",
"customer": {
"name": "Cliente Exemplo",
"taxId": "12345678909"
}
}'
{
"success": true,
"message": "Cobrança criada com sucesso",
"data": {
"id": "clx_billing",
"status": "PENDING",
"statusLabel": "Pendente",
"method": "BOLETO",
"amount": 79.9,
"netAmount": 76.91,
"feeAmount": 2.99,
"notificationFeeAmount": 0,
"installmentCount": 1,
"description": "Pedido 123",
"dueAt": "2026-08-15",
"dueDate": "2026-08-15",
"paidAt": null,
"estimatedCreditDate": null,
"invoiceUrl": "https://...",
"bankSlipUrl": "https://...",
"digitableLine": "23790...",
"pixCopyPaste": null,
"pixEncodedImage": null,
"externalId": "pay_abc123",
"externalReference": "pedido-123",
"accountTransactionId": "clx_ledger",
"createdAt": "2026-05-30T10:00:00.000Z",
"customer": {
"id": "12345678909",
"name": "Cliente Exemplo",
"taxId": "12345678909"
}
},
"requestId": "req_abc123"
}
Corpo da requisição
Pagador:
name, taxId (CPF/CNPJ), email e phone opcionais, id opcional (referência interna).Pagamento único. Para cobrança recorrente use
POST /subscriptions/create.Cartão de crédito (CARD_CREDIT)
Primeira cobrança com creditCard + creditCardHolderInfo + remoteIp, ou cardToken em cobranças seguintes. A resposta inclui data.creditCardToken para reutilização. Alternativa: POST /billings/tokenize-card.
Cartão de débito (CARD_DEBIT)
A Asaas não aceita captura transparente de débito. Crie a cobrança sem dados de cartão e redirecione o pagador para data.invoiceUrl.
Enviar
creditCard, cardToken ou creditCardHolderInfo em CARD_DEBIT retorna 400.Authorizations
Body
application/json

