Skip to main content
Skip table of contents

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

Headers

Field

Description

Accepted Value

Type

Required

ALG-API-VERSION

API version to be used

Alphanumeric string::

  • 1709847567

String

SI

Authorization

Access Token received from the Security API API de Seguridad

Bearer <Access Token>

String

SI

JSON
"Content-Type":"application/json",
"ALG-API-VERSION":"1709847567",
"Authorization":"Bearer eyJhbGciOiJSUzI1NsInR5cCI6IkpXVCIsImt.........",

Body

Field

Description

Accepted Value

Type

Required

action

Action to execute

  • create.nonce

String

SI

audience

Base API URL to be used

Pre-producción: https://api.preprod.alignet.io/

Producción: https://api.alignet.io/

String

SI

client_id

Client identification

 

String

SI

scope

Permissions to request

  • post:charges

String

SI

JSON
{
  "action":"create.nonce",
  "audience": "https://api.preprod.alignet.io/",
  "client_id": "WDqE4tFbhvzm5XJnnTYcPUNQGQMTg8P4",
  "scope": "post:charges"
}

RESPONSE

Field

Description

Accepted Value

Type

Required

action

Action to execute

  • authorize

String

YES

success

Indicates whether the process was completed successfully

Alphanumeric string:

  • true

  • false

String

YES

nonce

Token to be used in the APIs

Alphanumeric string

String

NO

scope

Permissions to request

  • post:charges

String

NO

expires_in

Token expiration time in seconds

Numeric string

String

NO

nonce_creation

Object containing metadata of the executed flow

 

Object

YES

nonce_creation.meta

Object containing metadata of the executed flow

 

Object

YES

nonce_creation.meta.status

Object containing the result of the executed flow

 

Object

YES

nonce_creation.meta.status.code

Code representing the result of the executed flow

Numeric string

String

YES

nonce_creation.meta.status.message_ilgn

Object containing the resulting message of the flow

 

Object

YES

nonce_creation.meta.status.message_ilgn.[].locale

Language locale for the message of the executed flow

Alphanumeric string

String

YES

nonce_creation.meta.status.message_ilgn.[].value

Resulting message of the executed flow

Alphanumeric string

String

YES

JSON
{
    "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"
                    }
                ]
            }
        }
    }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.