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
2 changes: 1 addition & 1 deletion api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"servers": [
{
"url": "https://sandbox.ntxpay.com",
"url": "https://sandbox.mx.ntxpay.com",
"description": "Sandbox"
}
],
Expand Down
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://sandbox.ntxpay.com/api/auth/token \
curl -X POST https://sandbox.mx.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://sandbox.ntxpay.com/api/auth/token \
Include the `access_token` in all authenticated requests:

```bash
curl -X GET https://sandbox.ntxpay.com/api/balance \
curl -X GET https://sandbox.mx.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://sandbox.ntxpay.com/api/auth/token',
'https://sandbox.mx.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://sandbox.ntxpay.com/api/balance \
curl -X GET https://sandbox.mx.ntxpay.com/api/balance \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
```

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

async function getBalance(token: string) {
const { data } = await axios.get('https://sandbox.ntxpay.com/api/balance', {
const { data } = await axios.get('https://sandbox.mx.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://sandbox.ntxpay.com/api/spei/cash-out', dto, {
return axios.post('https://sandbox.mx.ntxpay.com/api/spei/cash-out', dto, {
headers: { Authorization: `Bearer ${token}` },
});
}
Expand Down
6 changes: 3 additions & 3 deletions en/guides/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The NTX Pay México API lets your company perform payment operations, check bala
Register your webhook URL via `POST /api/webhooks-config` so you can receive simulated webhook events.

```bash
curl -X POST https://sandbox.ntxpay.com/api/webhooks-config \
curl -X POST https://sandbox.mx.ntxpay.com/api/webhooks-config \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
Expand All @@ -36,7 +36,7 @@ The NTX Pay México API lets your company perform payment operations, check bala
Authenticate, make API calls, and use the `X-Sandbox-Scenario` header to simulate different outcomes (immediate confirmation, failure, expiration, etc.).

```bash
curl -X POST https://sandbox.ntxpay.com/api/spei/cash-in \
curl -X POST https://sandbox.mx.ntxpay.com/api/spei/cash-in \
-H "Authorization: Bearer $TOKEN" \
-H "X-Sandbox-Scenario: cash_in_failed" \
-H "Content-Type: application/json" \
Expand All @@ -53,7 +53,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) |
| Sandbox | `https://sandbox.mx.ntxpay.com` | `sandbox` (simulated transactions) |
| Production | Provided at onboarding | `smartfastpay` |

## Support
Expand Down
8 changes: 4 additions & 4 deletions en/guides/migrating-from-voluti.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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` | Provided at onboarding |
| Sandbox host | — | `sandbox.ntxpay.com` |
| Sandbox host | — | `sandbox.mx.ntxpay.com` |
| Versioning | `/api/v1` | `/api` |
| Auth header | `Authorization: API_KEY:NONCE:SIGNATURE` | `Authorization: Bearer <JWT>` |
| Credential issuance | API key + secret from panel | `POST /api/signup` → `clientId/clientSecret`; then `POST /api/auth/token` with cert X.509 |
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://sandbox.ntxpay.com/api/spei/cash-in \
curl -X POST https://sandbox.mx.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://sandbox.ntxpay.com/api/spei/cash-out \
curl -X POST https://sandbox.mx.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://sandbox.ntxpay.com/api/spei/transaction/order_abc_123 \
curl -X GET https://sandbox.mx.ntxpay.com/api/spei/transaction/order_abc_123 \
-H "Authorization: Bearer $JWT"
```

Expand Down
10 changes: 5 additions & 5 deletions en/guides/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: 'Signup, authentication and first SPEI transaction'
## 1. Create account

```bash
curl -X POST https://sandbox.ntxpay.com/api/signup \
curl -X POST https://sandbox.mx.ntxpay.com/api/signup \
-H "Content-Type: application/json" \
-d '{
"holderName": "Maria Lopez",
Expand All @@ -31,7 +31,7 @@ The response includes `credentials.clientId` and `credentials.clientSecret`. The
```bash
ENCODED_CERT=$(cat client.cert.pem | python3 -c "import sys,urllib.parse; print(urllib.parse.quote(sys.stdin.read()))")

curl -X POST https://sandbox.ntxpay.com/api/auth/token \
curl -X POST https://sandbox.mx.ntxpay.com/api/auth/token \
-H "X-SSL-Client-Cert: $ENCODED_CERT" \
-H "Content-Type: application/json" \
-d '{"clientId":"qr-93-550e8400","clientSecret":"a1b2..."}'
Expand All @@ -42,7 +42,7 @@ Returns `access_token` with 10-minute validity.
## 3. Configure webhook

```bash
curl -X POST https://sandbox.ntxpay.com/api/webhooks-config \
curl -X POST https://sandbox.mx.ntxpay.com/api/webhooks-config \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
Expand All @@ -56,7 +56,7 @@ The response includes the `secret` used to validate the HMAC signature.
## 4. Create SPEI charge

```bash
curl -X POST https://sandbox.ntxpay.com/api/spei/cash-in \
curl -X POST https://sandbox.mx.ntxpay.com/api/spei/cash-in \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
Expand All @@ -72,7 +72,7 @@ Returns `destinationClabe`. The payer transfers to that CLABE; confirmation arri

| Environment | URL | Provider |
|---|---|---|
| Sandbox | `https://sandbox.ntxpay.com` | `sandbox` (simulated transactions) |
| Sandbox | `https://sandbox.mx.ntxpay.com` | `sandbox` (simulated transactions) |
| Production | Provided at onboarding | `smartfastpay` |

Sandbox account: `isSandbox: true` in signup.
6 changes: 3 additions & 3 deletions en/guides/sandbox-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The **sandbox** is an isolated environment with simulated transactions. Useful f
1. Create an account with `isSandbox: true` in `POST /api/signup`:

```bash
curl -X POST https://sandbox.ntxpay.com/api/signup \
curl -X POST https://sandbox.mx.ntxpay.com/api/signup \
-H "Content-Type: application/json" \
-d '{
"holderName": "Test",
Expand All @@ -28,7 +28,7 @@ curl -X POST https://sandbox.ntxpay.com/api/signup \
```

2. The created account will have `mainProvider: "sandbox"` (instead of `smartfastpay`)
3. Always use the host `https://sandbox.ntxpay.com` for that account
3. Always use the host `https://sandbox.mx.ntxpay.com` for that account

## Differences vs Production

Expand Down Expand Up @@ -91,7 +91,7 @@ When comfortable:

1. Create a **new account** via `POST /api/signup` on your production host (provided at onboarding) **without** `isSandbox`
2. Only change:
- Host: `sandbox.ntxpay.com` → production host (provided at onboarding)
- Host: `sandbox.mx.ntxpay.com` → production host (provided at onboarding)
- Credentials (`clientId`/`clientSecret`)
- X.509 certificate (production is distinct from sandbox)
3. Reconfigure webhooks on the production account
Expand Down
6 changes: 3 additions & 3 deletions en/guides/signup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ On creation, NTX Pay:
#### Request — Individual (sandbox)

```bash
curl -X POST https://sandbox.ntxpay.com/api/signup \
curl -X POST https://sandbox.mx.ntxpay.com/api/signup \
-H "Content-Type: application/json" \
-d '{
"holderName": "Maria Lopez",
Expand All @@ -40,7 +40,7 @@ curl -X POST https://sandbox.ntxpay.com/api/signup \
#### Request — Legal Entity (production)

```bash
curl -X POST https://sandbox.ntxpay.com/api/signup \
curl -X POST https://sandbox.mx.ntxpay.com/api/signup \
-H "Content-Type: application/json" \
-d '{
"holderName": "Acme S.A. de C.V.",
Expand Down Expand Up @@ -113,7 +113,7 @@ curl -X POST https://sandbox.ntxpay.com/api/signup \
| SPEI confirmation | Immediate (simulated) | Real (seconds to minutes via Banxico) |
| Cost | Free | Tariffs in production |
| Limits | Permissive | Per contract |
| Base endpoint | `https://sandbox.ntxpay.com` | Provided at onboarding |
| Base endpoint | `https://sandbox.mx.ntxpay.com` | Provided at onboarding |

## Common Errors

Expand Down
2 changes: 1 addition & 1 deletion en/guides/spei-cash-in.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Content-Type: application/json
#### Request

```bash
curl -X POST https://sandbox.ntxpay.com/api/spei/cash-in \
curl -X POST https://sandbox.mx.ntxpay.com/api/spei/cash-in \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
Expand Down
4 changes: 2 additions & 2 deletions en/guides/spei-cash-out.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Content-Type: application/json
#### Request

```bash
curl -X POST https://sandbox.ntxpay.com/api/spei/cash-out \
curl -X POST https://sandbox.mx.ntxpay.com/api/spei/cash-out \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
Expand Down Expand Up @@ -105,7 +105,7 @@ if (balance.availableCentavos < amountCentavos) {
async function speiCashOut(token: string, dto: any) {
try {
const { data } = await axios.post(
'https://sandbox.ntxpay.com/api/spei/cash-out',
'https://sandbox.mx.ntxpay.com/api/spei/cash-out',
dto,
{ headers: { Authorization: `Bearer ${token}` } },
);
Expand Down
4 changes: 2 additions & 2 deletions en/guides/transactions-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Authorization: Bearer {token}
#### Request

```bash
curl -X GET "https://sandbox.ntxpay.com/api/transactions?status=CONFIRMED&paymentMethod=SPEI&limit=50" \
curl -X GET "https://sandbox.mx.ntxpay.com/api/transactions?status=CONFIRMED&paymentMethod=SPEI&limit=50" \
-H "Authorization: Bearer $TOKEN"
```

Expand Down Expand Up @@ -75,7 +75,7 @@ let offset = 0;
const limit = 50;

while (true) {
const { data } = await axios.get('https://sandbox.ntxpay.com/api/transactions', {
const { data } = await axios.get('https://sandbox.mx.ntxpay.com/api/transactions', {
headers: { Authorization: `Bearer ${token}` },
params: { limit, offset, status: 'CONFIRMED' },
});
Expand Down
6 changes: 3 additions & 3 deletions en/guides/webhooks/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Webhook configuration goes through three endpoints:
### Request

```bash
curl -X POST https://sandbox.ntxpay.com/api/webhooks-config \
curl -X POST https://sandbox.mx.ntxpay.com/api/webhooks-config \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
Expand Down Expand Up @@ -59,7 +59,7 @@ curl -X POST https://sandbox.ntxpay.com/api/webhooks-config \
## List Webhooks

```bash
curl -X GET https://sandbox.ntxpay.com/api/webhooks-config \
curl -X GET https://sandbox.mx.ntxpay.com/api/webhooks-config \
-H "Authorization: Bearer $TOKEN"
```

Expand All @@ -86,7 +86,7 @@ curl -X GET https://sandbox.ntxpay.com/api/webhooks-config \
## Remove Webhook

```bash
curl -X DELETE https://sandbox.ntxpay.com/api/webhooks-config/42 \
curl -X DELETE https://sandbox.mx.ntxpay.com/api/webhooks-config/42 \
-H "Authorization: Bearer $TOKEN"
```

Expand Down
2 changes: 1 addition & 1 deletion en/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Public gateway for SPEI (instant interbank transfers) integration. Receive and s

| Environment | URL |
|---|---|
| Sandbox | `https://sandbox.ntxpay.com` |
| Sandbox | `https://sandbox.mx.ntxpay.com` |
| Production | Provided at onboarding |

## Authentication
Expand Down
8 changes: 4 additions & 4 deletions en/sandbox/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Sandbox authentication uses the same two layers as production:
Together they return a **JWT** (10-minute validity) used on the remaining endpoints as `Authorization: Bearer ...`.

<Info>
Sandbox credentials are **distinct** from production. If you use production credentials against `https://sandbox.ntxpay.com`, you will get `401`. The HTTP contract is identical — what changes is the certificate + clientId/clientSecret pair.
Sandbox credentials are **distinct** from production. If you use production credentials against `https://sandbox.mx.ntxpay.com`, you will get `401`. The HTTP contract is identical — what changes is the certificate + clientId/clientSecret pair.
</Info>

## Get a Token

### POST /api/auth/token

```bash
curl -X POST https://sandbox.ntxpay.com/api/auth/token \
curl -X POST https://sandbox.mx.ntxpay.com/api/auth/token \
-H "X-SSL-Client-Cert: $ENCODED_CERT" \
-H "Content-Type: application/json" \
-d '{
Expand All @@ -47,7 +47,7 @@ curl -X POST https://sandbox.ntxpay.com/api/auth/token \
On a sandbox account, any authenticated call simulates the full pipeline without moving real money:

```bash
curl -X POST https://sandbox.ntxpay.com/api/spei/cash-out \
curl -X POST https://sandbox.mx.ntxpay.com/api/spei/cash-out \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
Expand Down Expand Up @@ -78,4 +78,4 @@ The token expires in **10 minutes (600s)**. There is no refresh token — get a

## Detailed documentation

For the full step-by-step (certificate encoding, examples in multiple languages, etc.) see [Authentication](/en/guides/authentication) in the main guide — the only difference is the base URL `https://sandbox.ntxpay.com`.
For the full step-by-step (certificate encoding, examples in multiple languages, etc.) see [Authentication](/en/guides/authentication) in the main guide — the only difference is the base URL `https://sandbox.mx.ntxpay.com`.
2 changes: 1 addition & 1 deletion en/sandbox/cash-in.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In sandbox, confirmation is **simulated** ~1 second after CLABE creation (instea
## Example

```bash
curl -X POST https://sandbox.ntxpay.com/api/spei/cash-in \
curl -X POST https://sandbox.mx.ntxpay.com/api/spei/cash-in \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
Expand Down
4 changes: 2 additions & 2 deletions en/sandbox/cash-out.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Your sandbox account needs balance. Run at least one [cash-in](/en/sandbox/cash-
## Example

```bash
curl -X POST https://sandbox.ntxpay.com/api/spei/cash-out \
curl -X POST https://sandbox.mx.ntxpay.com/api/spei/cash-out \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
Expand Down Expand Up @@ -69,7 +69,7 @@ After ~1 second (`success` scenario):
Force specific behaviors via the `X-Sandbox-Scenario` header:

```bash
curl -X POST https://sandbox.ntxpay.com/api/spei/cash-out \
curl -X POST https://sandbox.mx.ntxpay.com/api/spei/cash-out \
-H "Authorization: Bearer $TOKEN" \
-H "X-Sandbox-Scenario: error:insufficient-funds" \
-H "Content-Type: application/json" \
Expand Down
4 changes: 2 additions & 2 deletions en/sandbox/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Your API credentials are **structurally the same** as those you would use in pro

| Environment | URL |
|---|---|
| Sandbox | `https://sandbox.ntxpay.com` |
| Sandbox | `https://sandbox.mx.ntxpay.com` |

All documented routes (`/api/auth/token`, `/api/spei/cash-in`, `/api/spei/cash-out`, `/api/transactions`, `/api/webhooks-config`) are available exactly at this host.

Expand All @@ -36,7 +36,7 @@ Register your `webhookUrl` on the sandbox account exactly as you would in produc

| Aspect | Sandbox | Production |
|---|---|---|
| Base URL | `https://sandbox.ntxpay.com` | Provided at onboarding |
| Base URL | `https://sandbox.mx.ntxpay.com` | Provided at onboarding |
| Provider | `sandbox` (simulated) | Real bank (Banxico/SPEI) |
| Balance | Simulated | Real funds |
| SPEI cash-in confirmation | Immediate (~1s) | Real (seconds to minutes) |
Expand Down
2 changes: 1 addition & 1 deletion en/sandbox/scenarios.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mode: 'wide'
Add the header `X-Sandbox-Scenario: <scenario>` to any cash-in or cash-out call. Without the header, the sandbox uses the `success` scenario by default.

```bash
curl -X POST https://sandbox.ntxpay.com/api/spei/cash-out \
curl -X POST https://sandbox.mx.ntxpay.com/api/spei/cash-out \
-H "Authorization: Bearer $TOKEN" \
-H "X-Sandbox-Scenario: error:insufficient-funds" \
-H "Content-Type: application/json" \
Expand Down
Loading
Loading