Skip to main content

/payment/api/v1

tip

Before continuing, you'll need to be familiar with the following sections:

The following map shows the available endpoints to implement the basic operational processes of a business.

API Map

All calls have a common input and output format. The request signature must be sent in the Content-Signature header.

Before defining the specific calls for the business operations, we include the "Common Elements" section to establish the foundation for all requests.


Common Elements​

Input Format​

All requests will have a common structure and specific parameters. The format is as follows:

Body​

  • key (string): Identifier of the requester.
  • resource (string): Resource identifier.
  • mode (enum[string]): Signature algorithm.
    • sha256
    • sha512
  • nonce (string): Unique identifier for the request, used to control data duplication.
  • payload (object): Contains the specific parameters for each request.

Headers​

  • Content-Signature: Contains the signature of the request body (Body) with the private key. HMAC(body, secret, mode)
  • Content-Type: It is important to note that the API will only process requests with the content type application/json.

Example​

{
"key": "589365da65c48cff87d0874a",
"nonce": "1234567890",
"mode": "sha256",
"resource": "359ef8ce5c5f4003b71692e446908c27",
"payload": {
"param1": "value1",
"param2": "value2"
}
}

Output Format​

All responses will have a common structure and specific parameters. The format is as follows:

Body​

  • type (string): Type of response:
  • code (string): Identifier code of the result. It is a guiding code and is not strictly linked to the reason for the response, meaning that the code does not unequivocally identify the response.
    • Code = 0 --> success
    • Code > 0 --> warning
    • Code < 0 --> error
  • detail (string): Literal description of the response message.
  • uuid (string): Unique identifier of the request, essential for traceability.
  • request_id (string): Necessary for completing some operations. Those requiring it will be indicated.
  • payload (object): Response parameters.

Headers​

  • Content-Signature: The signature of the response body with the secret key. HMAC(body, secret, mode).

Example​

{
"type": "resource.status",
"code": "0",
"detail": "Successful payment request.",
"payload": {
"param1": "value1",
"param2": "value2"
},
"request_id": "6268ee6d5dff38d7bc33dd37",
"uuid": "6268ee6d5dff38d7bc33dd37"
}