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: 1618440906

Yes

Authorization

Bearer <Access_Token>

Yes

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

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

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

Response

Parameter

Description

action

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

success

Result of the operation:

true: Processed successfully.

false: Not processed successfully.

nonce

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

scope

Permits enabled for Nonce.

expires_in

Nonce life time in seconds.

nonce_creation.meta.status.code

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

00: In case of success

01: In case of error

nonce_creation.meta.status.message_ilgn.locale

Configuration of the language used for the status code message.

nonce_creation.meta.status.message_ilgn.value

Message resulting from the process.

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

Continue to API User Info Access Token ➡️