Request to generate Charge with QRCode PIX
POST/charge/pix
Request to generate Charge with QRCode PIX
Request​
Header Parameters
Optional string that identifies the e-commerce platform or integration system used by the customer to send the request, such as 'vtex', 'irroba', etc.
- application/json
Body
required
Array [
]
Possible values: [CHECKOUT
, GATEWAY
]
Enum [ CHECKOUT(Transactions made from the standard checkout and lightBox), GATEWAY(Transactions carried out using the api directly)]
SmartCheckout ID defined by the system (Required to default or lightBox checkout)
Possible values: >= 6 characters
and <= 36 characters
, Value must match regular expression ^([a-zA-Z0-9-]+$)$
Unique external identifier for the charge, defined by the merchant's system.
This field must be unique for each charge, as it is used to individually
track and identify transactions in the system. If not provided, it will be generated internally.
Caution: reusing a merchantChargeId
for multiple charges will
result in failures when creating new charges.
Inform true to perform an authorization with delayed capture. Default value: false.
customer
object
Related customer (buyer).
Possible values: non-empty
, Value must match regular expression ^[\p{L} &\d]+$
Customer's name.
Possible values: Value must match regular expression ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Customer's e-mail.
Possible values: [CPF
, CNPJ
, PASSPORT
]
Possible values: Value must match regular expression ^\d{9}$|^\d{11}$|^[A-Z0-9]{9}$
Customer's CPF, CNPJ or PASSAPORT. Must match.
phone
object
Customer phone number.
Possible values: <= 3 characters
, Value must match regular expression ^[0-9]+$
Possible values: <= 3 characters
, Value must match regular expression ^[0-9]+$
Possible values: Value must match regular expression ^[0-9]+$
Possible values: [RESIDENTIAL
, COMMERCIAL
, TEMPORARY
, MOBILE
]
Enum [RESIDENTIAL(Telefone Residencial.), COMMERCIAL(Telefone Comercial.), TEMPORARY(Telefone Temporário.), MOBILE(Celular)]
transactions
object[]
required
Possible values: >= 1
, <= 1
One transactions to be performed within the charge.
Possible values: [CREDIT
, WALLET
, PIX
]
Enum [ CREDIT(Credit card), WALLET(QRCode PicPay), PIX(Pix)]
Possible values: >= 1
Payment amount in cents
pix
object
QRcode pix expiration in seconds. Default = 900s
deviceInformation
object
Contains device information (mandatory to antifraud´s analisys)
The IP of the device used to perform the transaction.
Customer's device unique id
The country code of the address of the end customer. (Eg. BRA)
The estimated city of ip's address.
The estimated region ip's address.
An identifier of the session in the device from which this event generated
Responses​
- 200
- 400
- 401
- 415
- 500
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Possible values: [CANCELED
, DENIED
, ERROR
, PAID
, PARTIAL
, PRE_AUTHORIZED
, REFUNDED
, CHARGEBACK
]
transactions
object[]
Possible values: [CREDIT
, WALLET
, PIX
]
Enum [ CREDIT(Credit card), WALLET(QRCode PicPay), PIX(Pix)]
Possible values: [CANCELED
, CHARGEBACK
, DENIED
, ERROR
, EXPIRED
, PAID
, PARTIALLY_REFUNDED
, PENDING
, PRE_AUTHORIZED
, REFUNDED
]
Formato ISO 8601. Exemplo: 2022-05-01T16:00:00-03:00 (significa que foi criado em 01/05/2022 às 16h no fuso horário -03:00)
Formato ISO 8601. Exemplo: 2022-05-01T16:00:00-03:00 (significa que foi atualizado em 01/05/2022 às 16h no fuso horário -03:00)
pix
object
pix response object
{
"merchantChargeId": "string",
"id": "string",
"chargeStatus": "PRE_AUTHORIZED",
"amount": 0,
"originalAmount": 0,
"refundedAmount": 0,
"transactions": [
{
"paymentType": "CREDIT",
"amount": 0,
"originalAmount": 0,
"refundedAmount": 0,
"transactionStatus": "PRE_AUTHORIZED",
"createdAt": "2022-05-01T16:00:00-03:00",
"updatedAt": "2022-05-01T16:00:00-03:00",
"transactionId": "string",
"errorMessage": "string",
"pix": {
"qrCode": "string",
"qrCodeBase64": "string"
}
}
]
}
{
"merchantChargeId": "8086bfd7-6241-4f76-81d8-70460533ce74",
"id": "ed50d469-ae7d-4a3d-a946-6e399cb981bb",
"chargeStatus": "PRE_AUTHORIZED",
"amount": 1000,
"originalAmount": 1000,
"refundedAmount": 0,
"transactions": [
{
"paymentType": "PIX",
"amount": 1000,
"originalAmount": 1000,
"refundedAmount": 0,
"transactionStatus": "PENDING",
"createdAt": "2023-11-08T11:50:21-03:00",
"updatedAt": "2023-11-08T11:50:21-03:00",
"transactionId": "2a50d469-ae7d-4a3d-a946-6e399cb981dh",
"errorMessage": null,
"pix": {
"qrCode": "00020101021226940014COM.PICPAY.P2B0172......",
"qrCodeBase64": "data:image/png;base64......",
"endToEndId": "E00416911112501234429olrr6BQh8vW"
}
}
]
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"businessCode": "string",
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"businessCode": "string",
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
{
"message": "Authorization token not found.",
"success": false,
"errors": {
"message": "Authorization token not found",
"field": "Authorization Token"
}
}
Unsupported Media Type
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"businessCode": "string",
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
{
"message": "Request object is invalid or incorrectly formatted",
"success": false,
"errors": null
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"businessCode": "string",
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
{
"message": "Internal Server Error",
"success": false,
"errors": null
}