π OAuth 2.0 mTLS β Token API #
Gateway Path: /connect/mtls/token
Host (test): https://auth-test.10npay.com
Service: Identity / Authorization Server
Method: POST
Auth: Mutual-TLS (mTLS) using a client X.509 certificate + form params
1) π Overview & Purpose #
Issues an OAuth 2.0 access token for server-to-server calls using mutual TLS.
After a commercial agreement, a client certificate is generated and bound to your OAuth client. You can then request tokens using the Merchant Portalβs pre-generated cURL command (downloadable there), or by integrating programmatically.
π The private key stays with the client. 10nPayments does not know or store your private key.
2) π Endpoint Definition #
HTTP: POST https://auth-test.10npay.com/connect/mtls/token
Content-Type: application/x-www-form-urlencoded
Required TLS #
-
Present the client certificate during the TLS handshake (mTLS).
-
The certificate must match the client registered in the Authorization Server.
Form Fields #
Field | Type | Required | Notes |
---|---|---|---|
client_id |
string | β | OAuth client identifier assigned to you. |
grant_type |
string | β | Typically client_credentials for mTLS service-to-service. (If your tenant is explicitly configured for password grant, set password and include username & password fields.) |
scope |
string | β | Space-separated scopes (e.g., Tenn.CRM IdentityServerApi Tenn.RiskService Tenn.FileStorage ). |
IdentityServer:MTLS:X509Certificate |
string | β | Thumbprint of the presented client cert (uppercase hex, no spaces). |
username |
string | β | Only when grant_type=password . |
password |
string | β | Only when grant_type=password . |
βΉοΈ Some client profiles may also require Basic auth:
Authorization: Basic base64(client_id:client_secret)
. If your Merchant Portal cURL includes-u client:secret
, keep it. If not, mTLS + form fields are sufficient.
3) π‘ Responses #
β 3.1 Success β 200 OK #
-
access_token β Bearer token for subsequent API calls.
-
expires_in β Lifetime in seconds.
-
token_type β Always
Bearer
. -
scope β Granted scopes (space-separated).
β 3.2 Error (examples) #
Other possible errors: invalid_client
, invalid_request
, unauthorized_client
.
HTTP status codes reflect the failure (e.g., 400/401/403).
4) π‘ Security & Operational Notes #
-
Certificate lifecycle: The client certificate is issued once after agreement and bound to your OAuth client. Rotate only through official channels.
-
Merchant Portal: Provides a ready-to-use cURL template that includes all required fields and, when applicable, Basic auth.
-
Form encoding: Use
application/x-www-form-urlencoded
; do not collapse theIdentityServer:MTLS:X509Certificate
key with its valueβsend it askey=value
. -
Storage: Keep tokens securely; never log secrets or long-lived tokens.
-
Scopes: Request only the scopes you need. Excess scopes may be rejected.
5) π» Examples #
5.1 cURL (mTLS + client_credentials) #
If your Merchant Portal export includes Basic auth, add:
-u <client_id>:<client_secret>
and omitclient_id
from the body if instructed.