OpenPix (1.0.0)
Download OpenAPI specification:Download
A OpenPix é uma Plataforma de Gestão de Pagamentos. Para utilizar nossa API você deve acessar https://api.openpix.com.br/ e somente o mesmo. A OpenPix não aceita subdominios para a API.
Veja como configurar seu acesso a nossa API aqui.
Get an Account
Authorizations:
path Parameters
| accountId required  | string   Example:  6290ccfd42831958a405debc ID of the Account  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/account/6290ccfd42831958a405debc", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "account": {
- "accountId": "6290ccfd42831958a405debc",
 - "isDefault": true,
 - "balance": {
- "total": 129430,
 - "blocked": 0,
 - "available": 129430
 
} 
} 
}Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/account/", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "accounts": [
- {
- "accountId": "6290ccfd42831958a405debc",
 - "isDefault": true,
 - "balance": {
- "total": 129430,
 - "blocked": 0,
 - "available": 129430
 
} 
}, - {
- "accountId": "6286b467a7910113577e00ce",
 - "isDefault": false,
 - "balance": {
- "total": 130,
 - "blocked": 100,
 - "available": 30
 
} 
} 
] 
}Withdraw from an Account
An additional fee may be charged depending on the minimum free withdrawal amount. See more about at https://developers.openpix.com.br/docs/FAQ/faq-virtual-account/#onde-posso-consultar-as-taxas-da-minha-conta-virtual
Authorizations:
path Parameters
| accountId required  | string   Example:  6290ccfd42831958a405debc ID of the Account  | 
Request Body schema: application/json
| value | number  Value in cents  | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "value": 7000
 
}Response samples
- 200
 - 400
 
{- "withdraw": {
- "account": {
- "accountId": "6290ccfd42831958a405debc",
 - "isDefault": true,
 - "balance": {
- "total": 122430,
 - "blocked": 0,
 - "available": 122430
 
} 
}, - "transaction": {
- "endToEndId": "E23114447202205191817cx6VMrbwtw6",
 - "transaction": 7000
 
} 
} 
}Get the exclusive cashback amount an user still has to receive by taxID.
Authorizations:
path Parameters
| taxID required  | string   Examples: 
 The raw tax ID from the customer you want to get the balance.  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/cashback-fidelity/balance/%7BtaxID%7D", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "balance": 0,
 - "status": "string"
 
}Get or create cashback for a customer.
Create a new cashback exclusive for the customer with a given taxID. If the customer already has a pending excluisve cashback, this endpoint will return it instead.
Authorizations:
Request Body schema: application/json
Customer's taxID and the cash
| taxID | string  Customer taxID (CPF or CNPJ)  | 
| value | number  Cashback value in centavos  | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "value": 100,
 - "taxID": 11111111111
 
}Response samples
- 200
 - 201
 - 400
 
{- "cashback": {
- "value": 0
 
}, - "message": "string"
 
}Delete a charge
Authorizations:
path Parameters
| id required  | string   Examples: 
 charge ID or correlation ID. You will need URI encoding if your correlation ID has characters outside the ASCII set or reserved characters (%, #, /).  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "DELETE", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/charge/%7Bid%7D", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "status": "OK",
 - "id": "fe7834b4060c488a9b0f89811be5f5cf"
 
}Get one charge
Authorizations:
path Parameters
| id required  | string   Example:  fe7834b4060c488a9b0f89811be5f5cf charge ID or correlation ID. You will need URI encoding if your correlation ID has characters outside the ASCII set or reserved characters (%, #, /).  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "charge": {
- "status": "ACTIVE",
 - "customer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
} 
}, - "value": 100,
 - "comment": "good",
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "paymentLinkID": "7777-6f71-427a-bf00-241681624586",
 - "globalID": "Q2hhcmdlOjcxOTFmMWIwMjA0NmJmNWY1M2RjZmEwYg==",
 - "brCode": "000201010212261060014br.gov.bcb.pix2584https://api.openpix.com.br/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao Paulo62360532867ba5173c734202ac659721306b38c963044BCA",
 - "additionalInfo": [
- {
- "key": "Product",
 - "value": "Pencil"
 
}, - {
- "key": "Invoice",
 - "value": "18476"
 
}, - {
- "key": "Order",
 - "value": "302"
 
} 
], - "expiresIn": 2592000,
 - "expiresDate": "2021-04-01T17:28:51.882Z",
 - "createdAt": "2021-03-02T17:28:51.882Z",
 - "updatedAt": "2021-03-02T17:28:51.882Z"
 
} 
}Get a list of charges
Authorizations:
query Parameters
| start | string <date-time>  (Start Date)    Example:  start=2020-01-01T00:00:00Z Start date used in the query. Complies with RFC 3339.  | 
| end | string <date-time>  (End Date)    Example:  end=2020-12-01T17:00:00Z End date used in the query. Complies with RFC 3339.  | 
| status | string  Enum: "ACTIVE" "COMPLETED" "EXPIRED"    | 
| customer | string  Customer Correlation ID  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/charge?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&status=SOME_STRING_VALUE&customer=SOME_STRING_VALUE", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "pageInfo": {
- "skip": 0,
 - "limit": 10,
 - "totalCount": 20,
 - "hasPreviousPage": false,
 - "hasNextPage": true
 
}, - "charges": {
- "status": "ACTIVE",
 - "customer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
} 
}, - "value": 100,
 - "comment": "good",
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "paymentLinkID": "7777a23s-6f71-427a-bf00-241681624586",
 - "brCode": "000201010212261060014br.gov.bcb.pix2584https://api.openpix.com.br/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao Paulo62360532867ba5173c734202ac659721306b38c963044BCA",
 - "additionalInfo": [
- {
- "key": "Product",
 - "value": "Pencil"
 
}, - {
- "key": "Invoice",
 - "value": "18476"
 
}, - {
- "key": "Order",
 - "value": "302"
 
} 
], - "expiresIn": 2592000,
 - "expiresDate": "2021-04-01T17:28:51.882Z",
 - "createdAt": "2021-03-02T17:28:51.882Z",
 - "updatedAt": "2021-03-02T17:28:51.882Z"
 
} 
}Create a new Charge
Endpoint to create a new Charge for a customer
Authorizations:
query Parameters
| return_existing | boolean   Examples: 
 Make the endpoint idempotent, will return an existent charge if already has a one with the correlationID  | 
