Request to generate Charge with QRCode PIX
POST/charge/pix
Request to generate Charge with QRCode PIX
Request​
Header Parameters
Include the 'caller-origin' property as a string in the header of REST requests only if the application is an e-commerce platform, otherwise, don't include it.
- 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.
Default value: false
Inform true to perform an authorization with delayed capture. Default value: false.
customer
object
required
Related customer (buyer).
Possible values: non-empty
, Value must match regular expression ^[\p{L} ]+$
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.
credit
object
It may only contain this ID if the card was previously registered. Otherwise, the other card information becomes mandatory
Possible values: Value must match regular expression ^[a-zA-Z0-9.\/\_\+-]*$
One time token generated by our SDK on seller's front-end to be used in the transaction. It's useful to avoid sending card data to the seller's backend. When using this field, the card data is not necessary.
Possible values: >= 13 characters
and <= 16 characters
, Value must match regular expression ^\d+$
Possible values: >= 3 characters
and <= 4 characters
, Value must match regular expression ^\d+$
Possible values: [VISA
, MASTERCARD
, AMEX
, ELO
, HIPERCARD
]
Possible values: non-empty
, Value must match regular expression ^[\p{L} ]+$
Possible values: Value must match regular expression ^\d{9}$|^\d{11}$|^[A-Z0-9]{9}$
billingAddress
object
Possible values: Value must match regular expression ^(?!\s*$)[\p{L}\d .-]+$
Possible values: Value must match regular expression ^[0-9]+$
Possible values: Value must match regular expression ^[\p{L} ]+$
Possible values: Value must match regular expression ^[\p{L} ]+$
Possible values: >= 2 characters
and <= 2 characters
, Value must match regular expression ^[\p{L} ]+$
Possible values: Value must match regular expression ^[\p{L} ]+$
Possible values: Value must match regular expression ^[0-9]+$
Possible values: Value must match regular expression ^(?!\s*$)[\p{L}\d .-]+$
Possible values: >= 1
and <= 12
Possible values: >= 2000
and <= 9999
Default value: 1
Possible values: [NONE
, MERCHANT
]
Default value: NONE
Enum [ NONE(Spot transaction), MERCHANT(Transaction in installments by the merchant, i.e. without interest)]
sdwo
object
address
object
required
Possible values: Value must match regular expression ^(?!\s*$)[\p{L}\d .-]+$
Possible values: Value must match regular expression ^[0-9]+$
Possible values: Value must match regular expression ^[\p{L} ]+$
Possible values: Value must match regular expression ^[\p{L} ]+$
Possible values: >= 2 characters
and <= 2 characters
, Value must match regular expression ^[\p{L} ]+$
Possible values: Value must match regular expression ^[\p{L} ]+$
Possible values: Value must match regular expression ^[0-9]+$
Possible values: Value must match regular expression ^(?!\s*$)[\p{L}\d .-]+$
Possible values: [CPF
, CNPJ
, PASSPORT
]
Possible values: Value must match regular expression ^\d{9}$|^\d{11}$|^[A-Z0-9]{9}$
Possible values: >= 4 characters
and <= 4 characters
Possible values: Value must match regular expression ^[0-9]+$
Possible values: Value must match regular expression ^[\p{L} ]+$
Possible values: [CASH_IN
, BACK_TO_BACK
]
phone
object
required
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)]
Possible values: [CREDIT
, WALLET
, PIX
]
Enum [ CREDIT(Credit card), WALLET(QRCode PicPay), PIX(Pix)]
Possible values: >= 1
Payment amount in cents
pix
object
Possible values: >= 1
Expiration qrcode pix in seconds. Default = 600s
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
Use this field to declare the source of a charge
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
]
ISO 8601 format. Example: 2022-05-01T16:00:00-03:00 (means it was created on 01/05/2022 at 16:00 in the -03:00 time zone)
ISO 8601 format. Example: 2022-05-01T16:00:00-03:00 (means it was updated on 01/05/2022 at 16:00 in the -03:00 time zone)
credit
object
Possible values: [VISA
, MASTERCARD
, AMEX
, ELO
, HIPERCARD
]
Possible values: non-empty
, Value must match regular expression ^[\p{L} ]+$
Possible values: Value must match regular expression ^\d{9}$|^\d{11}$|^[A-Z0-9]{9}$
Possible values: [NONE
, MERCHANT
]
Default value: NONE
Enum [ NONE(Spot transaction), MERCHANT(Transaction in installments by the merchant, i.e. without interest)]
wallet
object
Wallet response
ISO 8601 format. Example: 2022-05-01T16:00:00-03:00 (means it will expire on 01/05/2022 at 16:00 in the -03:00 time zone)
{
"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",
"softDescriptor": "string",
"errorMessage": "string",
"credit": {
"nsu": "string",
"cardNumber": "string",
"authorizationCode": "string",
"authorizationResponseCode": "string",
"brand": "VISA",
"cardholderName": "string",
"cardholderDocument": "string",
"expirationMonth": 0,
"expirationYear": 0,
"installmentNumber": 0,
"installmentType": "NONE"
},
"wallet": {
"qrCode": "string",
"qrCodeBase64": "string",
"expiresAt": "2022-05-01T16:00:00-03:00"
}
}
]
}
{
"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,
"credit": null,
"wallet": null,
"pix": {
"qrCode": "00020101021226940014COM.PICPAY.P2B0172......",
"qrCodeBase64": "data:image/png;base64......"
}
}
]
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"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,
"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,
"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,
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
{
"message": "Internal Server Error",
"success": false,
"errors": null
}