Skip to main content
Skip table of contents

API Nonce

This API has the function of generating a unique code "Nonce" which is used to invoke the Flex Form.

Environment

EndPoint

Method

Development

https://auth.wip.alignet.io/nonce

POST

Pre-Production

https://auth.pp.alignet.io/nonce

POST

Production

https://auth.alignet.io/nonce

POST

Headers

Header

Value

Required

Content-Type

application/json

Yes

ALG-API-VERSION

API version to be used. Available values: 1.0.1

Yes

Authorization

Bearer <Access_Token>

Yes

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

Request

Parameter

Type

Long.

Description

Req.

action

String

-

The intent of the merchant. In this case it is "create.nonce".

Yes

client_id

String

(AN)

100

ID assigned to the merchant.

Value provided by Pay-me.

Yes

audience

String

-

Unique identifier of the APIs Tokens and Charges to which access is requested. Available values:

https://api.dev.alignet.io

https://api.alignet.io

Yes

username

String

(AN)

100

User of the merchant requesting access.

Value provided by Pay-me.

No

scope

String

-

List of permissions you want to have with the Access Token. Values must be separated by space. Available values:

create:token

post:charges

delete:charges

Yes

JSON
{
  "action":"create.nonce",
  "username": "commerce@email.com",
  "audience": "https://api.dev.alignet.io",
  "client_id": "yhaPE3jtHXHMKUZBBFr9QS1x1FaXxr",
  "scope": "create:token post:charges"
}

Response

Parameter

Tipo

Long.

Description

Req.

action

String

50

Process performed, in this case it is "create.nonce".

Si

success

Boolean

-

Result of the operation:

true: Processed successfully.

false: Not processed successfully.

Si

nonce

String

512

Nonce that can only be used once to invoke the Form.

No

scope

String

512

Permits enabled for Nonce.

No

expires_in

Integer

-

Nonce life time in seconds.

No

nonce_creation.meta.status.code

String

512

Code associated with the status of the operation. Available values:

00: In case of success

01: In case of error

Si

nonce_creation.meta.status.message_ilgn.locale

String

512

Configuration of the language used for the status code message.

Si

nonce_creation.meta.status.message_ilgn.value

String

512

Message resulting from the process.

Si

JSON
{
   "action":"create.nonce",
   "success":true,
   "nonce ":"eyJhbGciOiJSUzI1NsInR5cCI6IkpXVCIsImtpZCI6IlVfR2ZLY.........",
   "scope":"create:token post:charges",
   "expires_in":30,
   "nonce_creation":{
      "meta":{
         "status":{
            "code":"00",
            "message_ilgn":[
               {
                  "locale":"es_PE",
                  "value":"Codigo Nonce creado"
               }
            ]
         }
      }
   }
}

Continue to API User Info Access Token ➡️

JavaScript errors detected

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

If this problem persists, please contact our support.