Overview
The NTX Pay Mexico API uses two-layer authentication:- Certificate — delivered by NTX Pay during onboarding, proves the identity of the client server.
- OAuth 2.0 client_credentials —
clientId+clientSecretprovided during onboarding, validated together with the certificate.
Authorization: Bearer ....
Authentication in the sandbox is identical — what changes is the certificate +
clientId/clientSecret pair, which is distinct from production. Production credentials against https://sandbox.mx.ntxpay.com return 401.Endpoint
POST /api/auth/token
Required Headers
X-SSL-Client-Cert header is typically injected by NGINX/ALB with the URL-encoded certificate:
Request
Response (201)
Using the Token
Include theaccess_token in every authenticated request:
Renewal
The token expires in 10 minutes (600s). Repeat step 1 before it expires — there is no refresh token.Common Errors
Code Examples
Next Steps
Balance Query
Apply the Bearer token and query the account balance
SPEI Cash-In
Create your first SPEI charge