diff --git a/docs.json b/docs.json
index ecf59e0..72914cd 100644
--- a/docs.json
+++ b/docs.json
@@ -17,51 +17,156 @@
}
},
"navigation": {
- "tabs": [
+ "languages": [
{
- "tab": "Documentação",
- "groups": [
+ "language": "pt-BR",
+ "tabs": [
{
- "group": "Introdução",
- "pages": [
- "pages/introduction",
- "pages/devmode",
- "pages/authentication",
- "pages/webhooks",
- "pages/production",
- "pages/sdks"
+ "tab": "Documentação",
+ "groups": [
+ {
+ "group": "Introdução",
+ "pages": [
+ "pt/introduction",
+ "pt/devmode",
+ "pt/authentication",
+ "pt/webhooks",
+ "pt/production",
+ "pt/sdks"
+ ]
+ },
+ {
+ "group": "Cliente",
+ "pages": ["pt/client/reference", "pt/client/create", "pt/client/list"]
+ },
+ {
+ "group": "Cobrança",
+ "pages": ["pt/payment/reference", "pt/payment/create", "pt/payment/list"]
+ },
+ {
+ "group": "Pix QRCode",
+ "pages": [
+ "pt/pix-qrcode/reference",
+ "pt/pix-qrcode/create",
+ "pt/pix-qrcode/simulate-payment",
+ "pt/pix-qrcode/check"
+ ]
+ },
+ {
+ "group": "Cupom",
+ "pages": ["pt/coupon/reference", "pt/coupon/create", "pt/coupon/list"]
+ },
+ {
+ "group": "Saque",
+ "pages": ["pt/withdraw/reference", "pt/withdraw/create", "pt/withdraw/list"]
+ }
]
},
{
- "group": "Cliente",
- "pages": ["pages/client/reference", "pages/client/create", "pages/client/list"]
- },
- {
- "group": "Cobrança",
- "pages": ["pages/payment/reference", "pages/payment/create", "pages/payment/list"]
- },
+ "tab": "Referência da API",
+ "openapi": "openapi-pt.yaml"
+ }
+ ]
+ },
+ {
+ "language": "es",
+ "tabs": [
{
- "group": "Pix QRCode",
- "pages": [
- "pages/pix-qrcode/reference",
- "pages/pix-qrcode/create",
- "pages/pix-qrcode/simulate-payment",
- "pages/pix-qrcode/check"
+ "tab": "Documentación",
+ "groups": [
+ {
+ "group": "Introducción",
+ "pages": [
+ "es/introduction",
+ "es/devmode",
+ "es/authentication",
+ "es/webhooks",
+ "es/production",
+ "es/sdks"
+ ]
+ },
+ {
+ "group": "Cliente",
+ "pages": ["es/client/reference", "es/client/create", "es/client/list"]
+ },
+ {
+ "group": "Cobranza",
+ "pages": ["es/payment/reference", "es/payment/create", "es/payment/list"]
+ },
+ {
+ "group": "Pix QRCode",
+ "pages": [
+ "es/pix-qrcode/reference",
+ "es/pix-qrcode/create",
+ "es/pix-qrcode/simulate-payment",
+ "es/pix-qrcode/check"
+ ]
+ },
+ {
+ "group": "Cupón",
+ "pages": ["es/coupon/reference", "es/coupon/create", "es/coupon/list"]
+ },
+ {
+ "group": "Retiro",
+ "pages": ["es/withdraw/reference", "es/withdraw/create", "es/withdraw/list"]
+ }
]
},
{
- "group": "Cupom",
- "pages": ["pages/coupon/reference", "pages/coupon/create", "pages/coupon/list"]
- },
- {
- "group": "Saque",
- "pages": ["pages/withdraw/reference", "pages/withdraw/create", "pages/withdraw/list"]
+ "tab": "Referencia de la API",
+ "openapi": "openapi-es.yaml"
}
]
},
{
- "tab": "Referência da API",
- "openapi": "openapi.yaml"
+ "language": "en",
+ "tabs": [
+ {
+ "tab": "Documentation",
+ "groups": [
+ {
+ "group": "Introduction",
+ "pages": [
+ "en/introduction",
+ "en/devmode",
+ "en/authentication",
+ "en/webhooks",
+ "en/production",
+ "en/sdks"
+ ]
+ },
+ {
+ "group": "Customer",
+ "pages": ["en/client/reference", "en/client/create", "en/client/list"]
+ },
+ {
+ "group": "Payment",
+ "pages": ["en/payment/reference", "en/payment/create", "en/payment/list"]
+ },
+ {
+ "group": "Pix QRCode",
+ "pages": [
+ "en/pix-qrcode/reference",
+ "en/pix-qrcode/create",
+ "en/pix-qrcode/simulate-payment",
+ "en/pix-qrcode/check"
+ ]
+ },
+ {
+ "group": "Coupon",
+ "pages": ["en/coupon/reference", "en/coupon/create", "en/coupon/list"]
+ },
+ {
+ "group": "Withdraw",
+ "pages": ["en/withdraw/reference", "en/withdraw/create", "en/withdraw/list"]
+ }
+ ]
+ },
+ {
+ "tab": "API Reference",
+ "openapi": "openapi-en.yaml"
+ }
+ ]
}
]
},
diff --git a/en/authentication.mdx b/en/authentication.mdx
new file mode 100644
index 0000000..22ad7ff
--- /dev/null
+++ b/en/authentication.mdx
@@ -0,0 +1,93 @@
+---
+title: 'Authentication'
+description: 'How to send requests to our API'
+icon: 'lock'
+---
+
+
+ **API Key**: Your credential to access the AbacatePay API. This key identifies your account and authorizes your requests. **IMPORTANT**: Without the API key, requests will be rejected.
+
+
+## Managing API keys
+
+Manage your API keys directly in our platform. You can:
+- List all active keys
+- Create new keys
+- Revoke existing keys
+
+
+ All requests are sent to the same endpoint (`https://api.abacatepay.com`), but the environment is determined by the API key used:
+ - Keys created in **dev mode** process transactions in the test environment
+ - Keys created in **production** process real transactions
+
+ Learn more about the development environment here.
+
+
+
+ The API will return HTTP code `401` when:
+ - The API key is not provided in the header
+ - The key is invalid
+ - The key has been revoked
+
+
+## Creating API keys
+
+
+ * Store your keys in environment variables or secret managers
+ * Never share your API keys
+ * AbacatePay will never request your keys
+ * Immediately revoke any compromised key
+
+
+## How to create your API key
+
+Follow these steps in the AbacatePay dashboard:
+
+
+
+
+
+
+ Start the process of creating a new API key
+
+
+
+
+
+
+
+ Add a clear description to identify the purpose of this key
+
+
+
+
+
+
+
+ Copy the generated key and store it in a secure location
+
+
+
+
+
+After creating your key, you can start integrating with our API. Remember to include the key in all requests in the `Authorization` header:
+
+```bash
+curl -X POST https://api.abacatepay.com/v1/payments \
+ -H "Authorization: Bearer your_api_key" \
+ -H "Content-Type: application/json" \
+ -d '{"amount": 1000}'
+```
+
+
+ The same endpoint (`https://api.abacatepay.com`) is used for both development and production environments. The environment is automatically determined by the API key used in the request.
+
diff --git a/en/client/create.mdx b/en/client/create.mdx
new file mode 100644
index 0000000..5c1c2dc
--- /dev/null
+++ b/en/client/create.mdx
@@ -0,0 +1,5 @@
+---
+title: 'Create a new Customer'
+openapi: "POST /customer/create"
+---
+
diff --git a/en/client/list.mdx b/en/client/list.mdx
new file mode 100644
index 0000000..0eaaf98
--- /dev/null
+++ b/en/client/list.mdx
@@ -0,0 +1,4 @@
+---
+title: 'List Customers'
+openapi: "GET /customer/list"
+---
diff --git a/en/client/reference.mdx b/en/client/reference.mdx
new file mode 100644
index 0000000..d8abf49
--- /dev/null
+++ b/en/client/reference.mdx
@@ -0,0 +1,62 @@
+---
+title: 'Reference'
+description: 'Gerencie seus clientes, aqueles que pagam você.'
+icon: 'book-open-cover'
+---
+
+Um cliente é seu usuário final, aquele que você vai cobrar e pagar o seu produto.
+
+## Estrutura
+
+Um cliente é representado em nossa API pela seguinte estrutura:
+
+```json
+{
+ "id": "cust_aebxkhDZNaMmJeKsy0AHS0FQ",
+ "metadata": {
+ "name": "Test Customer",
+ "cellphone": "11999999999",
+ "taxId": "12345678900",
+ "email": "test@example.com"
+ }
+}
+```
+
+## Atributos
+
+### id:
+
+```json {2}
+{
+ "id": "cust_aebxkhDZNaMmJeKsy0AHS0FQ",
+}
+```
+
+`id` : string.
+Id único do cliente na AbacatePay
+
+### metadados:
+Objeto com os dados do cliente
+
+```json json {2-7}
+{
+ "metadata": {
+ "name": "Test Customer",
+ "cellphone": "11999999999",
+ "taxId": "12345678900",
+ "email": "test@example.com"
+ }
+}
+```
+
+* `name` : string.
Nome do cliente (opcional)
+
+* `cellphone` : string.
Telefone do cliente (opcional)
+
+* `taxId` : string.
Documento válido do cliente, podendo ser CPF ou CNPJ (opcional)
+
+* `email` : string.
E-mail do cliente (obrigatório)
+
+
+ Não é possível criar um cliente com CPF/CNPJ inválido e caso já exista um cliente com esse CPF/CNPJ, a API não criará o cliente novo mas retornará o cliente já existente
+
\ No newline at end of file
diff --git a/en/coupon/create.mdx b/en/coupon/create.mdx
new file mode 100644
index 0000000..7e299f7
--- /dev/null
+++ b/en/coupon/create.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Create a new coupon'
+openapi: "POST /coupon/create"
+---
\ No newline at end of file
diff --git a/en/coupon/list.mdx b/en/coupon/list.mdx
new file mode 100644
index 0000000..cf1727a
--- /dev/null
+++ b/en/coupon/list.mdx
@@ -0,0 +1,4 @@
+---
+title: 'List coupons'
+openapi: "GET /coupon/list"
+---
\ No newline at end of file
diff --git a/en/coupon/reference.mdx b/en/coupon/reference.mdx
new file mode 100644
index 0000000..56f8257
--- /dev/null
+++ b/en/coupon/reference.mdx
@@ -0,0 +1,150 @@
+---
+title: 'Reference'
+description: 'Crie cupons de desconto para seus clientes usarem uma ou várias vezes'
+icon: 'book-open-cover'
+---
+
+Os cupons de desconto permitem que você ofereça reduções de preço aos seus clientes de forma controlada e estratégica. Você pode criar cupons com desconto percentual ou valor fixo, definir limites de uso e acompanhar quantas vezes foram utilizados.
+
+
+## Estrutura
+
+Um cupom é representado em nossa API pela seguinte estrutura:
+
+```json
+{
+ "id": "MY_COUPON",
+ "discountKind": "PERCENTAGE",
+ "discount": 10,
+ "maxRedeems": -1,
+ "redeemsCount": 0,
+ "status": "ACTIVE",
+ "devMode": true,
+ "notes": "teste de cupom",
+ "createdAt": "2025-01-23T14:06:16.880Z",
+ "updatedAt": "2025-01-23T14:06:16.880Z"
+}
+```
+
+## Atributos:
+
+
+
+ ```json {2}
+ {
+ "id": "MY_COUPON",
+ }
+ ```
+
+ `id` : string.
+ Código único do cupom que seus clientes irão utilizar para aplicar o desconto
+
+
+ ```json {2}
+ {
+ "notes": "Cupom de boas-vindas - 10% de desconto",
+ }
+ ```
+ `notes` : string.
+ Descrição interna do cupom para sua organização e controle
+
+
+ ```json {2}
+ {
+ "maxRedeems": -1,
+ }
+ ```
+ `maxRedeems` : number.
+ Limite de vezes que o cupom pode ser utilizado. Use `-1` para cupons ilimitados ou um número específico para limitar o uso
+
+
+ ```json {2}
+ {
+ "redeemsCount": 0,
+ }
+ ```
+ `redeemsCount` : number.
+ Contador de quantas vezes o cupom já foi utilizado pelos clientes
+
+
+ ```json {2}
+ {
+ "discountKind": "PERCENTAGE",
+ }
+ ```
+ `discountKind` : string.
+ Tipo de desconto aplicado pelo cupom
+
+
+ | Tipo | Descrição |
+ | ----------- | ------------------------------------- |
+ | `PERCENTAGE` | **Desconto percentual** (ex: 10% de desconto) |
+ | `FIXED` | **Valor fixo** (ex: R$ 5,00 de desconto) |
+
+
+
+ ```json {2}
+ {
+ "discount": 10,
+ }
+ ```
+ `discount` : number.
+ Valor do desconto. Para `PERCENTAGE` use números de 1-100 (ex: 10 = 10%). Para `FIXED` use o valor em centavos (ex: 500 = R$ 5,00)
+
+
+ ```json {2}
+ {
+ "status": "ACTIVE",
+ }
+ ```
+ `status` : string.
+ Status atual do cupom
+
+
+ | Status | Descrição |
+ | ----------- | ------------------------------------- |
+ | `ACTIVE` | **O cupom está ativo e pode ser utilizado pelos clientes** |
+ | `DELETED` | **O cupom foi removido e não pode mais ser usado** |
+ | `DISABLED` | **O cupom foi desabilitado ou atingiu o limite máximo de usos** |
+
+
+
+ ```json {2}
+ {
+ "devMode": true,
+ }
+ ```
+ `devMode` : boolean.
+ Indica se o cupom foi criado em ambiente de desenvolvimento (`true`) ou produção (`false`)
+
+
+ ```json {2}
+ {
+ "metadata": {
+ "campaign": "black-friday-2024",
+ "category": "new-customers"
+ },
+ }
+ ```
+ `metadata` : object.
+ Objeto para armazenar informações adicionais sobre o cupom, como campanha, categoria ou outros dados relevantes para sua organização
+
+
+ ```json {2}
+ {
+ "createdAt": "2025-01-23T14:06:16.880Z",
+ }
+ ```
+ `createdAt` : date-time.
+ Data e hora de criação do cupom
+
+
+ ```json {2}
+ {
+ "updatedAt": "2025-01-23T14:06:16.880Z",
+ }
+ ```
+ `updatedAt` : date-time.
+ Data e hora da última atualização do cupom
+
+
\ No newline at end of file
diff --git a/en/devmode.mdx b/en/devmode.mdx
new file mode 100644
index 0000000..0a91e21
--- /dev/null
+++ b/en/devmode.mdx
@@ -0,0 +1,51 @@
+---
+title: 'Dev mode, what is it?'
+description: "Learn what dev mode is and how to use it best"
+icon: 'code'
+---
+
+Dev mode is AbacatePay's development environment, designed to allow you to test all platform features safely and in a controlled manner.
+
+## What is Dev mode?
+
+When you create your AbacatePay account, it is automatically configured in Dev mode. In this environment:
+
+- All operations are simulated
+- No real transactions are processed
+- You can test all features without risks
+- Data is isolated from the production environment
+
+
+ * Test your integrations safely
+ * Experiment with different payment scenarios
+ * Configure webhooks and receive test notifications
+ * Validate the complete flow of your application
+
+
+## Using Dev mode
+
+To start testing:
+
+1. Create an API key in the development environment
+2. Use this key in your test requests
+3. Configure webhooks to receive test notifications
+4. Validate all flows of your application
+
+
+ * Test all possible scenarios
+ * Validate error handling
+ * Check webhook notifications
+ * Confirm integration with your system
+
+
+## Next Steps
+
+When you're confident with your integration:
+1. Disable Dev mode
+2. Complete the account verification process
+3. Wait for production approval
+4. Start processing real transactions
+
+
+ Our team is available to assist in the development process. Contact us by email ajuda@abacatepay.com
+
diff --git a/en/introduction.mdx b/en/introduction.mdx
new file mode 100644
index 0000000..dd9c973
--- /dev/null
+++ b/en/introduction.mdx
@@ -0,0 +1,71 @@
+---
+title: Get Started
+icon: 'Avocado'
+description: "Grab your coffee and learn about AbacatePay!"
+---
+In this documentation you will find everything you need to integrate with the AbacatePay API. Developed by developers for developers, our platform was designed to be intuitive and easy to use.
+
+## What is AbacatePay?
+
+AbacatePay is a payment gateway that emerged from our own need to simplify billing in our products. We realized that existing payment methods were excessively complex:
+- Extensive and confusing documentation
+- Long and bureaucratic approval processes
+- Multiple ways to perform the same operation
+- Some gateways even require courses for integration!
+
+Our solution? A platform that transforms the complexity of Fintechs into a simple and intuitive API. See how easy it is:
+
+```javascript
+// Example of creating a charge
+const payment = await abacatePay.payments.create({
+ amount: 1000,
+ description: "Service provided"
+});
+```
+
+## Uncomplicated API
+
+Our API was built with three fundamental principles:
+
+1. **Intent-based**: Each endpoint represents exactly what you read
+ ```
+ POST /billing/create // Creates a payment
+ GET /billing/get // Searches for a specific payment
+ ```
+
+2. **Idempotent**: Execute the same request as many times as you need, without side effects
+ ```javascript
+ // Safe to execute multiple times
+ await abacatePay.billing.create({...});
+ ```
+
+3. **Consistent**: Our API always returns an option containing the error or return data, which facilitates implementation in strongly typed languages and consistency across all operations.
+ ```json
+ {
+ "data": {
+ "id": "bill_12345667",
+ "url": "https://abacatepay.com/pay/bill_12345667",
+ "amount": 1000,
+ "status": "PENDING",
+ "devMode": true,
+ "methods": ["PIX"],
+ "frequency": "ONE_TIME",
+ "nextBilling": null,
+ "customer": {
+ "id": "cust_12345",
+ "metadata": {
+ "email": "customer@example.com"
+ }
+ },
+ "createdAt": "2024-11-04T18:38:28.573",
+ "updatedAt": "2024-11-04T18:38:28.573",
+ },
+ "error": null
+ }
+ ```
+
+To make it even easier, we offer official SDKs and support for development mode with dedicated API keys.
+
+## Questions?
+
+Our team is always ready to help! Contact us by email ajuda@abacatepay.com
diff --git a/en/payment/create.mdx b/en/payment/create.mdx
new file mode 100644
index 0000000..27b7bc8
--- /dev/null
+++ b/en/payment/create.mdx
@@ -0,0 +1,4 @@
+---
+title: Create a new Payment
+openapi: 'POST /billing/create'
+---
diff --git a/en/payment/list.mdx b/en/payment/list.mdx
new file mode 100644
index 0000000..1c91586
--- /dev/null
+++ b/en/payment/list.mdx
@@ -0,0 +1,4 @@
+---
+title: 'List Payments'
+openapi: "GET /billing/list"
+---
\ No newline at end of file
diff --git a/en/payment/reference.mdx b/en/payment/reference.mdx
new file mode 100644
index 0000000..0bfc8a9
--- /dev/null
+++ b/en/payment/reference.mdx
@@ -0,0 +1,228 @@
+---
+title: "Reference"
+description: "Crie um link de cobrança e deixe seu cliente pagar"
+icon: "book-open-cover"
+---
+
+O termo "cobrança" é genérico. Ele representa um portal de um fluxo de pagamento onde você pode cobrar seu cliente e ele fazer todo o processo de pagamento sem nenhuma interrupção.
+
+Atualmente uma cobrança pode ser de duas formas:
+- `ONE_TIME` para cobranças que serão pagas uma única vez. preciso enviar os dados do seu cliente. Para cobrançar `ONE_TIME` é obrigatório informar o cliente ao criar a cobrança por meio dos campos `customerId` ou `customer`.
+ - Só é necessário fornecer uma das opções de identificador do cliente: `customerId` **OU** `customer`.
+- `MULTIPLE_PAYMENTS` é uma cobrança que pode ser paga multiplas vezes e por múltiplas pessoas diferentes. **Ex:** utilização de um único link de pagamento para vender um produto para múltiplas pessoas.
+ - Para cobranças `MULTIPLE_PAYMENTS` o usuário informará informações como CPF, nome e email na página do checkout.
+
+
+
+## Estrutura
+
+Uma cobrança é representada em nossa API pela seguinte estrutura:
+
+```json json
+{
+ "id": "bill_uA0M0xwg5R4mSyr0n2PjHQXY",
+ "frequency": "ONE_TIME",
+ "url": "https://abacatepay.com/pay/bill_uA0M0xwg5R4mSyr0n2PjHQXY",
+ "amount": 4000,
+ "status": "PAID",
+ "devMode": true,
+ "methods": ["PIX"],
+ "products": [
+ {
+ "id": "prod_dNFbdDjfpaegmzBWWdNM2Huw",
+ "externalId": "prod-1234",
+ "quantity": 1
+ }
+ ],
+ "customer": {
+ "id": "cust_aebxkhDZNaMmJeKsy0AHS0FQ",
+ "metadata": {
+ "name": "Test Customer",
+ "cellphone": "11999999999",
+ "taxId": "12345678900",
+ "email": "test@example.com"
+ }
+ },
+ "metadata": {
+ "fee": 100,
+ "returnUrl": "https://example.com/billing",
+ "completionUrl": "https://example.com/completion"
+ },
+ "nextBilling": null,
+ "allowCoupons": false,
+ "coupons": [],
+ "createdAt": "2024-12-06T18:56:15.538Z",
+ "updatedAt": "2024-12-06T18:56:15.538Z"
+}
+```
+
+## Atributos:
+
+
+
+ ```json json {2}
+ {
+ "id": "bill_uA0M0xwg5R4mSyr0n2PjHQXY",
+ }
+ ```
+
+ `id` : string.
+ Id único da cobrança na AbacatePay
+
+
+ ```json json {2}
+ {
+ "frequency": "ONE_TIME",
+ }
+ ```
+ `frequency` : string.
+ Frequência da cobrança. Pode ser `ONE_TIME` ou `MULTIPLE_PAYMENTS`.
+
+
+ | | |
+ | ---------------------| ---------------------------------------------------------------------------------------------------- |
+ | `ONE_TIME` | **Cobrança que aceita um único pagamento. É necessário enviar os dados do cliente** |
+ | `MULTIPLE_PAYMENTS` | **Cobrança em modo checkout, aceita vários pagamentos. Não é necessário enviar os dados do cliente.**|
+
+
+
+ ```json json {2}
+ {
+ "url": "https://abacatepay.com/pay/bill_uA0M0xwg5R4mSyr0n2PjHQXY",
+ }
+ ```
+ `url` : string.
+ URL para seu cliente executar o pagamento da cobrança
+
+ ### Amount:
+ ```json json {2}
+ {
+ "amount": 4000,
+ }
+ ```
+ `amount` : number.
+ Valor da cobrança em centavos
+
+
+ ```json json {2}
+ {
+ "amount": 4000,
+ }
+ ```
+ `amount` : number.
+ Valor da cobrança em centavos
+
+
+
+ ```json json {2}
+ {
+ "status": "PAID",
+ }
+ ```
+ `status` : string.
+ Status da cobrança. Pode ser `PENDING`, `EXPIRED`, `CANCELLED`, `PAID`, `REFUNDED`
+
+
+ | | |
+ | -----------| ------------------------------------- |
+ | `PENDING` | **A cobrança está com o pagamento pendente** |
+ | `EXPIRED` | **O tempo limite de pagamento foi excedido** |
+ | `CANCELLED`| **A cobrança foi cancelada por você** |
+ | `PAID` | **A cobrança foi paga com sucesso pelo cliente** |
+ | `REFUNDED` | **O valor foi devolvido ao cliente** |
+
+
+
+ ```json json {2}
+ {
+ "methods": ["PIX"],
+ }
+ ```
+ `methods` : array
+ Tipos de pagamento. Suportamos somente `PIX` no momento.
+
+
+ ```json json {2-9}
+ {
+ "products":
+ [
+ {
+ "id": "prod_dNFbdDjfpaegmzBWWdNM2Huw",
+ "externalId": "prod-1234",
+ "quantity": 1
+ }
+ ],
+ }
+ ```
+ `products` : array
+ Lista de produtos inclusos na cobrança
+
+
+ ```json json {2-10}
+ {
+ "customer": {
+ "id": "cust_aebxkhDZNaMmJeKsy0AHS0FQ",
+ "metadata": {
+ "name": "Test Customer",
+ "cellphone": "11999999999",
+ "taxId": "12345678900",
+ "email": "test@example.com"
+ }
+ }
+ }
+ ```
+ `customer` : object
+ Cliente que você está cobrando. Veja referência da estrutura aqui
+
+
+ ```json json {2-5}
+ {
+ "metadata": {
+ "fee": 100,
+ "returnUrl": "https://example.com/billing",
+ "completionUrl": "https://example.com/completion"
+ }
+ }
+ ```
+ `metadata` : object
+ Objeto com metadados sobre a cobrança
+
+ * `fee` number
+ Taxa aplicada pela AbacatePay
+ * `returnUrl` string
+ URL que o cliente será redirecionado ao clicar no botão "voltar"
+ * `completionUrl` string
+ URL que o cliente será redirecionado ao realizar o pagamento
+
+
+ ```json json {2}
+ {
+ "nextBilling": null,
+ }
+ ```
+
+ `nextBilling` : date-time | null.
+ Data e hora da próxima cobrança, ou null para cobranças únicas
+
+
+ ```json json {2}
+ {
+ "allowCoupons": false,
+ }
+ ```
+
+ `allowCoupons` : bool | null.
+ Permite ou não cupons para a cobrança
+
+
+ ```json json {2}
+ {
+ "coupons": [],
+ }
+ ```
+
+ `coupons` : array
+ Cupons permitidos na cobrança. Só são considerados os cupons se `allowCoupons` é verdadeiro.
+
+
+
diff --git a/en/pix-qrcode/check.mdx b/en/pix-qrcode/check.mdx
new file mode 100644
index 0000000..467fe6d
--- /dev/null
+++ b/en/pix-qrcode/check.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Check Status'
+openapi: 'GET /pixQrCode/check'
+---
diff --git a/en/pix-qrcode/create.mdx b/en/pix-qrcode/create.mdx
new file mode 100644
index 0000000..174f99b
--- /dev/null
+++ b/en/pix-qrcode/create.mdx
@@ -0,0 +1,4 @@
+---
+title: Create PIX QRCode
+openapi: 'POST /pixQrCode/create'
+---
diff --git a/en/pix-qrcode/list.mdx b/en/pix-qrcode/list.mdx
new file mode 100644
index 0000000..8f57efb
--- /dev/null
+++ b/en/pix-qrcode/list.mdx
@@ -0,0 +1,4 @@
+---
+title: 'List PIX QRCodes'
+openapi: "GET /pixQrCode/list"
+---
\ No newline at end of file
diff --git a/en/pix-qrcode/reference.mdx b/en/pix-qrcode/reference.mdx
new file mode 100644
index 0000000..54b0047
--- /dev/null
+++ b/en/pix-qrcode/reference.mdx
@@ -0,0 +1,165 @@
+---
+title: 'Reference'
+description: 'Gere um QRCode Pix e um código copia-e-cola para o seu cliente'
+icon: 'book-open-cover'
+---
+
+
+
+## Estrutura
+
+Uma cobrança via QRCode Pix é representada em nossa API pela seguinte estrutura:
+
+```json json
+{
+ "id": "pix_charabc123456789",
+ "amount": 4000,
+ "status": "PAID",
+ "devMode": true,
+ "method": "PIX",
+ "brCode": "...",
+ "brCodeBase64": "...",
+ "platformFee": 80,
+ "description": "Pagamento PIX com AbacatePay",
+ "metadata": {
+ "pedidoId": "123"
+ },
+ "createdAt": "2024-12-06T18:56:15.538Z",
+ "updatedAt": "2024-12-06T18:56:15.538Z",
+ "expiresAt": "2024-12-06T18:56:15.538Z"
+}
+```
+
+## Atributos:
+
+
+
+ ```json json {2}
+ {
+ "id": "abc123uA0M0xwg5R4mSyr0n2PjHQXY"
+ }
+ ```
+ `id` : string.
+ Identificador único da cobrança.
+
+
+
+ ```json json {2}
+ {
+ "amount": 4000
+ }
+ ```
+ `amount` : number.
+ Valor da cobrança em centavos (ex: 4000 = R$ 40,00)
+
+
+
+ ```json json {2}
+ {
+ "status": "PAID"
+ }
+ ```
+ `status` : string.
+ Status da cobrança. Pode ser `PENDING`, `EXPIRED`, `CANCELLED`, `PAID`, `REFUNDED`.
+
+ | Status | Descrição |
+ | ----------- | ------------------------------------- |
+ | `PENDING` | **A cobrança está com o pagamento pendente** |
+ | `EXPIRED` | **O tempo limite de pagamento foi excedido** |
+ | `CANCELLED`| **A cobrança foi cancelada por você** |
+ | `PAID` | **A cobrança foi paga com sucesso pelo cliente** |
+ | `REFUNDED` | **O valor foi devolvido ao cliente** |
+
+
+
+
+ ```json json {2}
+ {
+ "devMode": true
+ }
+ ```
+ `devMode` : boolean.
+ Indica se a cobrança está em ambiente de testes (`true`) ou produção (`false`).
+
+
+
+ ```json json {2}
+ {
+ "method": "PIX"
+ }
+ ```
+ `method` : string.
+ Método de pagamento.
+
+
+
+ ```json json {2}
+ {
+ "brCode": "..."
+ }
+ ```
+ `brCode` : string.
+ Código PIX (copia-e-cola) para pagamento.
+
+
+
+ ```json json {2}
+ {
+ "brCodeBase64": "..."
+ }
+ ```
+ `brCodeBase64` : string.
+ Código PIX no formato Base64 (útil para exibição em imagens).
+
+
+
+ ```json json {2}
+ {
+ "platformFee": 80
+ }
+ ```
+ `platformFee` : number.
+ Taxa da plataforma em centavos. Exemplo: `80` significa R$ 0,80.
+
+
+
+ ```json json {2}
+ {
+ "description": "Pagamento PIX com AbacatePay"
+ }
+ ```
+ `description` : string.
+ Descrição da cobrança.
+
+
+
+ ```json json {2}
+ {
+ "createdAt": "2024-12-06T18:56:15.538Z"
+ }
+ ```
+ `createdAt` : date-time.
+ Data e hora da criação da cobrança.
+
+
+
+ ```json json {2}
+ {
+ "updatedAt": "2024-12-06T18:56:15.538Z"
+ }
+ ```
+ `updatedAt` : date-time.
+ Última atualização da cobrança.
+
+
+
+ ```json json {2}
+ {
+ "expiresAt": "2024-12-06T18:56:15.538Z"
+ }
+ ```
+ `expiresAt` : date-time.
+ Data e hora de expiração do QRCode.
+
+
+
diff --git a/en/pix-qrcode/simulate-payment.mdx b/en/pix-qrcode/simulate-payment.mdx
new file mode 100644
index 0000000..033654c
--- /dev/null
+++ b/en/pix-qrcode/simulate-payment.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Simulate Payment'
+openapi: 'POST /pixQrCode/simulate-payment'
+---
diff --git a/en/production.mdx b/en/production.mdx
new file mode 100644
index 0000000..524f533
--- /dev/null
+++ b/en/production.mdx
@@ -0,0 +1,58 @@
+---
+title: 'Going to Production'
+description: 'How to exit dev mode and start billing'
+icon: 'conveyor-belt-arm'
+---
+
+When migrating from the development environment to production, you'll need to complete your account verification process. This process is necessary to ensure the security and compliance of operations.
+
+## Verification Process
+
+To activate your account in production, follow these steps:
+
+
+
+
+
+
+ Click the "Dev mode" button in the top right corner of the platform to start the migration process
+
+
+
+
+
+
+
+ Fill in your company data, partner information, and attach the requested documents:
+ - Company documents
+ - Partner documents
+ - Address proof
+ - Other documents specific to your segment
+
+
+
+
+
+
+ After submitting documents:
+ - Our team will review your documentation
+ - You'll receive a response within 24 hours
+ - The approval email will contain instructions for next steps
+
+
+
+ * Make sure all documents are legible
+ * Verify that information is up to date
+ * Keep data consistent across all documents
+ * Respond promptly to any additional requests
+
+
+
+ Our team is available to assist with the migration process. Contact us by email ajuda@abacatepay.com
+
\ No newline at end of file
diff --git a/en/sdks.mdx b/en/sdks.mdx
new file mode 100644
index 0000000..52bec98
--- /dev/null
+++ b/en/sdks.mdx
@@ -0,0 +1,205 @@
+---
+title: 'SDKs'
+description: 'Official libraries for integration with the AbacatePay API'
+icon: 'boxes-stacked'
+---
+
+
+ **Accelerate your integration with our SDKs**: Our official libraries make it easy to integrate with the AbacatePay API in various programming languages.
+
+
+## What are AbacatePay SDKs?
+
+AbacatePay SDKs (Software Development Kits) are libraries that simplify communication with our API. They offer a friendly interface specific to each language, allowing you to quickly integrate our payment services into your application.
+
+
+ * **Simplified integration**: Ready functions for all API endpoints
+ * **Strong typing**: Complete interfaces in languages with type support
+ * **Error handling**: Automatic management of the most common error cases
+ * **Lower learning curve**: No need to know all API details
+ * **Frequent updates**: We keep SDKs updated with the latest features
+
+
+## Available SDKs
+
+We offer official SDKs for various programming languages. Choose what best fits your tech stack:
+
+
+
+
+
+ Official SDK for Node.js, compatible with TypeScript and ES modules.
+
+
+ Official SDK for Python 3.10+, with async/await and type hints support.
+
+
+ Official SDK for Java 8+, compatible with Spring Boot and Jakarta EE.
+
+
+ Official SDK for PHP 7.4+, with Composer and PSR standards support.
+
+
+ Official SDK for Ruby 2.6+, available as gem with Rails support.
+
+
+ Official SDK for Go 1.13+, with modules and generics support.
+
+
+ Official SDK for Rust, focused on security and performance.
+
+
+ Official SDK for Elixir, ideal for scalable and distributed applications.
+
+
+
+
+
+
+ Official SDK for Kotlin, ideal for modern Android apps.
+
+
+ Official SDK for Swift, ideal for iOS and macOS apps.
+
+
+
+
+
+## Usage Examples
+
+See how simple it is to use our SDKs in some of the most popular languages:
+
+
+```javascript Node.js
+// Installation: npm install abacatepay-nodejs-sdk
+import AbacatePay from 'abacatepay-nodejs-sdk';
+
+// Initialize the client with your API key
+const abacate = AbacatePay('your_api_key');
+
+// Create a PIX payment
+async function createPixPayment() {
+ const billing = await abacate.billing.create({
+ frequency: "ONE_TIME",
+ methods: ["PIX"],
+ products: [
+ {
+ externalId: "PRO-PLAN",
+ name: "Pro plan",
+ quantity: 1,
+ price: 1000 // Amount in cents
+ }
+ ],
+ returnUrl: "https://yoursite.com/app",
+ completionUrl: "https://yoursite.com/payment/success",
+ customer: {
+ email: 'customer@example.com'
+ }
+ });
+
+ return billing
+}
+
+createPixPayment();
+```
+
+```python Python
+# Installation: pip install abacatepay
+from abacatepay import AbacatePay
+from abacatepay.products import Product
+
+# Initialize the client with your API key
+client = AbacatePay(
+ api_key="your_api_key",
+)
+
+# Create products for billing
+products = [
+ Product(
+ external_id="123",
+ name="Test product",
+ quantity=1,
+ price=50_00,
+ description="Example product"
+ ),
+ # Or as dictionary
+ {
+ 'external_id': "321",
+ 'name': "Product as dict",
+ 'quantity': 1,
+ 'price': 10_00,
+ 'description': "Example using dict"
+ }
+]
+
+# Create a billing
+billing = client.billing.create(
+ products=products,
+ return_url="https://yourwebsite.com/return",
+ completion_url="https://yourwebsite.com/complete"
+)
+
+print(f"Billing URL: {billing.data.url}")
+```
+
+```php PHP
+// Installation: composer require abacatepay/sdk
+ 'your_api_key',
+ 'environment' => 'production' // or 'sandbox' for test environment
+]);
+
+// Create a PIX payment
+try {
+ $payment = $client->payments->createPix([
+ 'value' => 1000, // R$ 10,00
+ 'description' => 'Test payment',
+ 'expiresIn' => 3600 // 1 hour
+ ]);
+
+ echo "QR Code: " . $payment->qrCode . "\n";
+ echo "Charge key: " . $payment->chargeKey . "\n";
+} catch (Exception $e) {
+ echo "Error creating payment: " . $e->getMessage() . "\n";
+}
+```
+
+
+## Frequently Asked Questions
+
+
+ Each SDK has specific installation instructions in its GitHub repository. Generally, you can use your language's package manager, such as npm, pip, composer, bundle, etc.
+
+
+
+ Yes! All our SDKs support both environments. In some cases, you need to configure the `environment` parameter when initializing the client for `sandbox` or `production`, or simply use the API key from the desired environment.
+
+
+
+ You can open an issue in the specific SDK's GitHub repository. Our team is always attentive to fix bugs and improve our SDKs.
+
+
+
+ Contact us at ajuda@abacatepay.com letting us know which language you need. We also accept community contributions!
+
+
+## Additional Resources
+
+
+
+ Learn how to configure webhooks to receive event notifications.
+
+
+ Learn how to use the development environment to test your integrations.
+
+
+
+
+ Our team is available to help with any questions about our SDKs. Contact us by email ajuda@abacatepay.com
+
diff --git a/en/webhooks.mdx b/en/webhooks.mdx
new file mode 100644
index 0000000..bb2da61
--- /dev/null
+++ b/en/webhooks.mdx
@@ -0,0 +1,188 @@
+---
+title: 'Webhooks'
+description: 'Configure and receive notifications about updates'
+icon: 'webhook'
+---
+
+Webhooks allow your application to receive real-time notifications about important AbacatePay events.
+
+## Managing webhooks
+
+Manage your webhooks directly in our platform. You can:
+- List all active webhooks
+- Create new webhooks
+- Remove existing webhooks
+
+
+ Webhooks are specific to each environment:
+ - Webhooks created in **dev mode** receive notifications only from the test environment
+ - Webhooks created in **production** receive notifications only from real data
+
+ Learn more about the development environment here.
+
+
+## Creating webhooks
+
+
+ * Configure a unique secret for each webhook
+ * Validate the secret in all received requests
+ * Use HTTPS for all webhook URLs
+ * Implement retry logic to handle temporary failures
+
+
+## How to create your webhook
+
+Follow these steps in the AbacatePay dashboard:
+
+
+
+
+
+
+ Start the process of configuring a new webhook
+
+
+
+
+
+
+
+ You will be directed to the configuration form
+
+
+
+
+
+
+ * **Name**: Unique identifier for your webhook (e.g., "Payment Notifications")
+ * **URL**: HTTPS endpoint that will receive notifications
+ * **Secret**: Secret key to validate requests
+
+
+
+
+
+## Protecting your requests
+
+Each notification sent to your webhook includes the configured secret as a query string parameter for validation.
+
+### Webhook URL Example
+
+Base URL of your webhook:
+```
+https://mysite.com/webhook/abacatepay
+```
+
+URL with secret (how it will be called):
+```
+https://mysite.com/webhook/abacatepay?webhookSecret=your_secret_here
+```
+
+### Implementation Example
+
+```javascript
+// Webhook validation example
+app.post('/webhook/abacatepay', (req, res) => {
+ const webhookSecret = req.query.webhookSecret;
+
+ if (webhookSecret !== process.env.WEBHOOK_SECRET) {
+ return res.status(401).json({ error: 'Invalid webhook secret' });
+ }
+
+ // Process the notification
+ const event = req.body;
+ console.log('Received webhook:', event);
+
+ res.status(200).json({ received: true });
+});
+```
+
+## Supported Events
+
+Currently, we support the following events:
+
+### `billing.paid`
+
+This event is triggered when a payment is confirmed. The payload varies depending on the payment origin:
+
+#### Payment via PIX QR Code
+
+```json
+{
+ "data": {
+ "payment": {
+ "amount": 1000,
+ "fee": 80,
+ "method": "PIX"
+ },
+ "pixQrCode": {
+ "amount": 1000,
+ "id": "pix_char_mXTWdj6sABWnc4uL2Rh1r6tb",
+ "kind": "PIX",
+ "status": "PAID"
+ }
+ },
+ "devMode": false,
+ "event": "billing.paid"
+}
+```
+
+#### Payment via Billing
+
+```json
+{
+ "data": {
+ "payment": {
+ "amount": 1000,
+ "fee": 80,
+ "method": "PIX"
+ },
+ "billing": {
+ "amount": 1000,
+ "couponsUsed": [],
+ "customer": {
+ "id": "cust_4hnLDN3YfUWrwQBQKYMwL6Ar",
+ "metadata": {
+ "cellphone": "11111111111",
+ "email": "christopher@abacatepay.com",
+ "name": "Christopher Ribeiro",
+ "taxId": "12345678901"
+ }
+ },
+ "frequency": "ONE_TIME",
+ "id": "bill_QgW1BT3uzaDGR3ANKgmmmabZ",
+ "kind": [
+ "PIX"
+ ],
+ "paidAmount": 1000,
+ "products": [
+ {
+ "externalId": "123",
+ "id": "prod_RGKGsjBWsJwRn1mHyGMFJNjP",
+ "quantity": 1
+ }
+ ],
+ "status": "PAID"
+ }
+ },
+ "devMode": false,
+ "event": "billing.paid"
+}
+```
+
+
+ * The `devMode` field indicates whether the event occurred in the development environment
+ * All monetary values are expressed in cents
+ * The `fee` field represents the commission charged by AbacatePay
+ * The `event` field identifies the type of event received
+
+
+
+ Our team is available to assist with webhook implementation. Contact us by email ajuda@abacatepay.com
+
diff --git a/en/withdraw/create.mdx b/en/withdraw/create.mdx
new file mode 100644
index 0000000..879029d
--- /dev/null
+++ b/en/withdraw/create.mdx
@@ -0,0 +1,4 @@
+---
+title: Create a new Withdrawal
+openapi: 'POST /withdraw/create'
+---
diff --git a/en/withdraw/list.mdx b/en/withdraw/list.mdx
new file mode 100644
index 0000000..dc02ef5
--- /dev/null
+++ b/en/withdraw/list.mdx
@@ -0,0 +1,4 @@
+---
+title: 'List Withdrawals'
+openapi: "GET /withdraw/list"
+---
\ No newline at end of file
diff --git a/en/withdraw/reference.mdx b/en/withdraw/reference.mdx
new file mode 100644
index 0000000..2d91c78
--- /dev/null
+++ b/en/withdraw/reference.mdx
@@ -0,0 +1,182 @@
+---
+title: "Reference"
+description: "Realize saques para chaves PIX"
+icon: "book-open-cover"
+---
+
+O módulo de **Saque** permite que você transfira valores da sua conta AbacatePay para uma chave PIX de sua escolha. É uma funcionalidade essencial para gerenciar seus fundos e realizar transferências.
+
+Atualmente, o saque suporta apenas o método **PIX**, que é o método mais rápido e eficiente para transferências no Brasil.
+
+## Estrutura
+
+Um saque é representado em nossa API pela seguinte estrutura de transação:
+
+```json json
+{
+ "id": "tran_1234567890abcdef",
+ "status": "PENDING",
+ "devMode": true,
+ "receiptUrl": "https://abacatepay.com/receipt/tran_1234567890abcdef",
+ "kind": "WITHDRAW",
+ "amount": 5000,
+ "platformFee": 80,
+ "externalId": "withdraw-1234",
+ "createdAt": "2024-12-06T18:56:15.538Z",
+ "updatedAt": "2024-12-06T18:56:15.538Z"
+}
+```
+
+## Atributos:
+
+
+
+ ```json json {2}
+ {
+ "id": "tran_1234567890abcdef",
+ }
+ ```
+
+ `id` : string.
+ Id único da transação de saque na AbacatePay
+
+
+ ```json json {2}
+ {
+ "status": "PENDING",
+ }
+ ```
+ `status` : string.
+ Status atual da transação de saque.
+
+
+ | | |
+ | ---------------------| ---------------------------------------------------------------------------------------------------- |
+ | `PENDING` | **Saque criado e aguardando processamento** |
+ | `EXPIRED` | **Saque expirado e não pode mais ser processado** |
+ | `CANCELLED` | **Saque cancelado** |
+ | `COMPLETE` | **Saque processado e concluído com sucesso** |
+ | `REFUNDED` | **Saque reembolsado** |
+
+
+
+ ```json json {2}
+ {
+ "devMode": true,
+ }
+ ```
+ `devMode` : boolean.
+ Indica se o saque foi criado em ambiente de desenvolvimento (sandbox) ou produção. Atualmente suportamos saques somente em produção.
+
+
+ ```json json {2}
+ {
+ "receiptUrl": "https://abacatepay.com/receipt/tran_1234567890abcdef",
+ }
+ ```
+ `receiptUrl` : string.
+ URL do comprovante da transação de saque.
+
+
+ ```json json {2}
+ {
+ "kind": "WITHDRAW",
+ }
+ ```
+ `kind` : string.
+ Tipo da transação. Para saques, sempre será `WITHDRAW`.
+
+
+ ```json json {2}
+ {
+ "amount": 5000,
+ }
+ ```
+ `amount` : number.
+ Valor do saque em centavos. No exemplo, R$ 50,00.
+
+
+ ```json json {2}
+ {
+ "platformFee": 80,
+ }
+ ```
+ `platformFee` : number.
+ Taxa da plataforma cobrada pelo saque em centavos. No exemplo, R$ 0,80.
+
+
+ ```json json {2}
+ {
+ "externalId": "withdraw-1234",
+ }
+ ```
+ `externalId` : string.
+ Identificador único do saque em seu sistema. Opcional.
+
+
+ ```json json {2}
+ {
+ "createdAt": "2024-12-06T18:56:15.538Z",
+ }
+ ```
+ `createdAt` : string.
+ Data e hora de criação do saque.
+
+
+ ```json json {2}
+ {
+ "updatedAt": "2024-12-06T18:56:15.538Z",
+ }
+ ```
+ `updatedAt` : string.
+ Data e hora da última atualização do saque.
+
+
+
+## Tipos de Chave PIX
+
+O saque suporta os seguintes tipos de chave PIX:
+
+
+
+ Chave PIX baseada no CPF (Cadastro de Pessoa Física) do beneficiário.
+
+ **Exemplo:** `123.456.789-01`
+
+
+ Chave PIX baseada no CNPJ (Cadastro Nacional da Pessoa Jurídica) do beneficiário.
+
+ **Exemplo:** `12.345.678/0001-90`
+
+
+ Chave PIX baseada no número de telefone celular do beneficiário.
+
+ **Exemplo:** `+5511999999999`
+
+
+ Chave PIX baseada no endereço de e-mail do beneficiário.
+
+ **Exemplo:** `usuario@exemplo.com`
+
+
+ Chave PIX aleatória (chave aleatória) do beneficiário.
+
+ **Exemplo:** `a1b2c3d4-e5f6-7890-abcd-ef1234567890`
+
+
+
+## Limites e Taxas
+
+- **Valor mínimo:** R$ 3,50 (350 centavos)
+- **Taxa da plataforma:** R$ 0,80 centavos se estiver dentro dos limites descritos em nossos [termos de uso](https://abacatepay.com/termos)
+- **Processamento:** Instantâneo
+- **Disponibilidade:** 24/7 caso os limites diários e noturnos da sua conta não tenham sido excedidos
+- **Limite de uso:** 1 saque por minuto. Tentativas em excesso resultarão em erro HTTP 429 (Too Many Requests). Para aumentar o limite entre em contato com nosso suporte
+
+## Segurança
+
+- Todos os saques são autenticados via Bearer Token
+- Validação automática das chaves PIX
+- Logs detalhados de todas as transações
+- Possibilidade de cancelamento em caso de erro
+- Abusos desta API podem resultar em suspensão da conta conforme descrito em nossos [termos de uso](https://abacatepay.com/termos)
diff --git a/es/authentication.mdx b/es/authentication.mdx
new file mode 100644
index 0000000..65f4071
--- /dev/null
+++ b/es/authentication.mdx
@@ -0,0 +1,93 @@
+---
+title: 'Autenticación'
+description: 'Cómo enviar peticiones a nuestra API'
+icon: 'lock'
+---
+
+
+ **Clave de API**: Tu credencial de acceso a la API de AbacatePay. Esta clave identifica tu cuenta y autoriza tus peticiones. **IMPORTANTE**: Sin la clave de API, las peticiones serán rechazadas.
+
+
+## Gestionando claves de API
+
+Gestiona tus claves de API directamente en nuestra plataforma. Puedes:
+- Listar todas las claves activas
+- Crear nuevas claves
+- Revocar claves existentes
+
+
+ Todas las peticiones se envían al mismo endpoint (`https://api.abacatepay.com`), pero el entorno se determina por la clave de API utilizada:
+ - Las claves creadas en **dev mode** procesan transacciones en el entorno de pruebas
+ - Las claves creadas en **producción** procesan transacciones reales
+
+ Conoce más sobre el entorno de desarrollo aquí.
+
+
+
+ La API retornará el código HTTP `401` cuando:
+ - La clave de API no sea proporcionada en el header
+ - La clave sea inválida
+ - La clave haya sido revocada
+
+
+## Creando claves de API
+
+
+ * Almacena tus claves en variables de entorno o gestores de secretos
+ * Nunca compartas tus claves de API
+ * AbacatePay nunca solicitará tus claves
+ * Revoca inmediatamente cualquier clave comprometida
+
+
+## Cómo crear tu clave de API
+
+Sigue estos pasos en el dashboard de AbacatePay:
+
+
+
+
+
+
+ Inicia el proceso de creación de una nueva clave de API
+
+
+
+
+
+
+
+ Agrega una descripción clara para identificar el propósito de esta clave
+
+
+
+
+
+
+
+ Copia la clave generada y almacénala en un lugar seguro
+
+
+
+
+
+Después de crear tu clave, puedes comenzar a integrar con nuestra API. Recuerda incluir la clave en todas las peticiones en el header `Authorization`:
+
+```bash
+curl -X POST https://api.abacatepay.com/v1/payments \
+ -H "Authorization: Bearer tu_clave_api" \
+ -H "Content-Type: application/json" \
+ -d '{"amount": 1000}'
+```
+
+
+ El mismo endpoint (`https://api.abacatepay.com`) se usa tanto para el entorno de desarrollo como para producción. El entorno se determina automáticamente por la clave de API utilizada en la petición.
+
diff --git a/es/client/create.mdx b/es/client/create.mdx
new file mode 100644
index 0000000..f814f02
--- /dev/null
+++ b/es/client/create.mdx
@@ -0,0 +1,5 @@
+---
+title: 'Crear un nuevo Cliente'
+openapi: "POST /customer/create"
+---
+
diff --git a/pages/client/list.mdx b/es/client/list.mdx
similarity index 100%
rename from pages/client/list.mdx
rename to es/client/list.mdx
diff --git a/es/client/reference.mdx b/es/client/reference.mdx
new file mode 100644
index 0000000..130972b
--- /dev/null
+++ b/es/client/reference.mdx
@@ -0,0 +1,62 @@
+---
+title: 'Referencia'
+description: 'Gestiona tus clientes, aquellos que te pagan.'
+icon: 'book-open-cover'
+---
+
+Un cliente es tu usuario final, aquel al que vas a cobrar y que pagará tu producto.
+
+## Estructura
+
+Un cliente está representado en nuestra API por la siguiente estructura:
+
+```json
+{
+ "id": "cust_aebxkhDZNaMmJeKsy0AHS0FQ",
+ "metadata": {
+ "name": "Test Customer",
+ "cellphone": "11999999999",
+ "taxId": "12345678900",
+ "email": "test@example.com"
+ }
+}
+```
+
+## Atributos
+
+### id:
+
+```json {2}
+{
+ "id": "cust_aebxkhDZNaMmJeKsy0AHS0FQ",
+}
+```
+
+`id` : string.
+Id único del cliente en AbacatePay
+
+### metadatos:
+Objeto con los datos del cliente
+
+```json json {2-7}
+{
+ "metadata": {
+ "name": "Test Customer",
+ "cellphone": "11999999999",
+ "taxId": "12345678900",
+ "email": "test@example.com"
+ }
+}
+```
+
+* `name` : string.
Nombre del cliente (opcional)
+
+* `cellphone` : string.
Teléfono del cliente (opcional)
+
+* `taxId` : string.
Documento válido del cliente, puede ser CPF o CNPJ (opcional)
+
+* `email` : string.
E-mail del cliente (obligatorio)
+
+
+ No es posible crear un cliente con CPF/CNPJ inválido y si ya existe un cliente con ese CPF/CNPJ, la API no creará el nuevo cliente pero retornará el cliente ya existente
+
\ No newline at end of file
diff --git a/es/coupon/create.mdx b/es/coupon/create.mdx
new file mode 100644
index 0000000..ec146bf
--- /dev/null
+++ b/es/coupon/create.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Crear un nuevo cupón'
+openapi: "POST /coupon/create"
+---
\ No newline at end of file
diff --git a/es/coupon/list.mdx b/es/coupon/list.mdx
new file mode 100644
index 0000000..acf31a4
--- /dev/null
+++ b/es/coupon/list.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Listar cupones'
+openapi: "GET /coupon/list"
+---
\ No newline at end of file
diff --git a/es/coupon/reference.mdx b/es/coupon/reference.mdx
new file mode 100644
index 0000000..3b5d4ac
--- /dev/null
+++ b/es/coupon/reference.mdx
@@ -0,0 +1,150 @@
+---
+title: 'Referencia'
+description: 'Crea cupones de descuento para que tus clientes los usen una o varias veces'
+icon: 'book-open-cover'
+---
+
+Los cupones de descuento permiten que ofrezcas reducciones de precio a tus clientes de forma controlada y estratégica. Puedes crear cupones con descuento porcentual o valor fijo, definir límites de uso y acompañar cuántas veces fueron utilizados.
+
+
+## Estructura
+
+Un cupón está representado en nuestra API por la siguiente estructura:
+
+```json
+{
+ "id": "MY_COUPON",
+ "discountKind": "PERCENTAGE",
+ "discount": 10,
+ "maxRedeems": -1,
+ "redeemsCount": 0,
+ "status": "ACTIVE",
+ "devMode": true,
+ "notes": "teste de cupom",
+ "createdAt": "2025-01-23T14:06:16.880Z",
+ "updatedAt": "2025-01-23T14:06:16.880Z"
+}
+```
+
+## Atributos:
+
+
+
+ ```json {2}
+ {
+ "id": "MY_COUPON",
+ }
+ ```
+
+ `id` : string.
+ Código único del cupón que tus clientes utilizarán para aplicar el descuento
+
+
+ ```json {2}
+ {
+ "notes": "Cupón de bienvenida - 10% de descuento",
+ }
+ ```
+ `notes` : string.
+ Descripción interna del cupón para tu organización y control
+
+
+ ```json {2}
+ {
+ "maxRedeems": -1,
+ }
+ ```
+ `maxRedeems` : number.
+ Límite de veces que el cupón puede ser utilizado. Usa `-1` para cupones ilimitados o un número específico para limitar el uso
+
+
+ ```json {2}
+ {
+ "redeemsCount": 0,
+ }
+ ```
+ `redeemsCount` : number.
+ Contador de cuántas veces el cupón ya fue utilizado por los clientes
+
+
+ ```json {2}
+ {
+ "discountKind": "PERCENTAGE",
+ }
+ ```
+ `discountKind` : string.
+ Tipo de descuento aplicado por el cupón
+
+
+ | Tipo | Descripción |
+ | ----------- | ------------------------------------- |
+ | `PERCENTAGE` | **Descuento porcentual** (ej: 10% de descuento) |
+ | `FIXED` | **Valor fijo** (ej: R$ 5,00 de descuento) |
+
+
+
+ ```json {2}
+ {
+ "discount": 10,
+ }
+ ```
+ `discount` : number.
+ Valor del descuento. Para `PERCENTAGE` usa números de 1-100 (ej: 10 = 10%). Para `FIXED` usa el valor en centavos (ej: 500 = R$ 5,00)
+
+
+ ```json {2}
+ {
+ "status": "ACTIVE",
+ }
+ ```
+ `status` : string.
+ Estado actual del cupón
+
+
+ | Estado | Descripción |
+ | ----------- | ------------------------------------- |
+ | `ACTIVE` | **El cupón está activo y puede ser utilizado por los clientes** |
+ | `DELETED` | **El cupón fue removido y no puede más ser usado** |
+ | `DISABLED` | **El cupón fue deshabilitado o alcanzó el límite máximo de usos** |
+
+
+
+ ```json {2}
+ {
+ "devMode": true,
+ }
+ ```
+ `devMode` : boolean.
+ Indica si el cupón fue creado en ambiente de desarrollo (`true`) o producción (`false`)
+
+
+ ```json {2}
+ {
+ "metadata": {
+ "campaign": "black-friday-2024",
+ "category": "new-customers"
+ },
+ }
+ ```
+ `metadata` : object.
+ Objeto para almacenar informaciones adicionales sobre el cupón, como campaña, categoría u otros datos relevantes para tu organización
+
+
+ ```json {2}
+ {
+ "createdAt": "2025-01-23T14:06:16.880Z",
+ }
+ ```
+ `createdAt` : date-time.
+ Fecha y hora de creación del cupón
+
+
+ ```json {2}
+ {
+ "updatedAt": "2025-01-23T14:06:16.880Z",
+ }
+ ```
+ `updatedAt` : date-time.
+ Fecha y hora de la última actualización del cupón
+
+
\ No newline at end of file
diff --git a/es/devmode.mdx b/es/devmode.mdx
new file mode 100644
index 0000000..66b6d9b
--- /dev/null
+++ b/es/devmode.mdx
@@ -0,0 +1,51 @@
+---
+title: 'Dev mode, ¿qué es?'
+description: "Aprende qué es dev mode y cómo utilizarlo de la mejor forma"
+icon: 'code'
+---
+
+El Dev mode es el entorno de desarrollo de AbacatePay, diseñado para permitirte probar todas las funcionalidades de la plataforma de forma segura y controlada.
+
+## ¿Qué es el Dev mode?
+
+Cuando creas tu cuenta en AbacatePay, se configura automáticamente en Dev mode. En este entorno:
+
+- Todas las operaciones son simuladas
+- Ninguna transacción real es procesada
+- Puedes probar todas las funcionalidades sin riesgos
+- Los datos están aislados del entorno de producción
+
+
+ * Prueba tus integraciones con seguridad
+ * Experimenta diferentes escenarios de pago
+ * Configura webhooks y recibe notificaciones de prueba
+ * Valida el flujo completo de tu aplicación
+
+
+## Usando el Dev mode
+
+Para comenzar a probar:
+
+1. Crea una clave de API en el entorno de desarrollo
+2. Usa esta clave en tus peticiones de prueba
+3. Configura webhooks para recibir notificaciones de prueba
+4. Valida todos los flujos de tu aplicación
+
+
+ * Prueba todos los escenarios posibles
+ * Valida el manejo de errores
+ * Verifica las notificaciones de webhook
+ * Confirma la integración con tu sistema
+
+
+## Próximos Pasos
+
+Cuando estés confiado con tu integración:
+1. Desactiva el Dev mode
+2. Completa el proceso de verificación de la cuenta
+3. Espera la aprobación para producción
+4. Comienza a procesar transacciones reales
+
+
+ Nuestro equipo está disponible para auxiliar en el proceso de desarrollo. Contáctanos por email ajuda@abacatepay.com
+
diff --git a/es/introduction.mdx b/es/introduction.mdx
new file mode 100644
index 0000000..0b397c8
--- /dev/null
+++ b/es/introduction.mdx
@@ -0,0 +1,71 @@
+---
+title: Comienza aquí
+icon: 'Avocado'
+description: "¡Toma tu café y aprende sobre AbacatePay!"
+---
+En esta documentación encontrarás todo lo que necesitas para integrar con la API de AbacatePay. Desarrollada por desarrolladores para desarrolladores, nuestra plataforma fue diseñada para ser intuitiva y fácil de usar.
+
+## ¿Qué es AbacatePay?
+
+AbacatePay es una pasarela de pago que surgió de nuestra propia necesidad de simplificar cobros en nuestros productos. Nos dimos cuenta de que los medios de pago existentes eran excesivamente complejos:
+- Documentaciones extensas y confusas
+- Procesos de homologación largos y burocráticos
+- Múltiples formas de realizar la misma operación
+- ¡Algunas pasarelas incluso exigen cursos para integración!
+
+¿Nuestra solución? Una plataforma que transforma la complejidad de las Fintechs en una API simple e intuitiva. Mira qué fácil es:
+
+```javascript
+// Ejemplo de creación de cobro
+const payment = await abacatePay.payments.create({
+ amount: 1000,
+ description: "Servicio prestado"
+});
+```
+
+## API descomplicada
+
+Nuestra API fue construida con tres principios fundamentales:
+
+1. **Basada en intención**: Cada endpoint representa exactamente lo que lees
+ ```
+ POST /billing/create // Crea un pago
+ GET /billing/get // Busca un pago específico
+ ```
+
+2. **Idempotente**: Ejecuta la misma petición cuantas veces necesites, sin efectos secundarios
+ ```javascript
+ // Seguro para ejecutar múltiples veces
+ await abacatePay.billing.create({...});
+ ```
+
+3. **Consistente**: Nuestra API siempre retorna una opción conteniendo el error o los datos de retorno, lo que facilita la implementación en lenguajes de tipado fuerte y consistencia en todas las operaciones.
+ ```json
+ {
+ "data": {
+ "id": "bill_12345667",
+ "url": "https://abacatepay.com/pay/bill_12345667",
+ "amount": 1000,
+ "status": "PENDING",
+ "devMode": true,
+ "methods": ["PIX"],
+ "frequency": "ONE_TIME",
+ "nextBilling": null,
+ "customer": {
+ "id": "cust_12345",
+ "metadata": {
+ "email": "customer@example.com"
+ }
+ },
+ "createdAt": "2024-11-04T18:38:28.573",
+ "updatedAt": "2024-11-04T18:38:28.573",
+ },
+ "error": null
+ }
+ ```
+
+Para facilitar aún más, ofrecemos SDKs oficiales y soporte a modo de desarrollo con claves de API dedicadas.
+
+## ¿Dudas?
+
+¡Nuestro equipo está siempre listo para ayudar! Contáctanos por email ajuda@abacatepay.com
diff --git a/es/payment/create.mdx b/es/payment/create.mdx
new file mode 100644
index 0000000..7036b2d
--- /dev/null
+++ b/es/payment/create.mdx
@@ -0,0 +1,4 @@
+---
+title: Crear una nueva Facturación
+openapi: 'POST /billing/create'
+---
diff --git a/es/payment/list.mdx b/es/payment/list.mdx
new file mode 100644
index 0000000..917caa0
--- /dev/null
+++ b/es/payment/list.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Listar Facturaciones'
+openapi: "GET /billing/list"
+---
\ No newline at end of file
diff --git a/es/payment/reference.mdx b/es/payment/reference.mdx
new file mode 100644
index 0000000..058cf2e
--- /dev/null
+++ b/es/payment/reference.mdx
@@ -0,0 +1,228 @@
+---
+title: "Referencia"
+description: "Crea un enlace de facturación y deja que tu cliente pague"
+icon: "book-open-cover"
+---
+
+El término "facturación" es genérico. Representa un portal de un flujo de pago donde puedes cobrar a tu cliente y él hacer todo el proceso de pago sin ninguna interrupción.
+
+Actualmente una facturación puede ser de dos formas:
+- `ONE_TIME` para facturaciones que serán pagadas una única vez. Es necesario enviar los datos de tu cliente. Para facturar `ONE_TIME` es obligatorio informar el cliente al crear la facturación por medio de los campos `customerId` o `customer`.
+ - Solo es necesario proporcionar una de las opciones de identificador del cliente: `customerId` **O** `customer`.
+- `MULTIPLE_PAYMENTS` es una facturación que puede ser pagada múltiples veces y por múltiples personas diferentes. **Ej:** utilización de un único enlace de pago para vender un producto para múltiples personas.
+ - Para facturaciones `MULTIPLE_PAYMENTS` el usuario informará informaciones como CPF, nombre y email en la página del checkout.
+
+
+
+## Estructura
+
+Una facturación está representada en nuestra API por la siguiente estructura:
+
+```json json
+{
+ "id": "bill_uA0M0xwg5R4mSyr0n2PjHQXY",
+ "frequency": "ONE_TIME",
+ "url": "https://abacatepay.com/pay/bill_uA0M0xwg5R4mSyr0n2PjHQXY",
+ "amount": 4000,
+ "status": "PAID",
+ "devMode": true,
+ "methods": ["PIX"],
+ "products": [
+ {
+ "id": "prod_dNFbdDjfpaegmzBWWdNM2Huw",
+ "externalId": "prod-1234",
+ "quantity": 1
+ }
+ ],
+ "customer": {
+ "id": "cust_aebxkhDZNaMmJeKsy0AHS0FQ",
+ "metadata": {
+ "name": "Test Customer",
+ "cellphone": "11999999999",
+ "taxId": "12345678900",
+ "email": "test@example.com"
+ }
+ },
+ "metadata": {
+ "fee": 100,
+ "returnUrl": "https://example.com/billing",
+ "completionUrl": "https://example.com/completion"
+ },
+ "nextBilling": null,
+ "allowCoupons": false,
+ "coupons": [],
+ "createdAt": "2024-12-06T18:56:15.538Z",
+ "updatedAt": "2024-12-06T18:56:15.538Z"
+}
+```
+
+## Atributos:
+
+
+
+ ```json json {2}
+ {
+ "id": "bill_uA0M0xwg5R4mSyr0n2PjHQXY",
+ }
+ ```
+
+ `id` : string.
+ Id único de la facturación en AbacatePay
+
+
+ ```json json {2}
+ {
+ "frequency": "ONE_TIME",
+ }
+ ```
+ `frequency` : string.
+ Frecuencia de la facturación. Puede ser `ONE_TIME` o `MULTIPLE_PAYMENTS`.
+
+
+ | | |
+ | ---------------------| ---------------------------------------------------------------------------------------------------- |
+ | `ONE_TIME` | **Facturación que acepta un único pago. Es necesario enviar los datos del cliente** |
+ | `MULTIPLE_PAYMENTS` | **Facturación en modo checkout, acepta varios pagos. No es necesario enviar los datos del cliente.**|
+
+
+
+ ```json json {2}
+ {
+ "url": "https://abacatepay.com/pay/bill_uA0M0xwg5R4mSyr0n2PjHQXY",
+ }
+ ```
+ `url` : string.
+ URL para que tu cliente ejecute el pago de la facturación
+
+ ### Amount:
+ ```json json {2}
+ {
+ "amount": 4000,
+ }
+ ```
+ `amount` : number.
+ Valor de la facturación en centavos
+
+
+ ```json json {2}
+ {
+ "amount": 4000,
+ }
+ ```
+ `amount` : number.
+ Valor de la facturación en centavos
+
+
+
+ ```json json {2}
+ {
+ "status": "PAID",
+ }
+ ```
+ `status` : string.
+ Estado de la facturación. Puede ser `PENDING`, `EXPIRED`, `CANCELLED`, `PAID`, `REFUNDED`
+
+
+ | | |
+ | -----------| ------------------------------------- |
+ | `PENDING` | **La facturación está con el pago pendiente** |
+ | `EXPIRED` | **El tiempo límite de pago fue excedido** |
+ | `CANCELLED`| **La facturación fue cancelada por ti** |
+ | `PAID` | **La facturación fue pagada con éxito por el cliente** |
+ | `REFUNDED` | **El valor fue devuelto al cliente** |
+
+
+
+ ```json json {2}
+ {
+ "methods": ["PIX"],
+ }
+ ```
+ `methods` : array
+ Tipos de pago. Soportamos solamente `PIX` en el momento.
+
+
+ ```json json {2-9}
+ {
+ "products":
+ [
+ {
+ "id": "prod_dNFbdDjfpaegmzBWWdNM2Huw",
+ "externalId": "prod-1234",
+ "quantity": 1
+ }
+ ],
+ }
+ ```
+ `products` : array
+ Lista de productos incluidos en la facturación
+
+
+ ```json json {2-10}
+ {
+ "customer": {
+ "id": "cust_aebxkhDZNaMmJeKsy0AHS0FQ",
+ "metadata": {
+ "name": "Test Customer",
+ "cellphone": "11999999999",
+ "taxId": "12345678900",
+ "email": "test@example.com"
+ }
+ }
+ }
+ ```
+ `customer` : object
+ Cliente al que estás cobrando. Vea referencia de la estructura aquí
+
+
+ ```json json {2-5}
+ {
+ "metadata": {
+ "fee": 100,
+ "returnUrl": "https://example.com/billing",
+ "completionUrl": "https://example.com/completion"
+ }
+ }
+ ```
+ `metadata` : object
+ Objeto con metadatos sobre la facturación
+
+ * `fee` number
+ Tasa aplicada por AbacatePay
+ * `returnUrl` string
+ URL a la que el cliente será redirigido al hacer clic en el botón "volver"
+ * `completionUrl` string
+ URL a la que el cliente será redirigido al realizar el pago
+
+
+ ```json json {2}
+ {
+ "nextBilling": null,
+ }
+ ```
+
+ `nextBilling` : date-time | null.
+ Fecha y hora de la próxima facturación, o null para facturaciones únicas
+
+
+ ```json json {2}
+ {
+ "allowCoupons": false,
+ }
+ ```
+
+ `allowCoupons` : bool | null.
+ Permite o no cupones para la facturación
+
+
+ ```json json {2}
+ {
+ "coupons": [],
+ }
+ ```
+
+ `coupons` : array
+ Cupones permitidos en la facturación. Solo son considerados los cupones si `allowCoupons` es verdadero.
+
+
+
diff --git a/es/pix-qrcode/check.mdx b/es/pix-qrcode/check.mdx
new file mode 100644
index 0000000..fb73105
--- /dev/null
+++ b/es/pix-qrcode/check.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Verificar Estado'
+openapi: 'GET /pixQrCode/check'
+---
diff --git a/es/pix-qrcode/create.mdx b/es/pix-qrcode/create.mdx
new file mode 100644
index 0000000..93e8f55
--- /dev/null
+++ b/es/pix-qrcode/create.mdx
@@ -0,0 +1,4 @@
+---
+title: Crear QRCode PIX
+openapi: 'POST /pixQrCode/create'
+---
diff --git a/pages/pix-qrcode/list.mdx b/es/pix-qrcode/list.mdx
similarity index 100%
rename from pages/pix-qrcode/list.mdx
rename to es/pix-qrcode/list.mdx
diff --git a/es/pix-qrcode/reference.mdx b/es/pix-qrcode/reference.mdx
new file mode 100644
index 0000000..23e517d
--- /dev/null
+++ b/es/pix-qrcode/reference.mdx
@@ -0,0 +1,165 @@
+---
+title: 'Referencia'
+description: 'Genera un QRCode Pix y un código copia-y-pega para tu cliente'
+icon: 'book-open-cover'
+---
+
+
+
+## Estructura
+
+Una facturación vía QRCode Pix está representada en nuestra API por la siguiente estructura:
+
+```json json
+{
+ "id": "pix_charabc123456789",
+ "amount": 4000,
+ "status": "PAID",
+ "devMode": true,
+ "method": "PIX",
+ "brCode": "...",
+ "brCodeBase64": "...",
+ "platformFee": 80,
+ "description": "Pago PIX con AbacatePay",
+ "metadata": {
+ "pedidoId": "123"
+ },
+ "createdAt": "2024-12-06T18:56:15.538Z",
+ "updatedAt": "2024-12-06T18:56:15.538Z",
+ "expiresAt": "2024-12-06T18:56:15.538Z"
+}
+```
+
+## Atributos:
+
+
+
+ ```json json {2}
+ {
+ "id": "abc123uA0M0xwg5R4mSyr0n2PjHQXY"
+ }
+ ```
+ `id` : string.
+ Identificador único de la facturación.
+
+
+
+ ```json json {2}
+ {
+ "amount": 4000
+ }
+ ```
+ `amount` : number.
+ Valor de la facturación en centavos (ej: 4000 = R$ 40,00)
+
+
+
+ ```json json {2}
+ {
+ "status": "PAID"
+ }
+ ```
+ `status` : string.
+ Estado de la facturación. Puede ser `PENDING`, `EXPIRED`, `CANCELLED`, `PAID`, `REFUNDED`.
+
+ | Estado | Descripción |
+ | ----------- | ------------------------------------- |
+ | `PENDING` | **La facturación está con el pago pendiente** |
+ | `EXPIRED` | **El tiempo límite de pago fue excedido** |
+ | `CANCELLED`| **La facturación fue cancelada por ti** |
+ | `PAID` | **La facturación fue pagada con éxito por el cliente** |
+ | `REFUNDED` | **El valor fue devuelto al cliente** |
+
+
+
+
+ ```json json {2}
+ {
+ "devMode": true
+ }
+ ```
+ `devMode` : boolean.
+ Indica si la facturación está en ambiente de pruebas (`true`) o producción (`false`).
+
+
+
+ ```json json {2}
+ {
+ "method": "PIX"
+ }
+ ```
+ `method` : string.
+ Método de pago.
+
+
+
+ ```json json {2}
+ {
+ "brCode": "..."
+ }
+ ```
+ `brCode` : string.
+ Código PIX (copia-y-pega) para pago.
+
+
+
+ ```json json {2}
+ {
+ "brCodeBase64": "..."
+ }
+ ```
+ `brCodeBase64` : string.
+ Código PIX en formato Base64 (útil para exhibición en imágenes).
+
+
+
+ ```json json {2}
+ {
+ "platformFee": 80
+ }
+ ```
+ `platformFee` : number.
+ Tasa de la plataforma en centavos. Ejemplo: `80` significa R$ 0,80.
+
+
+
+ ```json json {2}
+ {
+ "description": "Pago PIX con AbacatePay"
+ }
+ ```
+ `description` : string.
+ Descripción de la facturación.
+
+
+
+ ```json json {2}
+ {
+ "createdAt": "2024-12-06T18:56:15.538Z"
+ }
+ ```
+ `createdAt` : date-time.
+ Fecha y hora de la creación de la facturación.
+
+
+
+ ```json json {2}
+ {
+ "updatedAt": "2024-12-06T18:56:15.538Z"
+ }
+ ```
+ `updatedAt` : date-time.
+ Última actualización de la facturación.
+
+
+
+ ```json json {2}
+ {
+ "expiresAt": "2024-12-06T18:56:15.538Z"
+ }
+ ```
+ `expiresAt` : date-time.
+ Fecha y hora de expiración del QRCode.
+
+
+
diff --git a/es/pix-qrcode/simulate-payment.mdx b/es/pix-qrcode/simulate-payment.mdx
new file mode 100644
index 0000000..9553730
--- /dev/null
+++ b/es/pix-qrcode/simulate-payment.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Simular Pago'
+openapi: 'POST /pixQrCode/simulate-payment'
+---
diff --git a/es/production.mdx b/es/production.mdx
new file mode 100644
index 0000000..142fc82
--- /dev/null
+++ b/es/production.mdx
@@ -0,0 +1,58 @@
+---
+title: 'Yendo a producción'
+description: 'Cómo salir del dev mode y comenzar a facturar'
+icon: 'conveyor-belt-arm'
+---
+
+Al migrar del ambiente de desarrollo a producción, necesitarás completar el proceso de verificación de tu cuenta. Este proceso es necesario para garantizar la seguridad y conformidad de las operaciones.
+
+## Proceso de Verificación
+
+Para activar tu cuenta en producción, sigue estos pasos:
+
+
+
+
+
+
+ Haz clic en el botón "Dev mode" en la esquina superior derecha de la plataforma para iniciar el proceso de migración
+
+
+
+
+
+
+
+ Completa los datos de tu empresa, informaciones de los socios y adjunta los documentos solicitados:
+ - Documentos de la empresa
+ - Documentos de los socios
+ - Comprobante de dirección
+ - Otros documentos específicos de tu segmento
+
+
+
+
+
+
+ Después del envío de los documentos:
+ - Nuestro equipo analizará tu documentación
+ - Recibirás una respuesta en hasta 24 horas
+ - El e-mail de aprobación contendrá instrucciones para los próximos pasos
+
+
+
+ * Asegúrate de que todos los documentos estén legibles
+ * Verifica si las informaciones están actualizadas
+ * Mantén los datos consistentes en todos los documentos
+ * Responde prontamente a cualquier solicitud adicional
+
+
+
+ Nuestro equipo está disponible para auxiliar en el proceso de migración. Entre en contacto por el e-mail ayuda@abacatepay.com
+
\ No newline at end of file
diff --git a/es/sdks.mdx b/es/sdks.mdx
new file mode 100644
index 0000000..1fd8022
--- /dev/null
+++ b/es/sdks.mdx
@@ -0,0 +1,205 @@
+---
+title: 'SDKs'
+description: 'Bibliotecas oficiales para integración con la API de AbacatePay'
+icon: 'boxes-stacked'
+---
+
+
+ **Acelera tu integración con nuestros SDKs**: Nuestras bibliotecas oficiales facilitan la integración con la API de AbacatePay en varios lenguajes de programación.
+
+
+## ¿Qué son los SDKs de AbacatePay?
+
+Los SDKs (Software Development Kits) de AbacatePay son bibliotecas que simplifican la comunicación con nuestra API. Ofrecen una interfaz amigable y específica para cada lenguaje, permitiendo que integres rápidamente nuestros servicios de pago a tu aplicación.
+
+
+ * **Integración simplificada**: Funciones listas para todos los endpoints de la API
+ * **Tipado fuerte**: Interfaces completas en lenguajes con soporte a tipos
+ * **Tratamiento de errores**: Gestión automática de los casos de error más comunes
+ * **Menor curva de aprendizaje**: No es necesario conocer todos los detalles de la API
+ * **Actualizaciones frecuentes**: Mantenemos los SDKs actualizados con las más recientes funcionalidades
+
+
+## SDKs Disponibles
+
+Ofrecemos SDKs oficiales para diversos lenguajes de programación. Elige el que mejor se adapte a tu stack tecnológica:
+
+
+
+
+
+ SDK oficial para Node.js, compatible con TypeScript y ES modules.
+
+
+ SDK oficial para Python 3.10+, con soporte a async/await y type hints.
+
+
+ SDK oficial para Java 8+, compatible con Spring Boot y Jakarta EE.
+
+
+ SDK oficial para PHP 7.4+, con soporte a Composer y PSR standards.
+
+
+ SDK oficial para Ruby 2.6+, disponible como gem y con soporte a Rails.
+
+
+ SDK oficial para Go 1.13+, con soporte a módulos y generics.
+
+
+ SDK oficial para Rust, con foco en seguridad y performance.
+
+
+ SDK oficial para Elixir, ideal para aplicaciones escalables y distribuidas.
+
+
+
+
+
+
+ SDK oficial para Kotlin, ideal para aplicativos Android modernos.
+
+
+ SDK oficial para Swift, ideal para aplicativos iOS y macOS.
+
+
+
+
+
+## Ejemplos de Uso
+
+Ve cómo es simple usar nuestros SDKs en algunos de los lenguajes más populares:
+
+
+```javascript Node.js
+// Instalación: npm install abacatepay-nodejs-sdk
+import AbacatePay from 'abacatepay-nodejs-sdk';
+
+// Inicializa el cliente con tu clave de API
+const abacate = AbacatePay('your_api_key');
+
+// Crea un pago PIX
+async function createPixPayment() {
+ const billing = await abacate.billing.create({
+ frequency: "ONE_TIME",
+ methods: ["PIX"],
+ products: [
+ {
+ externalId: "PRO-PLAN",
+ name: "Pro plan",
+ quantity: 1,
+ price: 1000 // Amount in cents
+ }
+ ],
+ returnUrl: "https://yoursite.com/app",
+ completionUrl: "https://yoursite.com/payment/success",
+ customer: {
+ email: 'customer@example.com'
+ }
+ });
+
+ return billing
+}
+
+createPixPayment();
+```
+
+```python Python
+# Instalación: pip install abacatepay
+from abacatepay import AbacatePay
+from abacatepay.products import Product
+
+# Inicializa el cliente con tu clave de API
+client = AbacatePay(
+ api_key="tu_clave_api",
+)
+
+# Crea productos para la facturación
+products = [
+ Product(
+ external_id="123",
+ name="Producto de prueba",
+ quantity=1,
+ price=50_00,
+ description="Example product"
+ ),
+ # O como diccionario
+ {
+ 'external_id': "321",
+ 'name': "Product as dict",
+ 'quantity': 1,
+ 'price': 10_00,
+ 'description': "Example using dict"
+ }
+]
+
+# Crea una facturación
+billing = client.billing.create(
+ products=products,
+ return_url="https://yourwebsite.com/return",
+ completion_url="https://yourwebsite.com/complete"
+)
+
+print(f"URL de la facturación: {billing.data.url}")
+```
+
+```php PHP
+// Instalación: composer require abacatepay/sdk
+ 'tu_clave_api',
+ 'environment' => 'production' // o 'sandbox' para ambiente de pruebas
+]);
+
+// Crea un pago PIX
+try {
+ $payment = $client->payments->createPix([
+ 'value' => 1000, // R$ 10,00
+ 'description' => 'Pago de prueba',
+ 'expiresIn' => 3600 // 1 hora
+ ]);
+
+ echo "QR Code: " . $payment->qrCode . "\n";
+ echo "Clave de facturación: " . $payment->chargeKey . "\n";
+} catch (Exception $e) {
+ echo "Error al crear pago: " . $e->getMessage() . "\n";
+}
+```
+
+
+## Preguntas Frecuentes
+
+
+ Cada SDK tiene instrucciones de instalación específicas en su repositorio en GitHub. Generalmente, puedes usar el gestor de paquetes de tu lenguaje, como npm, pip, composer, bundle, etc.
+
+
+
+ ¡Sí! Todos nuestros SDKs soportan ambos ambientes. En algunos casos, es preciso configurar el parámetro `environment` al inicializar el cliente para `sandbox` o `production`, o basta usar la clave de api del ambiente deseado.
+
+
+
+ Puedes abrir una issue en el repositorio de GitHub del SDK específico. Nuestro equipo está siempre atento para corregir bugs y mejorar nuestros SDKs.
+
+
+
+ Entre en contacto con nosotros en ayuda@abacatepay.com informando qué lenguaje necesitas. ¡También aceptamos contribuciones de la comunidad!
+
+
+## Recursos Adicionales
+
+
+
+ Aprende a configurar webhooks para recibir notificaciones de eventos.
+
+
+ Sabe cómo usar el ambiente de desarrollo para probar tus integraciones.
+
+
+
+
+ Nuestro equipo está disponible para ayudar con cualquier duda sobre nuestros SDKs. Entre en contacto por el e-mail ayuda@abacatepay.com
+
diff --git a/es/webhooks.mdx b/es/webhooks.mdx
new file mode 100644
index 0000000..1b1ad52
--- /dev/null
+++ b/es/webhooks.mdx
@@ -0,0 +1,188 @@
+---
+title: 'Webhooks'
+description: 'Configura y recibe notificaciones sobre actualizaciones'
+icon: 'webhook'
+---
+
+Los webhooks permiten que tu aplicación reciba notificaciones en tiempo real sobre eventos importantes de AbacatePay.
+
+## Gestionando webhooks
+
+Gestiona tus webhooks directamente en nuestra plataforma. Puedes:
+- Listar todos los webhooks activos
+- Crear nuevos webhooks
+- Remover webhooks existentes
+
+
+ Los webhooks son específicos para cada ambiente:
+ - Webhooks creados en **dev mode** reciben notificaciones únicamente del ambiente de pruebas
+ - Webhooks creados en **producción** reciben notificaciones únicamente de datos reales
+
+ Sabe más sobre el ambiente de desarrollo aquí.
+
+
+## Creando webhooks
+
+
+ * Configura un secret único para cada webhook
+ * Valida el secret en todas las peticiones recibidas
+ * Usa HTTPS para todas las URLs de webhook
+ * Implementa retry logic para lidiar con fallas temporales
+
+
+## Cómo crear tu webhook
+
+Sigue estos pasos en el dashboard de AbacatePay:
+
+
+
+
+
+
+ Inicia el proceso de configuración de un nuevo webhook
+
+
+
+
+
+
+
+ Serás direccionado al formulario de configuración
+
+
+
+
+
+
+ * **Nombre**: Identificador único para tu webhook (ej: "Notificaciones de Pago")
+ * **URL**: Endpoint HTTPS que recibirá las notificaciones
+ * **Secret**: Clave secreta para validar las peticiones
+
+
+
+
+
+## Protegiendo tus peticiones
+
+Cada notificación enviada para tu webhook incluye el secret configurado como parámetro de query string para validación.
+
+### Ejemplo de URL de Webhook
+
+URL base de tu webhook:
+```
+https://misitio.com/webhook/abacatepay
+```
+
+URL con secret (como será llamado):
+```
+https://misitio.com/webhook/abacatepay?webhookSecret=tu_secret_aqui
+```
+
+### Ejemplo de Implementación
+
+```javascript
+// Ejemplo de validación del webhook
+app.post('/webhook/abacatepay', (req, res) => {
+ const webhookSecret = req.query.webhookSecret;
+
+ if (webhookSecret !== process.env.WEBHOOK_SECRET) {
+ return res.status(401).json({ error: 'Invalid webhook secret' });
+ }
+
+ // Procesa la notificación
+ const event = req.body;
+ console.log('Received webhook:', event);
+
+ res.status(200).json({ received: true });
+});
+```
+
+## Eventos Soportados
+
+Actualmente, soportamos los siguientes eventos:
+
+### `billing.paid`
+
+Este evento es disparado cuando un pago es confirmado. El payload varía dependiendo del origen del pago:
+
+#### Pago vía PIX QR Code
+
+```json
+{
+ "data": {
+ "payment": {
+ "amount": 1000,
+ "fee": 80,
+ "method": "PIX"
+ },
+ "pixQrCode": {
+ "amount": 1000,
+ "id": "pix_char_mXTWdj6sABWnc4uL2Rh1r6tb",
+ "kind": "PIX",
+ "status": "PAID"
+ }
+ },
+ "devMode": false,
+ "event": "billing.paid"
+}
+```
+
+#### Pago vía Facturación
+
+```json
+{
+ "data": {
+ "payment": {
+ "amount": 1000,
+ "fee": 80,
+ "method": "PIX"
+ },
+ "billing": {
+ "amount": 1000,
+ "couponsUsed": [],
+ "customer": {
+ "id": "cust_4hnLDN3YfUWrwQBQKYMwL6Ar",
+ "metadata": {
+ "cellphone": "11111111111",
+ "email": "christopher@abacatepay.com",
+ "name": "Christopher Ribeiro",
+ "taxId": "12345678901"
+ }
+ },
+ "frequency": "ONE_TIME",
+ "id": "bill_QgW1BT3uzaDGR3ANKgmmmabZ",
+ "kind": [
+ "PIX"
+ ],
+ "paidAmount": 1000,
+ "products": [
+ {
+ "externalId": "123",
+ "id": "prod_RGKGsjBWsJwRn1mHyGMFJNjP",
+ "quantity": 1
+ }
+ ],
+ "status": "PAID"
+ }
+ },
+ "devMode": false,
+ "event": "billing.paid"
+}
+```
+
+
+ * El campo `devMode` indica si el evento ocurrió en el ambiente de desarrollo
+ * Todos los valores monetarios son expresados en centavos
+ * El campo `fee` representa la tasa cobrada por AbacatePay
+ * El campo `event` identifica el tipo de evento recibido
+
+
+
+ Nuestro equipo está disponible para auxiliar en la implementación de webhooks. Entre en contacto por el e-mail ayuda@abacatepay.com
+
diff --git a/es/withdraw/create.mdx b/es/withdraw/create.mdx
new file mode 100644
index 0000000..282831e
--- /dev/null
+++ b/es/withdraw/create.mdx
@@ -0,0 +1,4 @@
+---
+title: Crear un nuevo Retiro
+openapi: 'POST /withdraw/create'
+---
diff --git a/es/withdraw/list.mdx b/es/withdraw/list.mdx
new file mode 100644
index 0000000..5719ff5
--- /dev/null
+++ b/es/withdraw/list.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Listar Retiros'
+openapi: "GET /withdraw/list"
+---
\ No newline at end of file
diff --git a/es/withdraw/reference.mdx b/es/withdraw/reference.mdx
new file mode 100644
index 0000000..de52574
--- /dev/null
+++ b/es/withdraw/reference.mdx
@@ -0,0 +1,182 @@
+---
+title: "Referencia"
+description: "Realiza retiros para claves PIX"
+icon: "book-open-cover"
+---
+
+El módulo de **Retiro** permite que transfieras valores de tu cuenta AbacatePay para una clave PIX de tu elección. Es una funcionalidad esencial para gestionar tus fondos y realizar transferencias.
+
+Actualmente, el retiro soporta únicamente el método **PIX**, que es el método más rápido y eficiente para transferencias en Brasil.
+
+## Estructura
+
+Un retiro está representado en nuestra API por la siguiente estructura de transacción:
+
+```json json
+{
+ "id": "tran_1234567890abcdef",
+ "status": "PENDING",
+ "devMode": true,
+ "receiptUrl": "https://abacatepay.com/receipt/tran_1234567890abcdef",
+ "kind": "WITHDRAW",
+ "amount": 5000,
+ "platformFee": 80,
+ "externalId": "withdraw-1234",
+ "createdAt": "2024-12-06T18:56:15.538Z",
+ "updatedAt": "2024-12-06T18:56:15.538Z"
+}
+```
+
+## Atributos:
+
+
+
+ ```json json {2}
+ {
+ "id": "tran_1234567890abcdef",
+ }
+ ```
+
+ `id` : string.
+ Id único de la transacción de retiro en AbacatePay
+
+
+ ```json json {2}
+ {
+ "status": "PENDING",
+ }
+ ```
+ `status` : string.
+ Estado actual de la transacción de retiro.
+
+
+ | | |
+ | ---------------------| ---------------------------------------------------------------------------------------------------- |
+ | `PENDING` | **Retiro creado y aguardando procesamiento** |
+ | `EXPIRED` | **Retiro expirado y no puede más ser procesado** |
+ | `CANCELLED` | **Retiro cancelado** |
+ | `COMPLETE` | **Retiro procesado y concluido con éxito** |
+ | `REFUNDED` | **Retiro reembolsado** |
+
+
+
+ ```json json {2}
+ {
+ "devMode": true,
+ }
+ ```
+ `devMode` : boolean.
+ Indica si el retiro fue creado en ambiente de desarrollo (sandbox) o producción. Actualmente soportamos retiros únicamente en producción.
+
+
+ ```json json {2}
+ {
+ "receiptUrl": "https://abacatepay.com/receipt/tran_1234567890abcdef",
+ }
+ ```
+ `receiptUrl` : string.
+ URL del comprobante de la transacción de retiro.
+
+
+ ```json json {2}
+ {
+ "kind": "WITHDRAW",
+ }
+ ```
+ `kind` : string.
+ Tipo de la transacción. Para retiros, siempre será `WITHDRAW`.
+
+
+ ```json json {2}
+ {
+ "amount": 5000,
+ }
+ ```
+ `amount` : number.
+ Valor del retiro en centavos. En el ejemplo, R$ 50,00.
+
+
+ ```json json {2}
+ {
+ "platformFee": 80,
+ }
+ ```
+ `platformFee` : number.
+ Tasa de la plataforma cobrada por el retiro en centavos. En el ejemplo, R$ 0,80.
+
+
+ ```json json {2}
+ {
+ "externalId": "withdraw-1234",
+ }
+ ```
+ `externalId` : string.
+ Identificador único del retiro en tu sistema. Opcional.
+
+
+ ```json json {2}
+ {
+ "createdAt": "2024-12-06T18:56:15.538Z",
+ }
+ ```
+ `createdAt` : string.
+ Fecha y hora de creación del retiro.
+
+
+ ```json json {2}
+ {
+ "updatedAt": "2024-12-06T18:56:15.538Z",
+ }
+ ```
+ `updatedAt` : string.
+ Fecha y hora de la última actualización del retiro.
+
+
+
+## Tipos de Clave PIX
+
+El retiro soporta los siguientes tipos de clave PIX:
+
+
+
+ Clave PIX basada en el CPF (Cadastro de Pessoa Física) del beneficiario.
+
+ **Ejemplo:** `123.456.789-01`
+
+
+ Clave PIX basada en el CNPJ (Cadastro Nacional da Pessoa Jurídica) del beneficiario.
+
+ **Ejemplo:** `12.345.678/0001-90`
+
+
+ Clave PIX basada en el número de teléfono celular del beneficiario.
+
+ **Ejemplo:** `+5511999999999`
+
+
+ Clave PIX basada en la dirección de e-mail del beneficiario.
+
+ **Ejemplo:** `usuario@ejemplo.com`
+
+
+ Clave PIX aleatoria (clave aleatoria) del beneficiario.
+
+ **Ejemplo:** `a1b2c3d4-e5f6-7890-abcd-ef1234567890`
+
+
+
+## Límites y Tasas
+
+- **Valor mínimo:** R$ 3,50 (350 centavos)
+- **Tasa de la plataforma:** R$ 0,80 centavos si está dentro de los límites descritos en nuestros [términos de uso](https://abacatepay.com/termos)
+- **Procesamiento:** Instantáneo
+- **Disponibilidad:** 24/7 caso los límites diarios y nocturnos de tu cuenta no hayan sido excedidos
+- **Límite de uso:** 1 retiro por minuto. Intentativas en exceso resultarán en error HTTP 429 (Too Many Requests). Para aumentar el límite entre en contacto con nuestro soporte
+
+## Seguridad
+
+- Todos los retiros son autenticados vía Bearer Token
+- Validación automática de las claves PIX
+- Logs detallados de todas las transacciones
+- Posibilidad de cancelación en caso de error
+- Abusos de esta API pueden resultar en suspensión de la cuenta conforme descrito en nuestros [términos de uso](https://abacatepay.com/termos)
diff --git a/openapi-en.yaml b/openapi-en.yaml
new file mode 100644
index 0000000..e8a6ddd
--- /dev/null
+++ b/openapi-en.yaml
@@ -0,0 +1,921 @@
+openapi: 3.1.0
+info:
+ title: AbacatePay API
+ description: API for managing charges and payments using AbacatePay.
+ version: 1.0.0
+servers:
+ - url: https://api.abacatepay.com/v1
+ description: Single server for production and sandbox environments.
+paths:
+ /customer/create:
+ post:
+ summary: Create a new customer
+ description: Allows you to create a new customer for your store.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ description: Your customer data if you want to create them at the time of creating your charge.
+ required: ['name', 'cellphone', 'email', 'taxId']
+ additionalProperties: false
+ properties:
+ name:
+ type: string
+ description: Full name of your customer
+ example: Daniel Lima
+ cellphone:
+ type: string
+ description: Customer's mobile phone
+ example: (11) 4002-8922
+ email:
+ type: string
+ description: Customer's email
+ example: daniel_lima@abacatepay.com
+ taxId:
+ type: string
+ description: Valid CPF or CNPJ of the customer.
+ example: 123.456.789-01
+ responses:
+ '200':
+ description: Customer created successfully.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/Customer'
+ error:
+ type: 'null'
+ '401':
+ description: Unauthorized. Authentication failed.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message describing the reason for authentication failure.
+ example: 'Invalid or missing authentication token.'
+ /customer/list:
+ get:
+ summary: List customers
+ description: Allows you to retrieve a list of all your customers.
+ security:
+ - bearerAuth: []
+ responses:
+ '200':
+ description: Customer list returned successfully.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ description: List of customers.
+ items:
+ $ref: '#/components/schemas/Customer'
+ error:
+ type: 'null'
+ '401':
+ description: Unauthorized. Authentication failed.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message describing the reason for authentication failure.
+ example: 'Invalid or missing authentication token.'
+ /coupon/create:
+ post:
+ summary: Create a new coupon
+ description: Allows you to create a new coupon that can be used by your customers to apply discounts.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/Coupon'
+ error:
+ type: 'null'
+ responses:
+ '200':
+ description: Coupon created successfully.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/CouponResponse'
+ error:
+ type: 'null'
+ '401':
+ description: Unauthorized. Authentication failed.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message describing the reason for authentication failure.
+ example: 'Invalid or missing authentication token.'
+ /coupon/list:
+ get:
+ summary: List coupons
+ description: Allows you to retrieve a list of all your coupons.
+ security:
+ - bearerAuth: []
+ responses:
+ '200':
+ description: Coupon list returned successfully.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ description: List of coupons.
+ items:
+ $ref: '#/components/schemas/CouponResponse'
+ error:
+ type: 'null'
+ '401':
+ description: Unauthorized. Authentication failed.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message describing the reason for authentication failure.
+ example: 'Invalid or missing authentication token.'
+ /billing/create:
+ post:
+ summary: Create a new charge
+ description: Allows you to create a payment link for your customer to pay you.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ frequency:
+ type: string
+ description: Defines the type of charge frequency. For one-time charges, use `ONE_TIME`. For charges that can be paid more than once, use `MULTIPLE_PAYMENTS`.
+ enum: ['ONE_TIME', 'MULTIPLE_PAYMENTS']
+ default: 'ONE_TIME'
+ example: 'ONE_TIME'
+ methods:
+ type: array
+ description: Payment methods that will be used. Currently, only PIX is supported.
+ items:
+ type: string
+ enum: ['PIX']
+ minItems: 1
+ maxItems: 1
+ uniqueItems: true
+ default: ['PIX']
+ example: ['PIX']
+ products:
+ type: array
+ description: List of products your customer is paying for.
+ items:
+ type: object
+ properties:
+ externalId:
+ type: string
+ description: The product id in your system. We use this id to create your product in AbacatePay automatically, so make sure your id is unique.
+ example: 'prod-1234'
+ name:
+ type: string
+ description: Product name.
+ example: 'Fitness Program Subscription'
+ description:
+ type: string
+ description: Detailed product description.
+ example: 'Access to premium fitness program for 1 month.'
+ quantity:
+ type: integer
+ description: Quantity of the product being purchased.
+ minimum: 1
+ example: 2
+ price:
+ type: integer
+ description: Price per unit of the product in cents. Minimum is 100 (1 BRL).
+ minimum: 100
+ example: 2000
+ required: ['externalId', 'name', 'quantity', 'price']
+ additionalProperties: false
+ minItems: 1
+ example:
+ - externalId: 'prod-1234'
+ name: 'Fitness Program Subscription'
+ description: 'Access to premium fitness program for 1 month.'
+ quantity: 2
+ price: 2000
+ returnUrl:
+ type: string
+ format: uri
+ description: URL to redirect the customer if they click the "Back" option.
+ example: 'https://example.com/billing'
+ completionUrl:
+ type: string
+ format: uri
+ description: URL to redirect the customer when payment is completed.
+ example: 'https://example.com/completion'
+ customerId:
+ type: string
+ description: The id of a customer already registered in your store.
+ example: 'cust_abcdefghij'
+ customer:
+ type: object
+ description: Your customer data. If the customer doesn't exist, they will be created.
+ required: ['name', 'cellphone', 'email', 'taxId']
+ additionalProperties: false
+ properties:
+ name:
+ type: string
+ description: Full name of your customer
+ example: Daniel Lima
+ cellphone:
+ type: string
+ description: Customer's mobile phone
+ example: (11) 4002-8922
+ email:
+ type: string
+ description: Customer's email
+ example: daniel_lima@abacatepay.com
+ taxId:
+ type: string
+ description: CPF or CNPJ of the customer.
+ example: 123.456.789-01
+ allowCoupons:
+ type: boolean
+ default: false
+ example: false
+ description: If true, coupons can be used with the billing
+ coupons:
+ type: array
+ description: List of available coupons to be used with the billing
+ example: ['ABKT10', "ABKT5", "PROMO10"]
+ default: []
+ maxItems: 50
+ items:
+ type: string
+ externalId:
+ type: string
+ description: If you have a unique identifier from your application for charges, completely optional.
+ example: 'your_id_123'
+
+ required: ['frequency', 'methods', 'products', 'returnUrl', 'completionUrl']
+ additionalProperties: false
+ responses:
+ '200':
+ description: Charge created successfully.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/Billing'
+ error:
+ type: 'null'
+ '401':
+ description: Unauthorized. Authentication failed.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message describing the reason for authentication failure.
+ example: 'Invalid or missing authentication token.'
+ /billing/list:
+ get:
+ summary: List charges
+ description: Allows you to retrieve a list of all created charges.
+ security:
+ - bearerAuth: []
+ responses:
+ '200':
+ description: Charge list returned successfully.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ description: List of created charges.
+ items:
+ $ref: '#/components/schemas/Billing'
+ error:
+ type: 'null'
+ '401':
+ description: Unauthorized. Authentication failed.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message describing the reason for authentication failure.
+ example: 'Invalid or missing authentication token.'
+ /pixQrCode/create:
+ post:
+ summary: 'Create PIX QRCode'
+ description: Allows you to create a copy-and-paste code and a PIX QRCode for your customer to make the payment.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ amount:
+ type: number
+ description: Charge amount in cents.
+ expiresIn:
+ type: number
+ description: Charge expiration time in seconds.
+ description:
+ type: string
+ maxLength: 140
+ description: Message that will appear at the time of PIX payment.
+ customer:
+ type: object
+ description: |
+ Your customer data to create them.
+ The customer object is not mandatory, but when providing any customer information, all fields `name`, `cellphone`, `email` and `taxId` are required.
+ required: ['name', 'cellphone', 'email', 'taxId']
+ additionalProperties: false
+ properties:
+ name:
+ type: string
+ description: Full name of your customer
+ example: Daniel Lima
+ cellphone:
+ type: string
+ description: Customer's mobile phone
+ example: (11) 4002-8922
+ email:
+ type: string
+ description: Customer's email
+ example: daniel_lima@abacatepay.com
+ taxId:
+ type: string
+ description: CPF or CNPJ of the customer.
+ example: 123.456.789-01
+ metadata:
+ type: object
+ description: Optional metadata for the charge
+ additionalProperties: true
+ default:
+ externalId: '123'
+ required: ['amount']
+ additionalProperties: false
+ responses:
+ '200':
+ description: PIX QRCode created successfully
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/PixQRCode'
+ error:
+ type: 'null'
+ '401':
+ description: Unauthorized. Authentication failed.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message describing the reason for authentication failure.
+ example: 'Invalid or missing authentication token.'
+ /pixQrCode/check:
+ get:
+ summary: 'Check Status'
+ description: Check PIX QRCode payment status.
+ security:
+ - bearerAuth: []
+ responses:
+ '200':
+ description: Status returned
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: object
+ properties:
+ status:
+ type: string
+ description: Information about the PIX QRCode progress.
+ enum: ['PENDING', 'EXPIRED', 'CANCELLED', 'PAID', 'REFUNDED']
+ example: 'PENDING'
+ expiresAt:
+ type: string
+ description: PIX QRCode expiration date
+ example: '2025-03-25T21:50:20.772Z'
+ error:
+ type: 'null'
+ '401':
+ description: Unauthorized. Authentication failed.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message describing the reason for authentication failure.
+ example: 'Invalid or missing authentication token.'
+ parameters:
+ - name: id
+ in: query
+ description: PIX QRCode ID
+ required: true
+ schema:
+ type: string
+ /pixQrCode/simulate-payment:
+ post:
+ summary: 'Simulate Payment'
+ description: Simulates payment of a PIX QRCode created in development mode.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ metadata:
+ type: object
+ description: Optional metadata for the request
+ default: {}
+ responses:
+ '200':
+ description: Payment completed successfully
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/PixQRCode'
+ error:
+ type: 'null'
+ '401':
+ description: Unauthorized. Authentication failed.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message describing the reason for authentication failure.
+ example: 'Invalid or missing authentication token.'
+ parameters:
+ - name: id
+ in: query
+ description: PIX QRCode ID
+ required: true
+ schema:
+ type: string
+ /withdraw/create:
+ post:
+ summary: Create a new withdrawal
+ description: Allows you to create a new withdrawal to transfer values from your account to a PIX key.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ description: Data needed to create a withdrawal.
+ required: ['externalId', 'method', 'amount', 'pix']
+ additionalProperties: false
+ properties:
+ description:
+ type: string
+ description: Optional withdrawal description.
+ example: Withdrawal to main account
+ externalId:
+ type: string
+ description: Unique withdrawal identifier in your system.
+ example: 'withdraw-1234'
+ method:
+ type: string
+ description: Available withdrawal method.
+ enum: ['PIX']
+ example: 'PIX'
+ amount:
+ type: number
+ description: Withdrawal amount in cents.
+ minimum: 350
+ example: 5000
+ pix:
+ type: object
+ description: PIX key data to receive the withdrawal.
+ required: ['type', 'key']
+ additionalProperties: false
+ properties:
+ type:
+ type: string
+ description: PIX key type.
+ enum: ['CPF', 'CNPJ', 'PHONE', 'EMAIL', 'RANDOM']
+ example: 'CPF'
+ key:
+ type: string
+ description: PIX key value.
+ example: '123.456.789-01'
+ responses:
+ '200':
+ description: Withdrawal created successfully.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/Transaction'
+ error:
+ type: 'null'
+ '401':
+ description: Unauthorized. Authentication failed.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message describing the reason for authentication failure.
+ example: 'Invalid or missing authentication token.'
+ /withdraw/list:
+ get:
+ summary: List withdrawals
+ description: Allows you to retrieve a list of all created withdrawals.
+ security:
+ - bearerAuth: []
+ responses:
+ '200':
+ description: Withdrawal list returned successfully.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ description: List of created withdrawals.
+ items:
+ $ref: '#/components/schemas/Transaction'
+ error:
+ type: 'null'
+ '401':
+ description: Unauthorized. Authentication failed.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message describing the reason for authentication failure.
+ example: 'Invalid or missing authentication token.'
+components:
+ schemas:
+ Customer:
+ type: object
+ description: Your customer data.
+ required: ['name', 'cellphone', 'email', 'taxId']
+ additionalProperties: false
+ properties:
+ id:
+ type: string
+ description: Unique customer identifier
+ example: 'bill_123456'
+ metadata:
+ type: object
+ description: Customer data
+ properties:
+ name:
+ type: string
+ description: Full name of your customer
+ example: Daniel Lima
+ cellphone:
+ type: string
+ description: Customer's mobile phone
+ example: (11) 4002-8922
+ email:
+ type: string
+ description: Customer's email
+ example: daniel_lima@abacatepay.com
+ taxId:
+ type: string
+ description: CPF or CNPJ of the customer.
+ example: 123.456.789-01
+ Coupon:
+ type: object
+ description: Your coupon data.
+ required: ['code', 'discount', 'discountKind']
+ additionalProperties: false
+ properties:
+ code:
+ type: string
+ description: Unique coupon identifier
+ example: DEYVIN_20
+ notes:
+ type: string
+ description: Description about the coupon
+ example: Discount coupon for my audience
+ maxRedeems:
+ type: number
+ description: Number of times the coupon can be redeemed. -1 means this coupon can be redeemed without limits
+ example: 10
+ default: -1
+ discountKind:
+ type: string
+ description: Type of discount applied, percentage or fixed
+ enum: ['PERCENTAGE', 'FIXED']
+ discount:
+ type: number
+ description: Discount value to be applied
+ metadata:
+ type: object
+ description: Key-value object for coupon metadata
+ default: {}
+ CouponResponse:
+ type: object
+ description: Your coupon data.
+ required: ['id', 'discount', 'discountKind', 'status', 'createdAt', 'updatedAt']
+ additionalProperties: false
+ properties:
+ id:
+ type: string
+ description: Unique coupon identifier
+ example: DEYVIN_20
+ notes:
+ type: string
+ description: Description about the coupon
+ example: Discount coupon for my audience
+ maxRedeems:
+ type: integer
+ description: Number of times the coupon can be redeemed. -1 means unlimited.
+ example: -1
+ default: 10
+ redeemsCount:
+ type: integer
+ description: Number of times the coupon has already been redeemed.
+ example: 0
+ discountKind:
+ type: string
+ description: Type of discount applied, percentage or fixed
+ enum: ['PERCENTAGE', 'FIXED']
+ example: PERCENTAGE
+ discount:
+ type: number
+ description: Discount value to be applied
+ example: 123
+ devMode:
+ type: boolean
+ description: Indicates if the coupon was created in test environment.
+ example: true
+ status:
+ type: string
+ description: Current coupon status.
+ enum: ['ACTIVE', 'INACTIVE', 'EXPIRED']
+ example: ACTIVE
+ createdAt:
+ type: string
+ format: date-time
+ description: Coupon creation date.
+ example: '2025-05-25T23:43:25.250Z'
+ updatedAt:
+ type: string
+ format: date-time
+ description: Coupon update date.
+ example: '2025-05-25T23:43:25.250Z'
+ metadata:
+ type: object
+ description: Key-value object for coupon metadata
+ default: {}
+
+ Billing:
+ type: object
+ properties:
+ id:
+ type: string
+ description: Unique charge identifier.
+ example: 'bill_123456'
+ url:
+ type: string
+ format: uri
+ description: URL where the user can complete the payment.
+ example: 'https://pay.abacatepay.com/bill-5678'
+ amount:
+ type: number
+ description: Total amount to be paid in cents.
+ example: 4000
+ status:
+ type: string
+ description: Current charge status.
+ enum: ['PENDING', 'EXPIRED', 'CANCELLED', 'PAID', 'REFUNDED']
+ example: 'PENDING'
+ devMode:
+ type: boolean
+ description: Indicates if the charge was created in test environment.
+ example: true
+ methods:
+ type: array
+ description: Payment methods supported for this charge.
+ items:
+ type: string
+ enum: ['PIX']
+ example: ['PIX']
+ products:
+ type: array
+ description: List of products in the charge.
+ items:
+ type: object
+ properties:
+ id:
+ type: string
+ description: Unique product identifier.
+ example: 'prod_123456'
+ externalId:
+ type: string
+ description: The product id in your system.
+ example: 'prod-1234'
+ quantity:
+ type: integer
+ description: Quantity of the product being purchased.
+ example: 2
+ frequency:
+ type: string
+ description: Charge frequency.
+ enum: ['ONE_TIME', 'MULTIPLE_PAYMENTS']
+ example: 'ONE_TIME'
+ nextBilling:
+ type: string
+ format: date-time
+ nullable: true
+ description: Date and time of the next charge, or null for one-time charges.
+ example: 'null'
+ customer:
+ type: object
+ nullable: true
+ $ref: '#/components/schemas/Customer'
+ allowCoupons:
+ type: boolean
+ nullable: true
+ default: false
+ description: If true, coupons can be used with the billing
+ coupons:
+ type: array
+ description: List of available coupons to be used with the billing
+ nullable: true
+ default: []
+ items:
+ type: string
+ required:
+ ['id', 'url', 'amount', 'status', 'devMode', 'methods', 'products', 'frequency', 'createdAt', 'updatedAt']
+ PixQRCode:
+ type: object
+ properties:
+ id:
+ type: string
+ description: Unique PIX QRCode identifier.
+ example: 'pix_char_123456'
+ amount:
+ type: number
+ description: Amount to be paid.
+ example: 100
+ status:
+ type: string
+ description: Information about the PIX QRCode progress.
+ enum: ['PENDING', 'EXPIRED', 'CANCELLED', 'PAID', 'REFUNDED']
+ example: 'PENDING'
+ devMode:
+ type: boolean
+ description: Environment where the PIX QRCode was created.
+ example: true
+ brCode:
+ type: string
+ description: PIX QRCode copy-and-paste code.
+ example: '00020101021226950014br.gov.bcb.pix'
+ brCodeBase64:
+ type: string
+ description: PIX QRCode image in Base64.
+ example: 'data:image/png;base64,iVBORw0KGgoAAA'
+ platformFee:
+ type: number
+ description: Platform fees
+ example: 80
+ createdAt:
+ type: string
+ description: PIX QRCode creation date.
+ example: '2025-03-24T21:50:20.772Z'
+ updatedAt:
+ type: string
+ description: PIX QRCode update date.
+ example: '2025-03-24T21:50:20.772Z'
+ expiresAt:
+ type: string
+ description: PIX QRCode expiration date
+ example: '2025-03-25T21:50:20.772Z'
+ Transaction:
+ type: object
+ description: Transaction data (payment or withdrawal).
+ properties:
+ id:
+ type: string
+ description: Unique transaction identifier.
+ example: 'tran_123456'
+ status:
+ type: string
+ description: Current transaction status.
+ enum: ['PENDING', 'EXPIRED', 'CANCELLED', 'COMPLETE', 'REFUNDED']
+ example: 'PENDING'
+ devMode:
+ type: boolean
+ description: Indicates if the transaction was created in test environment.
+ example: true
+ receiptUrl:
+ type: string
+ format: uri
+ description: Transaction receipt URL.
+ example: 'https://abacatepay.com/receipt/tran_123456'
+ kind:
+ type: string
+ description: Transaction type.
+ enum: ['PAYMENT', 'WITHDRAW']
+ example: 'WITHDRAW'
+ default: 'WITHDRAW'
+ amount:
+ type: number
+ description: Transaction amount in cents.
+ example: 5000
+ platformFee:
+ type: number
+ description: Platform fee in cents.
+ example: 80
+ externalId:
+ type: string
+ description: External transaction identifier.
+ example: 'withdraw-1234'
+ createdAt:
+ type: string
+ format: date-time
+ description: Transaction creation date.
+ example: '2025-03-24T21:50:20.772Z'
+ updatedAt:
+ type: string
+ format: date-time
+ description: Transaction update date.
+ example: '2025-03-24T21:50:20.772Z'
+ required:
+ ['id', 'status', 'devMode', 'receiptUrl', 'kind', 'amount', 'platformFee', 'createdAt', 'updatedAt']
+ securitySchemes:
+ bearerAuth:
+ type: http
+ scheme: bearer
+ bearerFormat: JWT
+ description: Bearer authentication header in the format `Bearer ` where `` is your API key.
+
diff --git a/openapi-es.yaml b/openapi-es.yaml
new file mode 100644
index 0000000..7f6e1df
--- /dev/null
+++ b/openapi-es.yaml
@@ -0,0 +1,920 @@
+openapi: 3.1.0
+info:
+ title: API AbacatePay
+ description: API para gestión de cobros y pagos usando AbacatePay.
+ version: 1.0.0
+servers:
+ - url: https://api.abacatepay.com/v1
+ description: Servidor único para los entornos de producción y sandbox.
+paths:
+ /customer/create:
+ post:
+ summary: Crear un nuevo cliente
+ description: Te permite crear un nuevo cliente para tu tienda.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ description: Los datos de tu cliente en caso de que desees crearlo al momento de crear tu cobro.
+ required: ['name', 'cellphone', 'email', 'taxId']
+ additionalProperties: false
+ properties:
+ name:
+ type: string
+ description: Nombre completo de tu cliente
+ example: Daniel Lima
+ cellphone:
+ type: string
+ description: Celular del cliente
+ example: (11) 4002-8922
+ email:
+ type: string
+ description: E-mail del cliente
+ example: daniel_lima@abacatepay.com
+ taxId:
+ type: string
+ description: CPF o CNPJ válido del cliente.
+ example: 123.456.789-01
+ responses:
+ '200':
+ description: Cliente creado exitosamente.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/Customer'
+ error:
+ type: 'null'
+ '401':
+ description: No autorizado. Fallo en la autenticación.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Mensaje de error describiendo el motivo del fallo en la autenticación.
+ example: 'Token de autenticación inválido o ausente.'
+ /customer/list:
+ get:
+ summary: Listar clientes
+ description: Te permite recuperar una lista de todos tus clientes.
+ security:
+ - bearerAuth: []
+ responses:
+ '200':
+ description: Lista de clientes retornada exitosamente.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ description: Lista de clientes.
+ items:
+ $ref: '#/components/schemas/Customer'
+ error:
+ type: 'null'
+ '401':
+ description: No autorizado. Fallo en la autenticación.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Mensaje de error describiendo el motivo del fallo en la autenticación.
+ example: 'Token de autenticación inválido o ausente.'
+ /coupon/create:
+ post:
+ summary: Crear un nuevo cupón
+ description: Permite que crees un nuevo cupón que puede ser usado por tus clientes para aplicar descuentos.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/Coupon'
+ error:
+ type: 'null'
+ responses:
+ '200':
+ description: Cliente creado con éxito.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/CouponResponse'
+ error:
+ type: 'null'
+ '401':
+ description: No autorizado. Fallo en la autenticación.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Mensaje de error describiendo el motivo del fallo en la autenticación.
+ example: 'Token de autenticación inválido o ausente.'
+ /coupon/list:
+ get:
+ summary: Listar cupones
+ description: Permite que recuperes una lista de todos tus cupones.
+ security:
+ - bearerAuth: []
+ responses:
+ '200':
+ description: Lista de cupones retornada con éxito.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ description: Lista de cupones.
+ items:
+ $ref: '#/components/schemas/CouponResponse'
+ error:
+ type: 'null'
+ '401':
+ description: No autorizado. Fallo en la autenticación.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Mensaje de error describiendo el motivo del fallo en la autenticación.
+ example: 'Token de autenticación inválido o ausente.'
+ /billing/create:
+ post:
+ summary: Crear una nueva facturación
+ description: Permite que crees un enlace de facturación para que tu cliente te pague.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ frequency:
+ type: string
+ description: Define el tipo de frecuencia de la facturación. Para facturaciones únicas, usa `ONE_TIME`. Para facturaciones que pueden ser pagadas más de una vez, usa `MULTIPLE_PAYMENTS`.
+ enum: ['ONE_TIME', 'MULTIPLE_PAYMENTS']
+ default: 'ONE_TIME'
+ example: 'ONE_TIME'
+ methods:
+ type: array
+ description: Métodos de pago que serán utilizados. Actualmente, únicamente PIX es soportado.
+ items:
+ type: string
+ enum: ['PIX']
+ minItems: 1
+ maxItems: 1
+ uniqueItems: true
+ default: ['PIX']
+ example: ['PIX']
+ products:
+ type: array
+ description: Lista de productos que tu cliente está pagando.
+ items:
+ type: object
+ properties:
+ externalId:
+ type: string
+ description: El id del producto en tu sistema. Utilizamos ese id para crear tu producto en AbacatePay de forma automática, entonces asegúrate de que tu id sea único.
+ example: 'prod-1234'
+ name:
+ type: string
+ description: Nombre del producto.
+ example: 'Suscripción de Programa Fitness'
+ description:
+ type: string
+ description: Descripción detallada del producto.
+ example: 'Acceso al programa fitness premium por 1 mes.'
+ quantity:
+ type: integer
+ description: Cantidad del producto siendo adquirida.
+ minimum: 1
+ example: 2
+ price:
+ type: integer
+ description: Precio por unidad del producto en centavos. El mínimo es 100 (1 BRL).
+ minimum: 100
+ example: 2000
+ required: ['externalId', 'name', 'quantity', 'price']
+ additionalProperties: false
+ minItems: 1
+ example:
+ - externalId: 'prod-1234'
+ name: 'Suscripción de Programa Fitness'
+ description: 'Acceso al programa fitness premium por 1 mes.'
+ quantity: 2
+ price: 2000
+ returnUrl:
+ type: string
+ format: uri
+ description: URL para redirigir al cliente caso el mismo haga clic en la opción "Volver".
+ example: 'https://example.com/billing'
+ completionUrl:
+ type: string
+ format: uri
+ description: URL para redirigir al cliente cuando el pago sea concluido.
+ example: 'https://example.com/completion'
+ customerId:
+ type: string
+ description: El id de un cliente ya registrado en tu tienda.
+ example: 'cust_abcdefghij'
+ customer:
+ type: object
+ description: Datos de tu cliente. Caso el cliente no exista será creado.
+ required: ['name', 'cellphone', 'email', 'taxId']
+ additionalProperties: false
+ properties:
+ name:
+ type: string
+ description: Nombre completo de tu cliente
+ example: Daniel Lima
+ cellphone:
+ type: string
+ description: Celular del cliente
+ example: (11) 4002-8922
+ email:
+ type: string
+ description: E-mail del cliente
+ example: daniel_lima@abacatepay.com
+ taxId:
+ type: string
+ description: CPF o CNPJ del cliente.
+ example: 123.456.789-01
+ allowCoupons:
+ type: boolean
+ default: false
+ example: false
+ description: Si es verdadero cupones pueden ser usados en la facturación
+ coupons:
+ type: array
+ description: Lista de cupones disponibles para ser usados con la facturación
+ example: ['ABKT10', "ABKT5", "PROMO10"]
+ default: []
+ maxItems: 50
+ items:
+ type: string
+ externalId:
+ type: string
+ description: Caso tengas un identificador único de tu aplicación para facturaciones, completamente opcional.
+ example: 'tu_id_123'
+
+ required: ['frequency', 'methods', 'products', 'returnUrl', 'completionUrl']
+ additionalProperties: false
+ responses:
+ '200':
+ description: Facturación creada con éxito.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/Billing'
+ error:
+ type: 'null'
+ '401':
+ description: No autorizado. Fallo en la autenticación.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Mensaje de error describiendo el motivo del fallo en la autenticación.
+ example: 'Token de autenticación inválido o ausente.'
+ /billing/list:
+ get:
+ summary: Listar facturaciones
+ description: Permite que recuperes una lista de todas las facturaciones creadas.
+ security:
+ - bearerAuth: []
+ responses:
+ '200':
+ description: Lista de facturaciones retornada con éxito.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ description: Lista de facturaciones creadas.
+ items:
+ $ref: '#/components/schemas/Billing'
+ error:
+ type: 'null'
+ '401':
+ description: No autorizado. Fallo en la autenticación.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Mensaje de error describiendo el motivo del fallo en la autenticación.
+ example: 'Token de autenticación inválido o ausente.'
+ /pixQrCode/create:
+ post:
+ summary: 'Crear QRCode PIX'
+ description: Permite que crees un código copia-y-pega y un QRCode Pix para que tu cliente haga el pago.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ amount:
+ type: number
+ description: Valor de la facturación en centavos.
+ expiresIn:
+ type: number
+ description: Tiempo de expiración de la facturación en segundos.
+ description:
+ type: string
+ maxLength: 140
+ description: Mensaje que aparecerá en la hora del pago del PIX.
+ customer:
+ type: object
+ description: |
+ Los datos de tu cliente para crearlo.
+ El objeto de customer no es obligatorio, pero al informar cualquier información del `customer` todos los campos `name`, `cellphone`, `email` y `taxId` son obligatorios.
+ required: ['name', 'cellphone', 'email', 'taxId']
+ additionalProperties: false
+ properties:
+ name:
+ type: string
+ description: Nombre completo de tu cliente
+ example: Daniel Lima
+ cellphone:
+ type: string
+ description: Celular del cliente
+ example: (11) 4002-8922
+ email:
+ type: string
+ description: E-mail del cliente
+ example: daniel_lima@abacatepay.com
+ taxId:
+ type: string
+ description: CPF o CNPJ del cliente.
+ example: 123.456.789-01
+ metadata:
+ type: object
+ description: Metadatos opcionales para la facturación
+ additionalProperties: true
+ default:
+ externalId: '123'
+ required: ['amount']
+ additionalProperties: false
+ responses:
+ '200':
+ description: QRCode Pix creado con éxito
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/PixQRCode'
+ error:
+ type: 'null'
+ '401':
+ description: No autorizado. Fallo en la autenticación.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Mensaje de error describiendo el motivo del fallo en la autenticación.
+ example: 'Token de autenticación inválido o ausente.'
+ /pixQrCode/check:
+ get:
+ summary: 'Verificar Estado'
+ description: Verificar estado del pago del QRCode Pix.
+ security:
+ - bearerAuth: []
+ responses:
+ '200':
+ description: Estado retornado
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: object
+ properties:
+ status:
+ type: string
+ description: Información sobre el progreso del QRCode Pix.
+ enum: ['PENDING', 'EXPIRED', 'CANCELLED', 'PAID', 'REFUNDED']
+ example: 'PENDING'
+ expiresAt:
+ type: string
+ description: Fecha de expiración del QRCode Pix
+ example: '2025-03-25T21:50:20.772Z'
+ error:
+ type: 'null'
+ '401':
+ description: No autorizado. Fallo en la autenticación.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Mensaje de error describiendo el motivo del fallo en la autenticación.
+ example: 'Token de autenticación inválido o ausente.'
+ parameters:
+ - name: id
+ in: query
+ description: ID del QRCode Pix
+ required: true
+ schema:
+ type: string
+ /pixQrCode/simulate-payment:
+ post:
+ summary: 'Simular Pago'
+ description: Simula el pago de un QRCode Pix creado en el modo de desarrollo.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ metadata:
+ type: object
+ description: Metadatos opcionales para la petición
+ default: {}
+ responses:
+ '200':
+ description: Pago realizado con éxito
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/PixQRCode'
+ error:
+ type: 'null'
+ '401':
+ description: No autorizado. Fallo en la autenticación.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Mensaje de error describiendo el motivo del fallo en la autenticación.
+ example: 'Token de autenticación inválido o ausente.'
+ parameters:
+ - name: id
+ in: query
+ description: ID del QRCode Pix
+ required: true
+ schema:
+ type: string
+ /withdraw/create:
+ post:
+ summary: Crear un nuevo retiro
+ description: Permite que crees un nuevo retiro para transferir valores de tu cuenta para una clave PIX.
+ security:
+ - bearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ description: Datos necesarios para crear un retiro.
+ required: ['externalId', 'method', 'amount', 'pix']
+ additionalProperties: false
+ properties:
+ description:
+ type: string
+ description: Descripción opcional del retiro.
+ example: Retiro para cuenta principal
+ externalId:
+ type: string
+ description: Identificador único del retiro en tu sistema.
+ example: 'withdraw-1234'
+ method:
+ type: string
+ description: Método de retiro disponible.
+ enum: ['PIX']
+ example: 'PIX'
+ amount:
+ type: number
+ description: Valor del retiro en centavos.
+ minimum: 350
+ example: 5000
+ pix:
+ type: object
+ description: Datos de la clave PIX para recibir el retiro.
+ required: ['type', 'key']
+ additionalProperties: false
+ properties:
+ type:
+ type: string
+ description: Tipo de la clave PIX.
+ enum: ['CPF', 'CNPJ', 'PHONE', 'EMAIL', 'RANDOM']
+ example: 'CPF'
+ key:
+ type: string
+ description: Valor de la clave PIX.
+ example: '123.456.789-01'
+ responses:
+ '200':
+ description: Retiro creado con éxito.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/Transaction'
+ error:
+ type: 'null'
+ '401':
+ description: No autorizado. Fallo en la autenticación.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Mensaje de error describiendo el motivo del fallo en la autenticación.
+ example: 'Token de autenticación inválido o ausente.'
+ /withdraw/list:
+ get:
+ summary: Listar retiros
+ description: Permite que recuperes una lista de todos los retiros creados.
+ security:
+ - bearerAuth: []
+ responses:
+ '200':
+ description: Lista de retiros retornada con éxito.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ description: Lista de retiros creados.
+ items:
+ $ref: '#/components/schemas/Transaction'
+ error:
+ type: 'null'
+ '401':
+ description: No autorizado. Fallo en la autenticación.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Mensaje de error describiendo el motivo del fallo en la autenticación.
+ example: 'Token de autenticación inválido o ausente.'
+components:
+ schemas:
+ Customer:
+ type: object
+ description: Los datos de tu cliente.
+ required: ['name', 'cellphone', 'email', 'taxId']
+ additionalProperties: false
+ properties:
+ id:
+ type: string
+ description: Identificador único del cliente
+ example: 'bill_123456'
+ metadata:
+ type: object
+ description: Datos del cliente
+ properties:
+ name:
+ type: string
+ description: Nombre completo de tu cliente
+ example: Daniel Lima
+ cellphone:
+ type: string
+ description: Celular del cliente
+ example: (11) 4002-8922
+ email:
+ type: string
+ description: E-mail del cliente
+ example: daniel_lima@abacatepay.com
+ taxId:
+ type: string
+ description: CPF o CNPJ del cliente.
+ example: 123.456.789-01
+ Coupon:
+ type: object
+ description: Los datos de tu cupón.
+ required: ['code', 'discount', 'discountKind']
+ additionalProperties: false
+ properties:
+ code:
+ type: string
+ description: Identificador único del cupón
+ example: DEYVIN_20
+ notes:
+ type: string
+ description: Descripción sobre el cupón
+ example: Cupón de descuento para mi público
+ maxRedeems:
+ type: number
+ description: Cantidad de veces en que el cupón puede ser canjeado. -1 Significa que ese cupón puede ser canjeado sin límites
+ example: 10
+ default: -1
+ discountKind:
+ type: string
+ description: Tipo de descuento aplicado, porcentaje o fijo
+ enum: ['PERCENTAGE', 'FIXED']
+ discount:
+ type: number
+ description: Valor de descuento a ser aplicado
+ metadata:
+ type: object
+ description: Objeto clave valor para metadatos del cupón
+ default: {}
+ CouponResponse:
+ type: object
+ description: Los datos de tu cupón.
+ required: ['id', 'discount', 'discountKind', 'status', 'createdAt', 'updatedAt']
+ additionalProperties: false
+ properties:
+ id:
+ type: string
+ description: Identificador único del cupón
+ example: DEYVIN_20
+ notes:
+ type: string
+ description: Descripción sobre el cupón
+ example: Cupón de descuento para mi público
+ maxRedeems:
+ type: integer
+ description: Cantidad de veces en que el cupón puede ser canjeado. -1 significa ilimitado.
+ example: -1
+ default: 10
+ redeemsCount:
+ type: integer
+ description: Cantidad de veces que el cupón ya fue canjeado.
+ example: 0
+ discountKind:
+ type: string
+ description: Tipo de descuento aplicado, porcentaje o fijo
+ enum: ['PERCENTAGE', 'FIXED']
+ example: PERCENTAGE
+ discount:
+ type: number
+ description: Valor de descuento a ser aplicado
+ example: 123
+ devMode:
+ type: boolean
+ description: Indica si el cupón fue creado en ambiente de pruebas.
+ example: true
+ status:
+ type: string
+ description: Estado actual del cupón.
+ enum: ['ACTIVE', 'INACTIVE', 'EXPIRED']
+ example: ACTIVE
+ createdAt:
+ type: string
+ format: date-time
+ description: Fecha de creación del cupón.
+ example: '2025-05-25T23:43:25.250Z'
+ updatedAt:
+ type: string
+ format: date-time
+ description: Fecha de actualización del cupón.
+ example: '2025-05-25T23:43:25.250Z'
+ metadata:
+ type: object
+ description: Objeto clave valor para metadatos del cupón
+ default: {}
+
+ Billing:
+ type: object
+ properties:
+ id:
+ type: string
+ description: Identificador único de la facturación.
+ example: 'bill_123456'
+ url:
+ type: string
+ format: uri
+ description: URL donde el usuario puede concluir el pago.
+ example: 'https://pay.abacatepay.com/bill-5678'
+ amount:
+ type: number
+ description: Valor total a ser pagado en centavos.
+ example: 4000
+ status:
+ type: string
+ description: Estado actual de la facturación.
+ enum: ['PENDING', 'EXPIRED', 'CANCELLED', 'PAID', 'REFUNDED']
+ example: 'PENDING'
+ devMode:
+ type: boolean
+ description: Indica si la facturación fue creada en ambiente de pruebas.
+ example: true
+ methods:
+ type: array
+ description: Métodos de pago soportados para esta facturación.
+ items:
+ type: string
+ enum: ['PIX']
+ example: ['PIX']
+ products:
+ type: array
+ description: Lista de productos en la facturación.
+ items:
+ type: object
+ properties:
+ id:
+ type: string
+ description: Identificador único del producto.
+ example: 'prod_123456'
+ externalId:
+ type: string
+ description: El id del producto en tu sistema.
+ example: 'prod-1234'
+ quantity:
+ type: integer
+ description: Cantidad del producto siendo adquirida.
+ example: 2
+ frequency:
+ type: string
+ description: Frecuencia de la facturación.
+ enum: ['ONE_TIME', 'MULTIPLE_PAYMENTS']
+ example: 'ONE_TIME'
+ nextBilling:
+ type: string
+ format: date-time
+ nullable: true
+ description: Fecha y hora de la próxima facturación, o null para facturaciones únicas.
+ example: 'null'
+ customer:
+ type: object
+ nullable: true
+ $ref: '#/components/schemas/Customer'
+ allowCoupons:
+ type: boolean
+ nullable: true
+ default: false
+ description: Si es verdadero cupones pueden ser usados en la facturación
+ coupons:
+ type: array
+ description: Lista de cupones disponibles para ser usados con la facturación
+ nullable: true
+ default: []
+ items:
+ type: string
+ required:
+ ['id', 'url', 'amount', 'status', 'devMode', 'methods', 'products', 'frequency', 'createdAt', 'updatedAt']
+ PixQRCode:
+ type: object
+ properties:
+ id:
+ type: string
+ description: Identificador único del QRCode Pix.
+ example: 'pix_char_123456'
+ amount:
+ type: number
+ description: Valor a ser pagado.
+ example: 100
+ status:
+ type: string
+ description: Información sobre el progreso del QRCode Pix.
+ enum: ['PENDING', 'EXPIRED', 'CANCELLED', 'PAID', 'REFUNDED']
+ example: 'PENDING'
+ devMode:
+ type: boolean
+ description: Ambiente en el cual el QRCode Pix fue creado.
+ example: true
+ brCode:
+ type: string
+ description: Código copia-y-pega del QRCode Pix.
+ example: '00020101021226950014br.gov.bcb.pix'
+ brCodeBase64:
+ type: string
+ description: Imagen en Base64 del QRCode Pix.
+ example: 'data:image/png;base64,iVBORw0KGgoAAA'
+ platformFee:
+ type: number
+ description: Tasas de la plataforma
+ example: 80
+ createdAt:
+ type: string
+ description: Fecha de creación del QRCode Pix.
+ example: '2025-03-24T21:50:20.772Z'
+ updatedAt:
+ type: string
+ description: Fecha de actualización del QRCode Pix.
+ example: '2025-03-24T21:50:20.772Z'
+ expiresAt:
+ type: string
+ description: Fecha de expiración del QRCode Pix
+ example: '2025-03-25T21:50:20.772Z'
+ Transaction:
+ type: object
+ description: Datos de una transacción (pago o retiro).
+ properties:
+ id:
+ type: string
+ description: Identificador único de la transacción.
+ example: 'tran_123456'
+ status:
+ type: string
+ description: Estado actual de la transacción.
+ enum: ['PENDING', 'EXPIRED', 'CANCELLED', 'COMPLETE', 'REFUNDED']
+ example: 'PENDING'
+ devMode:
+ type: boolean
+ description: Indica si la transacción fue creada en ambiente de pruebas.
+ example: true
+ receiptUrl:
+ type: string
+ format: uri
+ description: URL del comprobante de la transacción.
+ example: 'https://abacatepay.com/receipt/tran_123456'
+ kind:
+ type: string
+ description: Tipo de la transacción.
+ enum: ['PAYMENT', 'WITHDRAW']
+ example: 'WITHDRAW'
+ default: 'WITHDRAW'
+ amount:
+ type: number
+ description: Valor de la transacción en centavos.
+ example: 5000
+ platformFee:
+ type: number
+ description: Tasa de la plataforma en centavos.
+ example: 80
+ externalId:
+ type: string
+ description: Identificador externo de la transacción.
+ example: 'withdraw-1234'
+ createdAt:
+ type: string
+ format: date-time
+ description: Fecha de creación de la transacción.
+ example: '2025-03-24T21:50:20.772Z'
+ updatedAt:
+ type: string
+ format: date-time
+ description: Fecha de actualización de la transacción.
+ example: '2025-03-24T21:50:20.772Z'
+ required:
+ ['id', 'status', 'devMode', 'receiptUrl', 'kind', 'amount', 'platformFee', 'createdAt', 'updatedAt']
+ securitySchemes:
+ bearerAuth:
+ type: http
+ scheme: bearer
+ bearerFormat: JWT
+ description: Cabecera de autenticación Bearer en el formato `Bearer ` donde `` es tu clave de API.
\ No newline at end of file
diff --git a/openapi.yaml b/openapi-pt.yaml
similarity index 100%
rename from openapi.yaml
rename to openapi-pt.yaml
diff --git a/pages/authentication.mdx b/pt/authentication.mdx
similarity index 100%
rename from pages/authentication.mdx
rename to pt/authentication.mdx
diff --git a/pages/client/create.mdx b/pt/client/create.mdx
similarity index 100%
rename from pages/client/create.mdx
rename to pt/client/create.mdx
diff --git a/pt/client/list.mdx b/pt/client/list.mdx
new file mode 100644
index 0000000..65c5fd0
--- /dev/null
+++ b/pt/client/list.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Listar Clientes'
+openapi: "GET /customer/list"
+---
diff --git a/pages/client/reference.mdx b/pt/client/reference.mdx
similarity index 100%
rename from pages/client/reference.mdx
rename to pt/client/reference.mdx
diff --git a/pages/coupon/create.mdx b/pt/coupon/create.mdx
similarity index 100%
rename from pages/coupon/create.mdx
rename to pt/coupon/create.mdx
diff --git a/pages/coupon/list.mdx b/pt/coupon/list.mdx
similarity index 100%
rename from pages/coupon/list.mdx
rename to pt/coupon/list.mdx
diff --git a/pages/coupon/reference.mdx b/pt/coupon/reference.mdx
similarity index 100%
rename from pages/coupon/reference.mdx
rename to pt/coupon/reference.mdx
diff --git a/pages/devmode.mdx b/pt/devmode.mdx
similarity index 100%
rename from pages/devmode.mdx
rename to pt/devmode.mdx
diff --git a/pages/introduction.mdx b/pt/introduction.mdx
similarity index 100%
rename from pages/introduction.mdx
rename to pt/introduction.mdx
diff --git a/pages/payment/create.mdx b/pt/payment/create.mdx
similarity index 100%
rename from pages/payment/create.mdx
rename to pt/payment/create.mdx
diff --git a/pages/payment/list.mdx b/pt/payment/list.mdx
similarity index 100%
rename from pages/payment/list.mdx
rename to pt/payment/list.mdx
diff --git a/pages/payment/reference.mdx b/pt/payment/reference.mdx
similarity index 100%
rename from pages/payment/reference.mdx
rename to pt/payment/reference.mdx
diff --git a/pages/pix-qrcode/check.mdx b/pt/pix-qrcode/check.mdx
similarity index 100%
rename from pages/pix-qrcode/check.mdx
rename to pt/pix-qrcode/check.mdx
diff --git a/pages/pix-qrcode/create.mdx b/pt/pix-qrcode/create.mdx
similarity index 100%
rename from pages/pix-qrcode/create.mdx
rename to pt/pix-qrcode/create.mdx
diff --git a/pt/pix-qrcode/list.mdx b/pt/pix-qrcode/list.mdx
new file mode 100644
index 0000000..bf6edf9
--- /dev/null
+++ b/pt/pix-qrcode/list.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Listar QRCodes Pix'
+openapi: "GET /pixQrCode/list"
+---
\ No newline at end of file
diff --git a/pages/pix-qrcode/reference.mdx b/pt/pix-qrcode/reference.mdx
similarity index 100%
rename from pages/pix-qrcode/reference.mdx
rename to pt/pix-qrcode/reference.mdx
diff --git a/pages/pix-qrcode/simulate-payment.mdx b/pt/pix-qrcode/simulate-payment.mdx
similarity index 100%
rename from pages/pix-qrcode/simulate-payment.mdx
rename to pt/pix-qrcode/simulate-payment.mdx
diff --git a/pages/production.mdx b/pt/production.mdx
similarity index 100%
rename from pages/production.mdx
rename to pt/production.mdx
diff --git a/pages/sdks.mdx b/pt/sdks.mdx
similarity index 100%
rename from pages/sdks.mdx
rename to pt/sdks.mdx
diff --git a/pages/webhooks.mdx b/pt/webhooks.mdx
similarity index 100%
rename from pages/webhooks.mdx
rename to pt/webhooks.mdx
diff --git a/pages/withdraw/create.mdx b/pt/withdraw/create.mdx
similarity index 100%
rename from pages/withdraw/create.mdx
rename to pt/withdraw/create.mdx
diff --git a/pages/withdraw/list.mdx b/pt/withdraw/list.mdx
similarity index 100%
rename from pages/withdraw/list.mdx
rename to pt/withdraw/list.mdx
diff --git a/pages/withdraw/reference.mdx b/pt/withdraw/reference.mdx
similarity index 100%
rename from pages/withdraw/reference.mdx
rename to pt/withdraw/reference.mdx