Request Body schema: application/json
Data to create a new charge
| correlationID required  | string  Your correlation ID to keep track of this charge  | 
| value required  | number  Value in cents of this charge  | 
| type | string  Enum: "DYNAMIC" "OVERDUE"   Charge type is used to determine whether a charge will have a deadline, fines and interests  | 
| comment | string  Comment to be added in infoPagador  | 
| identifier | string  Custom identifier for EMV  | 
| expiresIn | number  Expires the charge in seconds (minimum is 15 minutes)  | 
object or object or object (CustomerPayload)   Customer field is not required. However, if you decide to send it, you must send at least one of the following combinations, name + taxID or name + email or name + phone.  | |
| daysForDueDate | number  Time in days until the charge hits the deadline so fines and interests start applying. This property is only considered for charges of type OVERDUE  | 
| daysAfterDueDate | number  Time in days that a charge is still payable after the deadline. This property is only considered for charges of type OVERDUE  | 
object  Interests configuration. This property is only considered for charges of type OVERDUE  | |
object  Fines configuration. This property is only considered for charges of type OVERDUE  | |
Array of objects  Additional info of the charge  | |
| enableCashbackPercentage | boolean  true to enable cashback and false to disable.  | 
| enableCashbackExclusivePercentage | boolean  true to enable fidelity cashback and false to disable.  | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "correlationID": "9134e286-6f71-427a-bf00-241681624587",
 - "value": 100,
 - "comment": "good",
 - "customer": {
- "name": "Dan",
 - "taxID": "31324227036",
 - "email": "email0@example.com",
 - "phone": "5511999999999"
 
}, - "additionalInfo": [
- {
- "key": "Product",
 - "value": "Pencil"
 
}, - {
- "key": "Invoice",
 - "value": "18476"
 
}, - {
- "key": "Order",
 - "value": "302"
 
} 
] 
}Response samples
- 200
 - 400
 
{- "charge": {
- "status": "ACTIVE",
 - "customer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
} 
}, - "value": 100,
 - "comment": "good",
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "paymentLinkID": "7777a23s-6f71-427a-bf00-241681624586",
 - "expiresIn": 2592000,
 - "expiresDate": "2021-04-01T17:28:51.882Z",
 - "createdAt": "2021-03-02T17:28:51.882Z",
 - "updatedAt": "2021-03-02T17:28:51.882Z",
 - "brCode": "000201010212261060014br.gov.bcb.pix2584https://api.openpix.com.br/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao Paulo62360532867ba5173c734202ac659721306b38c963044BCA",
 - "additionalInfo": [
- {
- "key": "Product",
 - "value": "Pencil"
 
}, - {
- "key": "Invoice",
 - "value": "18476"
 
}, - {
- "key": "Order",
 - "value": "302"
 
} 
] 
} 
}Get an image of Qr Code from a Charge
Authorizations:
path Parameters
| id required  | string   Examples: 
 charge link payment ID  | 
