Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 1 addition & 131 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.0.0",
"info": {
"title": "NTX Pay Public API — México",
"description": "API Pública NTX Pay para integração com SPEI (cash-in/cash-out) e OXXO (cash-in) no México. Todos os valores monetários são expressos em centavos MXN.",
"description": "API Pública NTX Pay para integração com SPEI (cash-in/cash-out) no México. Todos os valores monetários são expressos em centavos MXN.",
"version": "1.0.0",
"contact": {}
},
Expand All @@ -25,10 +25,6 @@
"name": "SPEI",
"description": "Transferências interbancárias instantâneas mexicanas (cash-in via CLABE descartável; cash-out para CLABE)"
},
{
"name": "OXXO",
"description": "Cobrança em dinheiro na rede OXXO (cash-in via boleto/código de barras)"
},
{
"name": "Webhooks Config",
"description": "Configuração de webhooks para notificações de eventos"
Expand Down Expand Up @@ -456,86 +452,6 @@
}
}
},
"OxxoCashInInputDto": {
"type": "object",
"required": [
"amountCentavos",
"customerName"
],
"properties": {
"amountCentavos": {
"type": "integer",
"minimum": 1,
"example": 20000
},
"customerName": {
"type": "string",
"minLength": 3,
"maxLength": 255,
"example": "Juan Perez"
},
"customerTaxId": {
"type": "string",
"minLength": 10,
"maxLength": 20,
"description": "RFC/CURP (opcional)",
"example": "PEPJ800101ABC"
},
"externalId": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"example": "order-xyz-789"
}
}
},
"OxxoCashInOutputDto": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 33333
},
"status": {
"type": "string",
"enum": [
"PENDING",
"CONFIRMED",
"EXPIRED"
],
"example": "PENDING"
},
"barcode": {
"type": "string",
"nullable": true,
"description": "Código de barras OXXO para pagamento no caixa",
"example": "012345678901234567"
},
"referenceNumerical": {
"type": "string",
"nullable": true,
"description": "Referência numérica OXXO",
"example": "12345-67890"
},
"checkoutUrl": {
"type": "string",
"nullable": true,
"format": "uri",
"description": "URL do cupom imprimível",
"example": "https://pay.ntxpay.com/oxxo/abc"
},
"expiresAt": {
"type": "string",
"nullable": true,
"format": "date-time",
"example": "2026-05-20T23:59:59.000Z"
},
"amountCentavos": {
"type": "integer",
"example": 20000
}
}
},
"WebhookItemOutputDto": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -985,52 +901,6 @@
}
}
},
"/api/oxxo/cash-in": {
"post": {
"summary": "Criar cobrança OXXO (cash-in)",
"description": "**Requer Bearer JWT**. Gera código de barras / cupom OXXO para pagamento em dinheiro nas lojas da rede OXXO. Confirmação após a leitura no caixa (delay típico de minutos a horas).",
"operationId": "OxxoCashInController_create",
"tags": [
"OXXO"
],
"security": [
{
"bearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OxxoCashInInputDto"
}
}
}
},
"responses": {
"201": {
"description": "Cobrança OXXO criada (PENDING)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OxxoCashInOutputDto"
}
}
}
},
"400": {
"description": "Dados inválidos"
},
"401": {
"description": "Token inválido"
},
"502": {
"description": "mexico-ms indisponível"
}
}
}
},
"/api/webhooks-config": {
"get": {
"summary": "Listar webhooks da conta",
Expand Down
14 changes: 3 additions & 11 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"es/endpoints/spei-cash-in",
"es/endpoints/spei-cash-out",
"es/endpoints/spei-transaction",
"es/endpoints/oxxo-cash-in",
"es/endpoints/webhooks-config-list",
"es/endpoints/webhooks-config-setup",
"es/endpoints/webhooks-config-delete"
Expand Down Expand Up @@ -134,7 +133,6 @@
"en/endpoints/spei-cash-in",
"en/endpoints/spei-cash-out",
"en/endpoints/spei-transaction",
"en/endpoints/oxxo-cash-in",
"en/endpoints/webhooks-config-list",
"en/endpoints/webhooks-config-setup",
"en/endpoints/webhooks-config-delete"
Expand Down Expand Up @@ -197,12 +195,6 @@
"pt-br/endpoints/spei-transaction"
]
},
{
"group": "OXXO",
"pages": [
"pt-br/endpoints/oxxo-cash-in"
]
},
{
"group": "Webhooks Config",
"pages": [
Expand Down Expand Up @@ -244,13 +236,13 @@
},
"metadata": {
"og:site_name": "Documentação da API NTX Pay México",
"og:title": "Documentação da API NTX Pay México — SPEI e OXXO",
"og:description": "Integração com SPEI (cash-in via CLABE, cash-out) e OXXO (cash-in em dinheiro) através de uma única API.",
"og:title": "Documentação da API NTX Pay México — SPEI",
"og:description": "Integração com SPEI (cash-in via CLABE, cash-out) através de uma única API.",
"og:type": "website",
"og:locale": "pt_BR",
"twitter:card": "summary_large_image",
"twitter:title": "Documentação da API NTX Pay México",
"twitter:description": "Integração SPEI e OXXO via API REST."
"twitter:description": "Integração SPEI via API REST."
},
"seo": {
"indexHiddenPages": false
Expand Down
3 changes: 0 additions & 3 deletions en/endpoints/oxxo-cash-in.mdx

This file was deleted.

6 changes: 3 additions & 3 deletions en/guides/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ENCODED_CERT=$(cat client.cert.pem | python3 -c "import sys,urllib.parse; print(
#### Request

```bash
curl -X POST https://api.ntxpay.com/api/auth/token \
curl -X POST https://sandbox.ntxpay.com/api/auth/token \
-H "X-SSL-Client-Cert: $ENCODED_CERT" \
-H "Content-Type: application/json" \
-d '{
Expand All @@ -63,7 +63,7 @@ curl -X POST https://api.ntxpay.com/api/auth/token \
Include the `access_token` in all authenticated requests:

```bash
curl -X GET https://api.ntxpay.com/api/balance \
curl -X GET https://sandbox.ntxpay.com/api/balance \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
```

Expand Down Expand Up @@ -95,7 +95,7 @@ const encodedCert = encodeURIComponent(cert);

async function getToken(): Promise<string> {
const { data } = await axios.post(
'https://api.ntxpay.com/api/auth/token',
'https://sandbox.ntxpay.com/api/auth/token',
{
clientId: process.env.NTXPAY_CLIENT_ID,
clientSecret: process.env.NTXPAY_CLIENT_SECRET,
Expand Down
6 changes: 3 additions & 3 deletions en/guides/balance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Authorization: Bearer {token}
#### Request

```bash
curl -X GET https://api.ntxpay.com/api/balance \
curl -X GET https://sandbox.ntxpay.com/api/balance \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
```

Expand Down Expand Up @@ -59,7 +59,7 @@ curl -X GET https://api.ntxpay.com/api/balance \
import axios from 'axios';

async function getBalance(token: string) {
const { data } = await axios.get('https://api.ntxpay.com/api/balance', {
const { data } = await axios.get('https://sandbox.ntxpay.com/api/balance', {
headers: { Authorization: `Bearer ${token}` },
});

Expand All @@ -85,7 +85,7 @@ async function safeSpeiCashOut(amountCentavos: number, token: string, dto: any)
);
}

return axios.post('https://api.ntxpay.com/api/spei/cash-out', dto, {
return axios.post('https://sandbox.ntxpay.com/api/spei/cash-out', dto, {
headers: { Authorization: `Bearer ${token}` },
});
}
Expand Down
4 changes: 2 additions & 2 deletions en/guides/get-started.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 'Get Started'
description: 'Welcome to the NTX Pay México API. This guide walks you through the first steps to integrate and start using SPEI and OXXO.'
description: 'Welcome to the NTX Pay México API. This guide walks you through the first steps to integrate and start using SPEI.'
---

## Overview
Expand Down Expand Up @@ -54,7 +54,7 @@ The NTX Pay México API lets your company perform payment operations, check bala
| Environment | URL | Provider |
|---|---|---|
| Sandbox | `https://sandbox.ntxpay.com` | `sandbox` (simulated transactions) |
| Production | `https://api.ntxpay.com` | `smartfastpay` |
| Production | Provided at onboarding | `smartfastpay` |

## Support

Expand Down
10 changes: 5 additions & 5 deletions en/guides/migrating-from-voluti.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The NTX Pay México API was designed so that customers coming from **Voluti SPEI

| Item | Voluti | NTX Pay |
|---|---|---|
| Production host | `api.spei.magenpay.io` | `api.ntxpay.com` |
| Production host | `api.spei.magenpay.io` | Provided at onboarding |
| Sandbox host | — | `sandbox.ntxpay.com` |
| Versioning | `/api/v1` | `/api` |
| Auth header | `Authorization: API_KEY:NONCE:SIGNATURE` | `Authorization: Bearer <JWT>` |
Expand Down Expand Up @@ -51,7 +51,7 @@ curl -X POST https://api.spei.magenpay.io/api/v1/transaction/cashin \
}'

# NTX Pay — IDENTICAL payload works
curl -X POST https://api.ntxpay.com/api/spei/cash-in \
curl -X POST https://sandbox.ntxpay.com/api/spei/cash-in \
-H "Authorization: Bearer $JWT" \
-d '{
"amount": "100.00",
Expand Down Expand Up @@ -104,7 +104,7 @@ curl -X POST https://api.spei.magenpay.io/api/v1/transaction/cashout \
}'

# NTX Pay — same payload accepted
curl -X POST https://api.ntxpay.com/api/spei/cash-out \
curl -X POST https://sandbox.ntxpay.com/api/spei/cash-out \
-H "Authorization: Bearer $JWT" \
-d '{
"amount": "100.00",
Expand All @@ -124,7 +124,7 @@ The dedicated endpoint keeps 1-to-1 semantics with Voluti's `conciliation`:
curl -X GET https://api.spei.magenpay.io/api/v1/transaction/order_abc_123/conciliation

# NTX Pay
curl -X GET https://api.ntxpay.com/api/spei/transaction/order_abc_123 \
curl -X GET https://sandbox.ntxpay.com/api/spei/transaction/order_abc_123 \
-H "Authorization: Bearer $JWT"
```

Expand Down Expand Up @@ -196,7 +196,7 @@ Details in [Webhook Implementation](/en/guides/webhooks/implementation).
Replace the HMAC header assembly with the `POST /api/auth/token` flow (cert + clientId/clientSecret) → cache the JWT for ~10 minutes.
</Step>
<Step title="Swap the host">
From `api.spei.magenpay.io` → `api.ntxpay.com`. Payloads remain the same (aliases accepted).
From `api.spei.magenpay.io` → your NTX Pay production host (provided at onboarding). Payloads remain the same (aliases accepted).
</Step>
<Step title="Reconfigure webhooks">
Create 1 or more `POST /api/webhooks-config`. Adjust your handler to validate the NTX Pay HMAC (header `X-NTXPay-Signature`).
Expand Down
Loading
Loading