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.
POST /auth/login
Use your credentials to obtain the API access token.
base_url
Initial value set to https://api.iopay.com.br/api.
Import
- Download the JSON file from this page.
- In Postman, use Import and select the collection.
- Set
auth_email,auth_secretandio_seller_id. - Run the authentication request. The
access_tokenwill be saved automatically iniopay_token. - Create a customer. The returned ID will be saved automatically in
customer_id. - Run the PIX request using the customer you created.
Variables
| Variable | Initial value | Use |
|---|---|---|
base_url | https://api.iopay.com.br/api | Base for calls. |
auth_email | Defined by you | E-mail used for authentication. |
auth_secret | Defined by you | Secret used for authentication. |
io_seller_id | Defined by you | Seller identifier used in the integration. |
iopay_token | Returned by the API | Access token used as Bearer. |
customer_id | Returned by the API | ID of the created customer, saved automatically by the collection. |
Authentication
Before running authenticated operations, send your credentials to obtain the access token.
{
"email": "{{auth_email}}",
"secret": "{{auth_secret}}",
"io_seller_id": "{{io_seller_id}}"
}Response
{
"access_token": "<ACCESS_TOKEN>",
"token_type": "bearer",
"token_scope": "transaction",
"expires_in": 3600
}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.
{
"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"
}
}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.
{
"amount": 24990,
"currency": "BRL",
"description": "Order #84217",
"statement_descriptor": "IOPAY STORE",
"io_seller_id": "{{io_seller_id}}",
"payment_type": "pix",
"reference_id": "pedido_84217"
}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_tokenexpires. - Add requests per resource as the integration evolves.
- Include automated tests for status and essential fields.
- Document your own marketplace, seller and Split variables.

