API Reference

Certificates

In this article, you'll learn how to configure certificates to guarantee authentication in your API requests.

How to configure certificates and generate tokens in Postman

This tutorial will guide you through the process of setting up certificates in Postman and generating tokens to access the cashin and cashout API routes. Follow the steps below to complete the configuration.

Prerequisites

  1. Have the Postman software installed on your machine.
  2. Have the certificates generated by Voluti at hand.
  3. Have the credentials: client_id and client_secret, which are generated in Finance.

Step 1: Adding a certificate using the Postman tool

  1. Open Postman and go to Settings.

    • Click on the gear icon in the top right-hand corner.
    • Select Certificates from the side menu.
  2. Add Certificate:

    • Click on Add Certificate.
    • On the screen that appears, fill in the fields as described below:
      • Host: https://api.pix.voluti.com.br
      • PFX file: Select the PFX file of the cashin you have.
      • Passphrase: If the PFX file requires a password, enter it here.
Adicionar certificado no Postman.

Step 2: Generate access token

  1. Create a new request in Postman.

    • Click on New and select Request.
    • Name your request and save it in a suitable collection.
  2. Configure the request to generate the token:

    • HTTP method: POST
    • URL: https://api.pix.voluti.com.br/oauth/token
    • Headers:
      • Content-Type: application/json
    • Body: Select the raw option and enter the following JSON:

     {
       "client_id": "your_client_id",
       "client_secret": "your_client_secret",
       "scope": "optional" // Add if you need to restrict token access to certain routes
     }
{
       "client_id": "your_client_id",
       "client_secret": "your_client_secret",
       "scope": "pix.read" //Optional
     }

Table with access levels by scope field

RecursosLeitura do escopoEscrita escopoUtilização acessível
Pixpix.readpix.writeBusiness token
Webhookswebhook.readwebhook.writeBusiness token
Transaçõestransactions.readBusiness token
Contaaccount.readBusiness token

Note

The client_id and client_secret fields must be filled in with the credentials generated in Finance. The scope field is optional and should only be used if you want to restrict token access to certain specific API routes.

  1. Send the request:
    • Click Send to send the request and generate the token.
    • The token will be returned in the access_token field of the response.

Envio de requisição.


Note:
Token can be sent as urlencoded.

Step 3: Access the Cash In routes

  1. Create a new request in Postman.

    • Name your request and save it in a suitable collection.
  2. Configure the request to access the desired route:

    • HTTP method: According to the route you want to access (GET, POST, etc.).
    • URL: Enter the URL of the Cash In route you want to access.
    • Headers:
      • Authorization: Bearer token_generated
    • Body: Configure the body of the request as required by the route.

Step 4: Configure certificate for Cash Out

  1. Add certificate:
    • Go again to Settings > Certificates.
    • Click on Add Certificate.
    • On the screen that appears, fill in the fields as described below:
      • Host: https://accounts.voluti.com.br
      • PFX file**: Select the PFX file of the Cash Out you have.
      • Passphrase: If the PFX file requires a password, enter it here.

Step 5: Generate token and Access Cash Out routes

  1. Repeat Steps 2 and 3:
    Follow the same steps to generate the token and access the Cash Out routes, using the URL https://accounts.voluti.com.br/api/v2 to generate the token and to configure the requests.