Development tools

Postman Starter

Starter collection to set up your credentials, authenticate with IOPAY and run the first requests of the integration.

FormatPostman Collection v2.1
AuthBearer
IncludesLogin · Customer · PIX

Overview

The collection organizes the credentials needed to authenticate with IOPAY, obtain an access_token and use it as a Bearer token in the following calls.

Authentication

POST /auth/login

Use your credentials to obtain the API access token.

Base endpoint

base_url

Initial value set to https://api.iopay.com.br/api.

Import

  1. Download the JSON file from this page.
  2. In Postman, use Import and select the collection.
  3. Set auth_email, auth_secret and io_seller_id.
  4. Run the authentication request. The access_token will be saved automatically in iopay_token.
  5. Create a customer. The returned ID will be saved automatically in customer_id.
  6. Run the PIX request using the customer you created.

Variables

VariableInitial valueUse
base_urlhttps://api.iopay.com.br/apiBase for calls.
auth_emailDefined by youE-mail used for authentication.
auth_secretDefined by youSecret used for authentication.
io_seller_idDefined by youSeller identifier used in the integration.
iopay_tokenReturned by the APIAccess token used as Bearer.
customer_idReturned by the APIID of the created customer, saved automatically by the collection.

Authentication

Before running authenticated operations, send your credentials to obtain the access token.

POST {{base_url}}/auth/login
{
  "email": "{{auth_email}}",
  "secret": "{{auth_secret}}",
  "io_seller_id": "{{io_seller_id}}"
}

Response

Access token
{
  "access_token": "<ACCESS_TOKEN>",
  "token_type": "bearer",
  "token_scope": "transaction",
  "expires_in": 3600
}
Bearer Token. Use the access_token value as Authorization: Bearer your_token in the following calls.

Create customer

With the token set, create a customer to use in transactions. The collection automatically saves the returned identifier in customer_id.

POST {{base_url}}/v1/customer/new
{
  "first_name": "Maria",
  "last_name": "Oliveira",
  "customer_type": "person_natural",
  "email": "[email protected]",
  "taxpayer_id": "12345678909",
  "phone_number": "+5511999999999",
  "address": {
    "line1": "Av. Paulista, 1000",
    "line2": "Apto 101",
    "neighborhood": "Bela Vista",
    "city": "São Paulo",
    "state": "SP",
    "postal_code": "01310100",
    "country_code": "BR"
  }
}
Automatic. After creation, the collection saves success.id in customer_id to reuse it in the next requests.

PIX example

With the token set, you can now run a PIX transaction using an existing customer.

POST {{base_url}}/v1/transaction/new/{{customer_id}}
{
  "amount": 24990,
  "currency": "BRL",
  "description": "Order #84217",
  "statement_descriptor": "IOPAY STORE",
  "io_seller_id": "{{io_seller_id}}",
  "payment_type": "pix",
  "reference_id": "pedido_84217"
}
Monetary values. The amount field must be sent in cents. For example, 24990 represents R$ 249.90.

Recommended use

  • Keep real credentials and tokens out of versioned files.
  • Obtain a new token when the access_token expires.
  • Add requests per resource as the integration evolves.
  • Include automated tests for status and essential fields.
  • Document your own marketplace, seller and Split variables.