query Parameters
| size | string   Examples: 
 Size for the image. This size should be between 600 and 4096. if the size parameter was not passed, the default value will be 1024.  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/openpix/charge/brcode/image/%7B:id%7D.png?size=1024", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 400
 
{- "error": "string"
 
}Get all refunds of a charge
Endpoint to get all refunds of a charge
Authorizations:
path Parameters
| id required  | string   Examples: 
 The correlation ID of the charge. You will need URI encoding if your correlation ID has characters outside the ASCII set or reserved characters (%, #, /).  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/charge/%7Bid%7D/refund", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "refunds": [
- {
- "status": "IN_PROCESSING",
 - "value": 10,
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "endToEndId": "E23114447202304181826HJNwY577YDX",
 - "time": "2021-03-02T17:28:51.882Z"
 
}, - {
- "status": "CONFIRMED",
 - "value": 40,
 - "correlationID": "589a378e-ab45-4f30-bd4d-4496c60f88cf",
 - "endToEndId": "E23114447202304181057pOhPMsp2pJZ",
 - "time": "2021-03-05T14:49:02.922Z",
 - "comment": "Comentário do reembolso"
 
} 
] 
}Create a new refund for a charge
Endpoint to create a new refund for a charge
Authorizations:
path Parameters
| id required  | string   Examples: 
 The correlation ID of the charge. You will need URI encoding if your correlation ID has characters outside the ASCII set or reserved characters (%, #, /).  | 
Request Body schema: application/json
Data to create a new refund for a charge
| correlationID required  | string  Your correlation ID to keep track for this refund  | 
| value | number  Value in cents for this refund  | 
| comment | string  <= 140   Comment for this refund. Maximum length of 140 characters.  | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "correlationID": "a273e72c-9547-4c75-a213-3b0a2735b8d5",
 - "value": 100,
 - "comment": "Comentário do reembolso"
 
}Response samples
- 200
 - 400
 
{- "refund": {
- "status": "IN_PROCESSING",
 - "value": 100,
 - "correlationID": "a273e72c-9547-4c75-a213-3b0a2735b8d5",
 - "endToEndId": "E23114447202304181826HJNwY577YDX",
 - "time": "2023-03-02T17:28:51.882Z",
 - "comment": "Comentário do reembolso"
 
} 
}Get one customer
Authorizations:
path Parameters
| id required  | string   Examples: 
 correlation ID  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/customer/%7Bid%7D", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "customer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
}, - "correlationID": "fe7834b4060c488a9b0f89811be5f5cf"
 
} 
}Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/customer", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "pageInfo": {
- "skip": 0,
 - "limit": 10,
 - "totalCount": 20,
 - "hasPreviousPage": false,
 - "hasNextPage": true
 
}, - "customers": {
- "customer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
} 
} 
} 
}Create a new Customer
Endpoint to create a new Customer
Authorizations:
Request Body schema: application/json
Data to create a new customer
| name required  | string   | 
string   | |
| phone | string   | 
| taxID required  | string   | 
| correlationID | string   | 
object   | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "name": "Dan",
 - "taxID": "31324227036",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "address": {
- "zipcode": "30421322",
 - "street": "Street",
 - "number": "100",
 - "neighborhood": "Neighborhood",
 - "city": "Belo Horizonte",
 - "state": "MG",
 - "complement": "APTO",
 - "country": "BR"
 
} 
}Response samples
- 200
 - 400
 
{- "customer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
}, - "address": {
- "zipcode": "30421322",
 - "street": "Street",
 - "number": "100",
 - "neighborhood": "Neighborhood",
 - "city": "Belo Horizonte",
 - "state": "MG",
 - "complement": "APTO",
 - "country": "BR"
 
} 
} 
}Partners integrate affiliated companies.
They can register new companies, manage them, and earn money from them.
Create a new application to some of your preregistration's company.
As a partner company, you can create a new application to some of your companies. The application should give access to our API to this companies, so they can use it too.
Authorizations:
Request Body schema: application/json
The request body to create a pre registration.
object   | |
object (TaxIDObjectPayload)    | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "application": {
- "name": "MyAPIAccess",
 - "type": "API"
 
}, - "taxID": {
- "taxID": "65914571000187",
 - "type": "BR:CNPJ"
 
} 
}Response samples
- 200
 - 201
 - 400
 - 403
 
{- "application": {
- "name": "string",
 - "isActive": true,
 - "type": "API",
 - "clientId": "string",
 - "clientSecret": "string"
 
} 
}Get an specific preregistration via taxID param.
Authorizations:
path Parameters
| taxID required  | string   Examples: 
 The raw tax ID from the preregistration that you want to get.  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/partner/company/%7BtaxID%7D", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "preRegistration": {
