API Nonce
t is necessary to first consume API de Seguridad in order to obtain the Access Token.
This service is responsible for generating a unique “Nonce” code, which is used to invoke Pay-me Flex.
REQUEST
Path
Method: POST
Environment | URL |
|---|---|
Pre-Production | |
Production |
Headers
Field | Description | Accepted Value | Type | Required |
|---|---|---|---|---|
| API version to be used | Alphanumeric string::
|
| SI |
| Access Token received from the Security API API de Seguridad | Bearer <Access Token> |
| SI |
"Content-Type":"application/json",
"ALG-API-VERSION":"1709847567",
"Authorization":"Bearer eyJhbGciOiJSUzI1NsInR5cCI6IkpXVCIsImt.........",
Body
Field | Description | Accepted Value | Type | Required |
|---|---|---|---|---|
| Action to execute |
|
| SI |
| Base API URL to be used | Pre-producción: Producción: |
| SI |
| Client identification |
|
| SI |
| Permissions to request |
|
| SI |
{
"action":"create.nonce",
"audience": "https://api.preprod.alignet.io/",
"client_id": "WDqE4tFbhvzm5XJnnTYcPUNQGQMTg8P4",
"scope": "post:charges"
}
RESPONSE
Field | Description | Accepted Value | Type | Required |
|---|---|---|---|---|
| Action to execute |
|
| YES |
| Indicates whether the process was completed successfully | Alphanumeric string:
|
| YES |
| Token to be used in the APIs | Alphanumeric string |
| NO |
| Permissions to request |
|
| NO |
| Token expiration time in seconds | Numeric string |
| NO |
| Object containing metadata of the executed flow |
|
| YES |
| Object containing metadata of the executed flow |
|
| YES |
| Object containing the result of the executed flow |
|
| YES |
| Code representing the result of the executed flow | Numeric string |
| YES |
| Object containing the resulting message of the flow |
|
| YES |
| Language locale for the message of the executed flow | Alphanumeric string |
| YES |
| Resulting message of the executed flow | Alphanumeric string |
| YES |
{
"action": "create.nonce",
"success": true,
"nonce": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJBbGlnbmV0IEpXVCBCdWlsZGVyIiwiaWF0IjoxNzExNDg4ODM4LCJleHAiOjE3MTE0ODg4NjgsImF1ZCI6Imh0dHBzOi8vYXBpLmRldi5hbGlnbmV0LmlvIiwic3ViIjoiejhXd0FWN3JkMmpDVTBTaXZ3dFFWdjk0MWtxWmNFb3UiLCJub25jZSI6IjczYTc4Y2NkLTU4ZTItNDkxYy05ODZiLTc1Y2JkZDdkYzFmNyIsInNjb3BlIjoiY3JlYXRlOnRva2VuIHBvc3Q6Y2hhcmdlcyB0ZXN0IiwiZ3R5IjoiY2xpZW50X2NyZWRlbnRpYWxzIn0.hpElWtLZuvQLYxpZdupP0Sd42yHLAU23XFI-9TYx9mY",
"scope": "post:charges",
"expires_in": 30,
"nonce_creation": {
"meta": {
"status": {
"code": "00",
"message_ilgn": [
{
"locale": "es_PE",
"value": "C\u00f3digo Nonce creado"
}
]
}
}
}
}