Playground da API
Teste os endpoints síncronos da API v1 direto da documentação, usando uma chave sandbox e a mesma spec OpenAPI gerada dos schemas Zod.
Monte um request, cole sua chave sandbox (sk_test_...) e veja status, headers e o JSON de resposta sem sair da documentação. É o caminho mais curto entre "li o quickstart" e "fiz minha primeira chamada real" — sem precisar de Postman ou Insomnia para o primeiro teste.
O playground usa a mesma especificação OpenAPI 3.1 gerada dos schemas Zod do projeto (Referência da API). Se o contrato muda no código, este playground muda junto.
Use sempre uma chave sandbox (sk_test_...). Sua API key fica só no seu
navegador, é enviada direto para a API da Allya e não é salva no servidor
da documentação. Ainda assim, nunca compartilhe a chave nem cole uma
sk_live_... aqui — produção deve ser testada pelo seu backend.
Como usar
- Escolha um endpoint abaixo e clique em Test (ou no botão de envio do painel).
- Em Authorization, cole sua chave sandbox no campo
bearerAuth(sk_test_...).GET /v1/healthnão exige chave. - Ajuste o body/parâmetros. Para
POST /v1/payments, use umexternalIdúnico (a idempotência é por(ambiente, externalId)). - Envie e inspecione status, headers e corpo da resposta.
O ambiente (sandbox/produção) é resolvido pelo prefixo da chave, não por um campo no request. Detalhes em Ambientes e Idempotência.
Health
Response Body
application/json
curl -X GET "https://example.com/v1/health"{
"ok": true,
"service": "allya-payments"
}Autenticação
Authorization
bearerAuth Use a API key do projeto/ambiente como bearer token: Authorization: Bearer sk_test_... ou sk_live_....
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/auth/test"{
"ok": true,
"organization": {
"id": "string"
},
"project": {
"id": "string"
},
"environment": {
"id": "string",
"kind": "sandbox"
},
"apiKey": {
"id": "string"
}
}{
"error": "unauthorized",
"message": "string"
}Pagamentos
Authorization
bearerAuth Use a API key do projeto/ambiente como bearer token: Authorization: Bearer sk_test_... ou sk_live_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/payments" \ -H "Content-Type: application/json" \ -d '{ "amount": 4990, "currency": "BRL", "method": "pix", "externalId": "pedido_42", "customer": { "name": "Cliente Teste", "email": "cliente@example.com", "document": "00000000000", "phone": "11999999999" }, "metadata": { "orderId": "pedido_42", "source": "checkout" } }'{
"id": "string",
"status": "created",
"method": "pix",
"gateway": "abacate_pay",
"amount": 0,
"currency": "string",
"externalId": "string",
"gatewayRef": "string",
"customer": {
"name": "string",
"email": "string",
"documentLast4": "string"
},
"checkoutUrl": "string",
"pix": {
"qrCode": "string",
"qrCodeText": "string"
},
"card": {
"brand": "string",
"last4": "string"
}
}{
"error": "invalid_json"
}{
"error": "unauthorized",
"message": "string"
}{
"error": "string",
"message": "string"
}{
"error": "no_routing_rule",
"message": "string"
}{
"error": "rate_limit_exceeded"
}{
"error": "internal_error"
}{
"error": "gateway_error",
"provider": "abacate_pay"
}Authorization
bearerAuth Use a API key do projeto/ambiente como bearer token: Authorization: Bearer sk_test_... ou sk_live_....
In: header
Query Parameters
Identificador idempotente enviado na criação.
1 <= lengthResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/payments?externalId=string"{
"id": "string",
"status": "created",
"method": "pix",
"gateway": "abacate_pay",
"amount": 0,
"currency": "string",
"externalId": "string",
"gatewayRef": "string",
"customer": {
"name": "string",
"email": "string",
"documentLast4": "string"
},
"checkoutUrl": "string",
"pix": {
"qrCode": "string",
"qrCodeText": "string"
},
"card": {
"brand": "string",
"last4": "string"
}
}{
"error": "missing_query",
"message": "string"
}{
"error": "unauthorized",
"message": "string"
}{
"error": "not_found"
}Authorization
bearerAuth Use a API key do projeto/ambiente como bearer token: Authorization: Bearer sk_test_... ou sk_live_....
In: header
Path Parameters
ID público com prefixo pay_.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/payments/string"{
"id": "string",
"status": "created",
"method": "pix",
"gateway": "abacate_pay",
"amount": 0,
"currency": "string",
"externalId": "string",
"gatewayRef": "string",
"customer": {
"name": "string",
"email": "string",
"documentLast4": "string"
},
"checkoutUrl": "string",
"pix": {
"qrCode": "string",
"qrCodeText": "string"
},
"card": {
"brand": "string",
"last4": "string"
}
}{
"error": "invalid_id"
}{
"error": "unauthorized",
"message": "string"
}{
"error": "not_found"
}Authorization
bearerAuth Use a API key do projeto/ambiente como bearer token: Authorization: Bearer sk_test_... ou sk_live_....
In: header
Path Parameters
ID público com prefixo pay_.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/payments/string/sync"{
"id": "string",
"status": "created",
"method": "pix",
"gateway": "abacate_pay",
"amount": 0,
"currency": "string",
"externalId": "string",
"gatewayRef": "string",
"customer": {
"name": "string",
"email": "string",
"documentLast4": "string"
},
"checkoutUrl": "string",
"pix": {
"qrCode": "string",
"qrCodeText": "string"
},
"card": {
"brand": "string",
"last4": "string"
}
}{
"error": "invalid_id"
}{
"error": "unauthorized",
"message": "string"
}{
"error": "not_found"
}{
"error": "missing_gateway_ref"
}{
"error": "rate_limit_exceeded"
}{
"error": "internal_error"
}{
"error": "not_implemented",
"action": "string",
"provider": "abacate_pay"
}{
"error": "gateway_error",
"provider": "abacate_pay"
}Authorization
bearerAuth Use a API key do projeto/ambiente como bearer token: Authorization: Bearer sk_test_... ou sk_live_....
In: header
Path Parameters
ID público com prefixo pay_.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/payments/string/cancel"{
"id": "string",
"status": "created",
"method": "pix",
"gateway": "abacate_pay",
"amount": 0,
"currency": "string",
"externalId": "string",
"gatewayRef": "string",
"customer": {
"name": "string",
"email": "string",
"documentLast4": "string"
},
"checkoutUrl": "string",
"pix": {
"qrCode": "string",
"qrCodeText": "string"
},
"card": {
"brand": "string",
"last4": "string"
}
}{
"error": "invalid_id"
}{
"error": "unauthorized",
"message": "string"
}{
"error": "not_found"
}{
"error": "cannot_cancel_paid"
}{
"error": "rate_limit_exceeded"
}{
"error": "internal_error"
}{
"error": "not_implemented",
"action": "string",
"provider": "abacate_pay"
}{
"error": "gateway_error",
"provider": "abacate_pay"
}Assinaturas
Authorization
bearerAuth Use a API key do projeto/ambiente como bearer token: Authorization: Bearer sk_test_... ou sk_live_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/subscriptions" \ -H "Content-Type: application/json" \ -d '{ "amount": 4990, "currency": "BRL", "interval": "monthly", "trialDays": 7, "externalId": "assinatura_cliente_42_plano_pro_mensal", "customer": { "name": "Cliente Teste", "email": "cliente@example.com", "document": "00000000000", "phone": "11999999999" }, "metadata": { "orderId": "assinatura_cliente_42", "plan": "pro_mensal" }, "gateway": { "pagarme": { "planId": "plan_XnB8eYvR7K1aZ4Qm" } } }'{
"id": "string",
"status": "trialing",
"method": "pix",
"gateway": "abacate_pay",
"amount": 0,
"currency": "string",
"interval": "monthly",
"trialDays": 0,
"trialEndsAt": "string",
"nextBillingAt": "string",
"cancelAtPeriodEnd": true,
"canceledAt": "string",
"externalId": "string",
"gatewayRef": "string",
"checkoutUrl": "string",
"customer": {
"name": "string",
"email": "string",
"documentLast4": "string"
},
"createdAt": "string"
}{
"error": "invalid_json"
}{
"error": "unauthorized",
"message": "string"
}{
"error": "string",
"message": "string"
}{
"error": "no_routing_rule",
"message": "string"
}{
"error": "rate_limit_exceeded"
}{
"error": "internal_error"
}{
"error": "gateway_error",
"provider": "abacate_pay"
}Authorization
bearerAuth Use a API key do projeto/ambiente como bearer token: Authorization: Bearer sk_test_... ou sk_live_....
In: header
Query Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/subscriptions?externalId=string"{
"id": "string",
"status": "trialing",
"method": "pix",
"gateway": "abacate_pay",
"amount": 0,
"currency": "string",
"interval": "monthly",
"trialDays": 0,
"trialEndsAt": "string",
"nextBillingAt": "string",
"cancelAtPeriodEnd": true,
"canceledAt": "string",
"externalId": "string",
"gatewayRef": "string",
"checkoutUrl": "string",
"customer": {
"name": "string",
"email": "string",
"documentLast4": "string"
},
"createdAt": "string"
}{
"error": "missing_query",
"message": "string"
}{
"error": "unauthorized",
"message": "string"
}{
"error": "not_found"
}Authorization
bearerAuth Use a API key do projeto/ambiente como bearer token: Authorization: Bearer sk_test_... ou sk_live_....
In: header
Path Parameters
ID público com prefixo sub_.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/subscriptions/string"{
"id": "string",
"status": "trialing",
"method": "pix",
"gateway": "abacate_pay",
"amount": 0,
"currency": "string",
"interval": "monthly",
"trialDays": 0,
"trialEndsAt": "string",
"nextBillingAt": "string",
"cancelAtPeriodEnd": true,
"canceledAt": "string",
"externalId": "string",
"gatewayRef": "string",
"checkoutUrl": "string",
"customer": {
"name": "string",
"email": "string",
"documentLast4": "string"
},
"createdAt": "string"
}{
"error": "unauthorized",
"message": "string"
}{
"error": "not_found"
}{
"error": "internal_error"
}Authorization
bearerAuth Use a API key do projeto/ambiente como bearer token: Authorization: Bearer sk_test_... ou sk_live_....
In: header
Path Parameters
ID público com prefixo sub_.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/subscriptions/string/cancel" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"status": "trialing",
"method": "pix",
"gateway": "abacate_pay",
"amount": 0,
"currency": "string",
"interval": "monthly",
"trialDays": 0,
"trialEndsAt": "string",
"nextBillingAt": "string",
"cancelAtPeriodEnd": true,
"canceledAt": "string",
"externalId": "string",
"gatewayRef": "string",
"checkoutUrl": "string",
"customer": {
"name": "string",
"email": "string",
"documentLast4": "string"
},
"createdAt": "string"
}{
"error": "invalid_json"
}{
"error": "unauthorized",
"message": "string"
}{
"error": "not_found"
}{
"error": "already_canceled",
"status": "string"
}{
"error": "internal_error"
}{
"error": "gateway_error",
"provider": "abacate_pay"
}Limites do playground
- Cobre só os endpoints HTTP síncronos da API v1. Webhooks outbound (
payment.*,subscription.*) não são testáveis aqui — eles chegam ao seu endpoint. Veja Webhooks. - Não é um API client completo: não há histórico de requests nem salvamento de chave. Para coleções reutilizáveis, importe a collection Postman ou o
openapi.yamlem Referência da API. - Regras cruzadas que o JSON Schema não expressa (ex.:
cardrejeitado quandomethod=pix,gateway.pagarme.planIdobrigatório no Pagar.me) só são validadas em runtime — o request pode parecer válido aqui e o gateway recusar. Veja Criar pagamento e Criar assinatura.
Veja também
- Referência da API: downloads (OpenAPI/Postman) e contrato.
- Primeiros passos: da chave sandbox à primeira cobrança.
- Erros: catálogo de códigos de resposta.