- "preRegistration": {
- "name": "string",
 - "taxID": {
- "taxID": "string",
 - "type": "BR:CNPJ"
 
} 
}, - "user": {
- "firstName": "string",
 - "lastName": "string",
 - "email": "string",
 - "phone": "string"
 
}, - "company": {
- "id": "string",
 - "name": "string",
 - "taxID": {
- "taxID": "string",
 - "type": "BR:CNPJ"
 
} 
}, - "account": {
- "clientId": "string"
 
} 
} 
}Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/partner/company", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "preRegistrations": [
- {
- "preRegistration": {
- "name": "string",
 - "taxID": {
- "taxID": "string",
 - "type": "BR:CNPJ"
 
} 
}, - "user": {
- "firstName": "string",
 - "lastName": "string",
 - "email": "string",
 - "phone": "string"
 
}, - "company": {
- "id": "string",
 - "name": "string",
 - "taxID": {
- "taxID": "string",
 - "type": "BR:CNPJ"
 
} 
}, - "account": {
- "clientId": "string"
 
} 
} 
], - "pageInfo": {
- "errors": [
- {
- "message": "string",
 - "data": {
- "skip": 0,
 - "limit": 0
 
} 
} 
], - "skip": 0,
 - "limit": 0,
 - "totalCount": 0,
 - "hasPreviousPage": true,
 - "hasNextPage": true
 
} 
}Create a pre registration with a partner reference (your company)
As a partner company, you can create a new pre registration referencing your company as a partner.
Authorizations:
Request Body schema: application/json
The request body to create a pre registration.
object (PreRegistrationObject)    | |
object (PreRegistrationUserObject)    | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "preRegistration": {
- "name": "Example LLC",
 - "taxID": {
- "taxID": "11111111111111",
 - "type": "BR:CNPJ"
 
}, - "website": "examplellc.com"
 
}, - "user": {
- "firstName": "John",
 - "lastName": "Doe",
 - "email": "johndoe@examplellc.com",
 - "phone": "+5511912345678"
 
} 
}Response samples
- 200
 - 201
 - 400
 - 403
 
{- "preRegistration": {
- "name": "string",
 - "website": "string",
 - "taxID": {
- "taxID": "string",
 - "type": "BR:CNPJ"
 
} 
}, - "user": {
- "firstName": "string",
 - "lastName": "string",
 - "email": "string",
 - "phone": "string"
 
} 
}Approve a Payment Request
Endpoint to approve a payment
Authorizations:
Request Body schema: application/json
Data to approve a payment request
| correlationID | string  the correlation ID of the payment to be approved  | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "correlationID": "payment1"
 
}Response samples
- 200
 - 400
 
{- "payment": {
- "value": 100,
 - "status": "APPROVED",
 - "destinationAlias": "c4249323-b4ca-43f2-8139-8232aab09b93",
 - "comment": "payment comment",
 - "correlationID": "payment1",
 - "sourceAccountId": "my-source-account-id"
 
}, - "transaction": {
- "value": 100,
 - "endToEndId": "transaction-end-to-end-id",
 - "time": "2023-03-20T13:14:17.000Z"
 
}, - "destination": {
- "name": "Dan",
 - "taxID": "31324227036",
 - "pixKey": "c4249323-b4ca-43f2-8139-8232aab09b93",
 - "bank": "A Bank",
 - "branch": "1",
 - "account": "123456"
 
} 
}Get one Payment
Authorizations:
path Parameters
| id required  | string   Examples: 
 payment ID or correlation ID  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/payment/%7Bid%7D", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "payment": {
- "value": 100,
 - "status": "CONFIRMED",
 - "destinationAlias": "c4249323-b4ca-43f2-8139-8232aab09b93",
 - "comment": "payment comment",
 - "correlationID": "payment1",
 - "sourceAccountId": "my-source-account-id"
 
}, - "transaction": {
- "value": 100,
 - "endToEndId": "transaction-end-to-end-id",
 - "time": "2023-03-20T13:14:17.000Z"
 
}, - "destination": {
- "name": "Dan",
 - "taxID": "31324227036",
 - "pixKey": "c4249323-b4ca-43f2-8139-8232aab09b93",
 - "bank": "A Bank",
 - "branch": "1",
 - "account": "123456"
 
} 
}Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/payment", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "pageInfo": {
- "skip": 0,
 - "limit": 10,
 - "totalCount": 20,
 - "hasPreviousPage": false,
 - "hasNextPage": true
 
}, - "payments": {
- "payment": {
- "value": 100,
 - "status": "CONFIRMED",
 - "destinationAlias": "c4249323-b4ca-43f2-8139-8232aab09b93",
 - "comment": "payment comment",
 - "correlationID": "payment1",
 - "sourceAccountId": "my-source-account-id"
 
}, - "transaction": {
- "value": 100,
 - "endToEndId": "transaction-end-to-end-id",
 - "time": "2023-03-20T13:14:17.000Z"
 
}, - "destination": {
- "name": "Dan",
 - "taxID": "31324227036",
 - "pixKey": "c4249323-b4ca-43f2-8139-8232aab09b93",
 - "bank": "A Bank",
 - "branch": "1",
 - "account": "123456"
 
} 
} 
}Create a Payment Request
Endpoint to request a payment
Authorizations:
Request Body schema: application/json
Data to create a payment request
| value | number  value of the requested payment in cents  | 
| destinationAlias | string  the pix key the payment should be sent to  | 
| correlationID | string  an unique identifier for your payment  | 
| comment | string  the comment that will be send alongisde your payment  | 
| sourceAccountId | string  an optional id for the source account of the payment, if not informed will assume the default account  | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "value": 100,
 - "destinationAlias": "c4249323-b4ca-43f2-8139-8232aab09b93",
 - "comment": "payment comment",
 - "correlationID": "payment1",
 - "sourceAccountId": "my-source-account-id"
 
}Response samples
- 200
 - 400
 
{- "payment": {
- "value": 100,
 - "status": "CREATED",
 - "destinationAlias": "c4249323-b4ca-43f2-8139-8232aab09b93",
 - "comment": "payment comment",
 - "correlationID": "payment1",
 - "sourceAccountId": "my-source-account-id"
 
} 
}Get one Pix QrCode
Authorizations:
path Parameters
| id required  | string   Examples: 
 pixQrCode ID, correlation ID or emv identifier  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/qrcode-static/%7Bid%7D", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "pixQrCode": {
- "name": "pix qrcode static",
 - "value": 100,
 - "comment": "pix qrcode static",
 - "correlationID": "fe7834b4060c488a9b0f89811be5f5cf",
 - "identifier": "zr7833b4060c488a9b0f89811",
 - "paymentLinkID": "7777-6f71-427a-bf00-241681624586",
 - "brCode": "000201010212261060014br.gov.bcb.pix2584https://api.openpix.com.br/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao Paulo62360532867ba5173c734202ac659721306b38c963044BCA",
 - "createdAt": "2021-03-02T17:28:51.882Z",
 - "updatedAt": "2021-03-02T17:28:51.882Z"
 
} 
}Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/qrcode-static", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "pageInfo": {
- "skip": 0,
 - "limit": 10,
 - "totalCount": 20,
 - "hasPreviousPage": false,
 - "hasNextPage": true
 
}, - "pixQrCodes": {
- "name": "pix qrcode",
 - "value": 100,
 - "comment": "good",
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "identifier": "zr7833b4060c488a9b0f89811",
 - "paymentLinkID": "7777a23s-6f71-427a-bf00-241681624586",
 - "brCode": "000201010212261060014br.gov.bcb.pix2584https://api.openpix.com.br/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao Paulo62360532867ba5173c734202ac659721306b38c963044BCA",
 - "createdAt": "2021-03-02T17:28:51.882Z",
 - "updatedAt": "2021-03-02T17:28:51.882Z"
 
} 
}Create a new Pix QrCode Static
Endpoint to create a new Pix QrCode Static
Authorizations:
Request Body schema: application/json
Data to create a new Pix QrCode Static
| name required  | string  Name of this pix qrcode  | 
| correlationID | string  Your correlation ID to keep track of this qrcode  | 
| value | number  Value in cents of this qrcode  | 
| comment | string  Comment to be added in infoPagador  | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "name": "my-qr-code",
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "value": 100,
 - "comment": "good"
 
}Response samples
- 200
 - 400
 
{- "pixQrCode": {
- "value": 100,
 - "comment": "good",
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "identifier": "zr7833b4060c488a9b0f89811",
 - "paymentLinkID": "7777a23s-6f71-427a-bf00-241681624586",
 - "createdAt": "2021-03-02T17:28:51.882Z",
 - "updatedAt": "2021-03-02T17:28:51.882Z",
 - "brCode": "000201010212261060014br.gov.bcb.pix2584https://api.openpix.com.br/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao Paulo62360532867ba5173c734202ac659721306b38c963044BCA"
 
} 
}Get one refund
Authorizations:
path Parameters
| id required  | string   Examples: 
 refund ID or correlation ID  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/refund/%7Bid%7D", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "pixTransactionRefund": {
- "value": 100,
 - "correlationID": "7777-6f71-427a-bf00-241681624586",
 - "refundId": "11bf5b37e0b842e08dcfdc8c4aefc000",
 - "returnIdentification": "D09089356202108032000a543e325902",
 - "comment": "Comentário do reembolso"
 
} 
}Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/refund", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "pageInfo": {
- "skip": 0,
 - "limit": 10,
 - "totalCount": 20,
 - "hasPreviousPage": false,
 - "hasNextPage": true
 
}, - "refunds": [
- {
- "status": "IN_PROCESSING",
 - "value": 100,
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "refundId": "9134e2866f71427abf00241681624586",
 - "time": "2021-03-02T17:28:51.882Z",
 - "comment": "Comentário do reembolso"
 
} 
] 
}Create a new refund
Endpoint to create a new refund for a customer
Authorizations:
Request Body schema: application/json
Data to create a new refund
| value | number   | 
| transactionEndToEndId | string  Your transaction ID, or endToEnd ID, to keep track of this refund  | 
| correlationID | string  Your correlation ID, unique identifier refund  | 
| comment | string  <= 140   Comment of this refund. Maximum length of 140 characters.  | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "transactionEndToEndId": "9134e286-6f71-427a-bf00-241681624586",
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "value": 100,
 - "comment": "Comentário do reembolso"
 
}Response samples
- 200
 - 400
 
{- "refund": {
- "status": "IN_PROCESSING",
 - "value": 100,
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "refundId": "9134e2866f71427abf00241681624586",
 - "time": "2021-03-02T17:28:51.882Z",
 - "comment": "Comentário do reembolso"
 
} 
}Get one subscription
Authorizations:
path Parameters
| id required  | string   Example:  UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM= The globalID of the subscription.  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "subscription": {
- "globalID": "UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=",
 - "customer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
} 
}, - "value": 100,
 - "dayGenerateCharge": 5
 
} 
}Create a new Subscription
Endpoint to create a new Subcription
Authorizations:
Request Body schema: application/json
Data to create a new Subscription
required  | object  Customer of this subscription  | 
| value required  | number  Value in cents of this subscription  | 
| comment | string  Comment to be added in infoPagador  | 
Array of objects  Additional info of the charge  | |
| dayGenerateCharge | number  [ 1 .. 27 ]   Default:  5  Day of the month that the charges will be generated. Maximun of 27.  | 
| chargeType | string  Default:  "DYNAMIC"  Enum: "DYNAMIC" "OVERDUE"   The charge type is used to determine whether charges generated by the subscription will have fines and interests  | 
| dayDue | number  >= 3   Default:  7  Days that the charge will take to expire from the generation day.  | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "value": 100,
 - "customer": {
- "name": "Dan",
 - "taxID": "31324227036",
 - "email": "email0@example.com",
 - "phone": "5511999999999"
 
}, - "dayGenerateCharge": 15
 
}Response samples
- 200
 - 400
 
{- "subscription": {
- "globalID": "UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=",
 - "customer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
} 
}, - "value": 100,
 - "dayGenerateCharge": 5
 
} 
}Get a Transaction
Authorizations:
path Parameters
| id required  | string  you can use the transaction id from openpix or the endToEndId of transaction from bank  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/transaction/%7Bid%7D", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "transaction": {
- "customer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
}, - "correlationID": "9134e286-6f71-427a-bf00-241681624586"
 
}, - "payer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
}, - "correlationID": "9134e286-6f71-427a-bf00-241681624586"
 
}, - "charge": {
- "status": "ACTIVE",
 - "customer": "603f81fcc6bccc24326ffb43",
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "createdAt": "2021-03-03T12:33:00.546Z",
 - "updatedAt": "2021-03-03T12:33:00.546Z"
 
}, - "withdraw": {
- "value": 100,
 - "time": "2021-03-03T12:33:00.536Z",
 - "infoPagador": "payer info 1",
 - "endToEndId": "E18236120202012032010s01345689XBY",
 - "createdAt": "2021-03-03T12:33:00.546Z"
 
}, - "infoPagador": "payer info 0",
 - "value": 100,
 - "time": "2021-03-03T12:33:00.536Z",
 - "transactionID": "transactionID",
 - "type": "PAYMENT",
 - "endToEndId": "E18236120202012032010s0133872GZA",
 - "globalID": "UGl4VHJhbnNhY3Rpb246NzE5MWYxYjAyMDQ2YmY1ZjUzZGNmYTBi"
 
} 
}Get a list of transactions
Authorizations:
query Parameters
| start | string <date-time>  (Start Date)    Example:  start=2020-01-01T00:00:00Z Start date used in the query. Complies with RFC 3339.  | 
| end | string <date-time>  (End Date)    Example:  end=2020-12-01T17:00:00Z End date used in the query. Complies with RFC 3339.  | 
| charge | string   Example:  charge=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA You can use the charge ID or correlation ID or transaction ID of charge to get a list of transactions related of this transaction  | 
| pixQrCode | string   Example:  pixQrCode=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA You can use the QrCode static ID or correlation ID or identifier field of QrCode static to get a list of QrCode related of this transaction  | 
| withdrawal | string   Example:  withdrawal=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA You can use the ID or EndToEndId of a withdrawal transaction to get all transactions related to the withdrawal  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/transaction", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "pageInfo": {
- "skip": 0,
 - "limit": 10,
 - "totalCount": 20,
 - "hasPreviousPage": false,
 - "hasNextPage": true
 
}, - "transactions": {
- "customer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
}, - "correlationID": "9134e286-6f71-427a-bf00-241681624586"
 
}, - "payer": {
- "name": "Dan",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31324227036",
 - "type": "BR:CPF"
 
}, - "correlationID": "9134e286-6f71-427a-bf00-241681624586"
 
}, - "charge": {
- "status": "ACTIVE",
 - "customer": "603f81fcc6bccc24326ffb43",
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "createdAt": "2021-03-03T12:33:00.546Z",
 - "updatedAt": "2021-03-03T12:33:00.546Z"
 
}, - "withdraw": {
- "value": 100,
 - "time": "2021-03-03T12:33:00.536Z",
 - "infoPagador": "payer info 1",
 - "endToEndId": "E18236120202012032010s01345689XBY"
 
}, - "type": "PAYMENT",
 - "infoPagador": "payer info 0",
 - "value": 100,
 - "time": "2021-03-03T12:33:00.536Z",
 - "transactionID": "transactionID",
 - "endToEndId": "E18236120202012032010s0133872GZA"
 
} 
}Create a Transfer
Endpoint to to transfer values between accounts
Authorizations:
Request Body schema: application/json
Data to create a transfer
| value | number  value of the transfer in cents  | 
| fromPixKey | string  the pix key of the account the value of the transfer will come out from  | 
| toPixKey | string  the pix key of the account the value of the transfer will go to  | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "value": 100,
 - "fromPixKey": "from@openpix.com.br",
 - "toPixKey": "to@openpix.com.br"
 
}Response samples
- 200
 - 400
 
{- "transaction": {
- "value": 100,
 - "time": "2023-06-22T15:33:27.165Z,",
 - "correlationID": "c782e0ac-833d-4a89-9e73-9b60b2b41d3a"
 
} 
}Delete a Webhook
Endpoint to delete a Webhook
Authorizations:
path Parameters
| id required  | string   Examples: 
 webhook ID  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "DELETE", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/webhook/%7Bid%7D", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "status": "string"
 
}Get a list of webhooks
Authorizations:
query Parameters
| url | string   Example:  url=https://mycompany.com.br/webhook You can use the url to filter all webhooks  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/webhook?url=SOME_STRING_VALUE", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "pageInfo": {
- "skip": 0,
 - "limit": 100,
 - "totalCount": 2,
 - "hasPreviousPage": false,
 - "hasNextPage": true
 
}, - "webhooks": [
- {
- "id": "V2ViaG9vazo2MDNlYmUxZWRlYjkzNWU4NmQyMmNmMTg=",
 - "name": "webhookName",
 - "authorization": "openpix",
 - "event": "OPENPIX:TRANSACTION_RECEIVED",
 - "isActive": true,
 - "createdAt": "2021-03-02T22:29:10.720Z",
 - "updatedAt": "2021-03-02T22:29:10.720Z"
 
}, - {
- "id": "V2ViaG9vazo2MDNlYmUxZWRlYjkzNWU4NmQyMmNmOTk=",
 - "name": "webhookName",
 - "authorization": "openpix",
 - "event": "OPENPIX:CHARGE_CREATED",
 - "isActive": true,
 - "createdAt": "2021-03-02T22:29:10.720Z",
 - "updatedAt": "2021-03-02T22:29:10.720Z"
 
} 
] 
}Create a new Webhook
Endpoint to create a new Webhook
Authorizations:
Request Body schema: application/json
Data to create a new webhook
object (WebhookPayload)    | |||||||||||
  | |||||||||||
Responses
Callbacks
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "webhook": {
- "name": "webhookName",
 - "event": "OPENPIX:CHARGE_CREATED",
 - "authorization": "openpix",
 - "isActive": true
 
} 
}Response samples
- 200
 - 400
 
{- "webhook": {
- "id": "V2ViaG9vazo2MDNlYmUxZWRlYjkzNWU4NmQyMmNmMTg=",
 - "name": "webhookName",
 - "authorization": "openpix",
 - "isActive": true,
 - "event": "OPENPIX:TRANSACTION_RECEIVED",
 - "createdAt": "2021-03-02T22:29:10.720Z",
 - "updatedAt": "2021-03-02T22:29:10.720Z"
 
} 
}Callback payload samples
{- "charge": {
- "status": "COMPLETED",
 - "customer": {
- "name": "Julio",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31928282008",
 - "type": "BR:CPF"
 
}, - "correlationID": "9134e286-6f71-427a-bf00-241681624586"
 
}, - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "transactionID": "9134e2866f71427abf00241681624586",
 - "brCode": "000201010212261060014br.gov.bcb.pix2584https://api.openpix.com.br/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao Paulo62360532867ba5173c734202ac659721306b38c963044BCA",
 - "createdAt": "2021-03-03T20:49:23.605Z",
 - "updatedAt": "2021-03-03T20:49:23.668Z"
 
}, - "pix": {
- "pixQrCode": null,
 - "charge": {
- "status": "COMPLETED",
 - "customer": "604002035cce3b60132343cb",
 - "correlationID": "9134e286-6f71-427a-bf00-241681624586",
 - "brCode": "000201010212261060014br.gov.bcb.pix2584https://api.openpix.com.br/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao Paulo62360532867ba5173c734202ac659721306b38c963044BCA",
 - "createdAt": "2021-03-03T21:39:15.831Z",
 - "updatedAt": "2021-03-03T21:39:15.896Z"
 
}, - "customer": {
- "name": "Julio",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31928282008",
 - "type": "BR:CPF"
 
}, - "correlationID": "9134e286-6f71-427a-bf00-241681624586"
 
}, - "payer": {
- "name": "Julio",
 - "email": "email0@example.com",
 - "phone": "5511999999999",
 - "taxID": {
- "taxID": "31928282008",
 - "type": "BR:CPF"
 
}, - "correlationID": "9134e286-6f71-427a-bf00-241681624586"
 
}, - "time": "2020-09-09T20:15:00.358Z",
 - "value": 9999,
 - "transactionID": "9134e2866f71427abf00241681624586",
 - "infoPagador": "conta",
 - "raw": {
- "endToEndId": "9134e2866f71427abf00241681624586",
 - "txid": "9134e2866f71427abf00241681624586",
 - "valor": "99.99",
 - "horario": "2020-09-09T20:15:00.358Z",
 - "infoPagador": "conta"
 
} 
}, - "pixQrCode": null
 
}Withdraw from a Sub Account
Withdraw from a Sub Account and return the withdrawal transaction information
Authorizations:
path Parameters
| id required  | string   Example:  destination@test.com pix key registered to the subaccount  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "POST", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/subaccount/destination@test.com/withdraw", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "transaction": {
- "status": "CREATED",
 - "value": 100,
 - "correlationID": "TESTING1323",
 - "destinationAlias": "pixKeyTest@test.com",
 - "comment": "testing-transaction"
 
} 
}Get subaccount details
Authorizations:
path Parameters
| id required  | string   Examples: 
 pix key registered to the subaccount  | 
Responses
Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/subaccount/%7Bid%7D", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "SubAccount": {
- "name": "test-sub-account",
 - "pixKey": "c4249323-b4ca-43f2-8139-8232aab09b93",
 - "balance": 100
 
} 
}Request samples
- Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
const http = require("https"); const options = { "method": "GET", "hostname": "api.openpix.com.br", "port": null, "path": "/api/v1/subaccount", "headers": { "Authorization": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Response samples
- 200
 - 400
 
{- "subAccounts": {
- "subaccount": {
- "name": "test-sub-account",
 - "pixKey": "c4249323-b4ca-43f2-8139-8232aab09b93",
 - "balance": 100
 
} 
}, - "pageInfo": {
- "skip": 0,
 - "limit": 10,
 - "totalCount": 20,
 - "hasPreviousPage": false,
 - "hasNextPage": true
 
} 
}Create a subaccount
Authorizations:
Request Body schema: application/json
Data to create a new subAccount or retrieve existing one
| pixKey | string  The pix key for the sub account  | 
| name | string  Name of the sub account  | 
Responses
Request samples
- Payload
 - Node + Native
 - Shell + Curl
 - Php + Curl
 - Python + Python3
 - Go + Native
 - Java + Okhttp
 - Ruby + Native
 
{- "pixKey": "9134e286-6f71-427a-bf00-241681624587",
 - "name": "Test Account"
 
}Response samples
- 200
 - 400
 
{- "SubAccount": {
- "name": "test-sub-account",
 - "pixKey": "c4249323-b4ca-43f2-8139-8232aab09b93"
 
} 
}