Download OpenAPI specification:Download
Use this API to create payin in operations
Create a new payment charge order
The route parameter {chargeType}
should be boleto
or pix
.
When you choose boleto a new payment slip will be generated. When PIX is chosen a QRCode payment charge will be created.
Pix has a payment confirmation time much faster than boleto. You will receive a payment notification in less than 1 minute after the qr code is paid.
The expireDate
field in Boleto is formatted as "YYYY-MM-DD". Ex.: 2021-12-31
The expireDate
field in PIX is formatted as "YYYY-MM-DDTH:I:S". Ex.: 2021-12-31T23:59:59
1
; The first status when the payin is created.2
; Payin canceled due to expiration.3
; Payin was paid.4
; Payin was paid and the amount was credited on your wallet.5
; Payin expiration requested.We provide you a simple payment page that renders the boleto or pix qr code so the user can access it and view the instructions to pay the charge.
To use the page you will need the key
field that is returned in this method.
The payment page url is: https://pagar.goboleto.com/?hash={key}
.
In sandbox environment the page url is: https://pagar.sandbox.goboleto.com/?hash={key}
chargeType required | string Should be "pix" or "boleto" |
callbackUrl | string <uri> The url where we will submit the callbacks |
customNumber required | string <= 255 characters Your identification number, it must be unique on our database. |
required | object |
required | object The person that you are charging object |
object This is only available for | |
object Available only for | |
Array of objects Splits are avaiable if you want to credit more than one wallet with the charged paid amount | |
required | object Use this object to inform the legal name of the final beneficiary, it could be your company’s name or the company you are proving a service for. Final Beneficiary is a person or a company that will receive the amount paid trough the boleto. |
{- "customNumber": "1234",
- "title": {
- "expireDate": "2020-04-20",
- "amountInCents": 8652,
- "instructions": "Esse payin é referente à compra do produto X"
}, - "buyer": {
- "name": "Josefino da Silva",
- "document": {
- "number": "01234567890",
- "type": "CPF"
}, - "address": {
- "street": "Rua Antonio Carlos",
- "number": "191",
- "complement": "oitavo andar",
- "zipCode": "71540072",
- "city": "Porto Velho",
- "district": "Centro",
- "stateCode": "PR"
}
}
}
{- "key": "string",
- "clientId": 0,
- "clientName": "string",
- "buyerName": "string",
- "buyerDocument": "string",
- "customNumber": "string",
- "ourNumber": "string",
- "digitableLine": "string",
- "barCodeNumber": "string",
- "status": {
- "name": "string",
- "id": "string"
}, - "typePayin": "string",
- "amountCents": 0,
- "paidAmountCents": null,
- "paidAt": null,
- "expiresAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "fine": null,
- "discount": null,
- "splits": [
- {
- "walletOwner": "string",
- "walletUUID": "string",
- "percent": 0,
- "amountInCents": null
}
], - "statusHistory": [
- {
- "status": {
- "id": 0,
- "name": "string"
}, - "updatedAt": "string"
}
], - "sender": {
- "name": "string",
- "document": "string",
- "helpdesk": "string"
}, - "payinRefunds": [
- {
- "id": 1,
- "payinId": 1,
- "statusId": 2,
- "user": {
- "id": 1,
- "name": "Usuário de Teste"
}, - "clientId": 1,
- "amountCents": 100,
- "statuses": [
- {
- "id": 1,
- "statusId": 1,
- "name": "Solicitado",
- "notification": 1,
- "createdAt": "2022-03-11T17:14:47.000000Z"
}, - {
- "id": 2,
- "statusId": 2,
- "name": "Pago",
- "notification": 1,
- "createdAt": "2022-03-11T17:14:49.000000Z"
}
], - "endToEndId": "EFASA321654987456ASAS123",
- "reason": "Devolvendo valores de teste",
- "createdAt": "2022-03-11T17:31:03.000000Z",
- "updatedAt": "2022-03-11T17:31:05.000000Z"
}
], - "refundAmountCents": 1000
}
{- "key": "string",
- "clientId": 0,
- "clientName": "string",
- "buyerName": "string",
- "buyerDocument": "string",
- "customNumber": "string",
- "ourNumber": "string",
- "digitableLine": "string",
- "barCodeNumber": "string",
- "status": {
- "name": "string",
- "id": "string"
}, - "typePayin": "string",
- "amountCents": 0,
- "paidAmountCents": null,
- "paidAt": null,
- "expiresAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "fine": null,
- "discount": null,
- "splits": [
- {
- "walletOwner": "string",
- "walletUUID": "string",
- "percent": 0,
- "amountInCents": null
}
], - "statusHistory": [
- {
- "status": {
- "id": 0,
- "name": "string"
}, - "updatedAt": "string"
}
], - "sender": {
- "name": "string",
- "document": "string",
- "helpdesk": "string"
}, - "payinRefunds": [
- {
- "id": 1,
- "payinId": 1,
- "statusId": 2,
- "user": {
- "id": 1,
- "name": "Usuário de Teste"
}, - "clientId": 1,
- "amountCents": 100,
- "statuses": [
- {
- "id": 1,
- "statusId": 1,
- "name": "Solicitado",
- "notification": 1,
- "createdAt": "2022-03-11T17:14:47.000000Z"
}, - {
- "id": 2,
- "statusId": 2,
- "name": "Pago",
- "notification": 1,
- "createdAt": "2022-03-11T17:14:49.000000Z"
}
], - "endToEndId": "EFASA321654987456ASAS123",
- "reason": "Devolvendo valores de teste",
- "createdAt": "2022-03-11T17:31:03.000000Z",
- "updatedAt": "2022-03-11T17:31:05.000000Z"
}
], - "refundAmountCents": 1000
}
Returns the charge using one of it's identifications parameters
keyTipe required | string Should be ourNumber, id or key |
key required | integer The Key of the payin. |
{- "key": "string",
- "clientId": 0,
- "clientName": "string",
- "buyerName": "string",
- "buyerDocument": "string",
- "customNumber": "string",
- "ourNumber": "string",
- "digitableLine": "string",
- "barCodeNumber": "string",
- "status": {
- "name": "string",
- "id": "string"
}, - "typePayin": "string",
- "amountCents": 0,
- "paidAmountCents": null,
- "paidAt": null,
- "expiresAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "fine": null,
- "discount": null,
- "splits": [
- {
- "walletOwner": "string",
- "walletUUID": "string",
- "percent": 0,
- "amountInCents": null
}
], - "statusHistory": [
- {
- "status": {
- "id": 0,
- "name": "string"
}, - "updatedAt": "string"
}
], - "sender": {
- "name": "string",
- "document": "string",
- "helpdesk": "string"
}, - "payinRefunds": [
- {
- "id": 1,
- "payinId": 1,
- "statusId": 2,
- "user": {
- "id": 1,
- "name": "Usuário de Teste"
}, - "clientId": 1,
- "amountCents": 100,
- "statuses": [
- {
- "id": 1,
- "statusId": 1,
- "name": "Solicitado",
- "notification": 1,
- "createdAt": "2022-03-11T17:14:47.000000Z"
}, - {
- "id": 2,
- "statusId": 2,
- "name": "Pago",
- "notification": 1,
- "createdAt": "2022-03-11T17:14:49.000000Z"
}
], - "endToEndId": "EFASA321654987456ASAS123",
- "reason": "Devolvendo valores de teste",
- "createdAt": "2022-03-11T17:31:03.000000Z",
- "updatedAt": "2022-03-11T17:31:05.000000Z"
}
], - "refundAmountCents": 1000
}
clientId required | integer The Client ID. |
name required | string |
bank_code required | string |
bank_branch required | string |
bank_branch_digit required | string |
account required | string |
account_digit required | string |
account_type required | string |
pix_key required | string |
email required | string |
document required | string |
document_type required | string |
{- "name": "My Recipient",
- "bank_code": "001",
- "bank_branch": "6955",
- "bank_branch_digit": "0",
- "account": "1146208",
- "account_digit": "6",
- "account_type": "c",
- "pix_key": "01234567890",
- "email": "recipient1@gmail.com",
- "document": "01234567890",
- "document_type": "cpf"
}
{- "status": true,
- "data": {
- "id": 5,
- "wallet_uuid": "3e40f8f1-9f70-4f5d-97f9-90483027dfaa",
- "name": "My Recipient",
- "bank_code": "001",
- "bank_name": "001 - BANCO DO BRASIL S/A",
- "bank_branch": "6955",
- "bank_branch_digit": "0",
- "account": "1146208",
- "account_digit": "6",
- "account_type": "c",
- "pix_key": "01234567890",
- "document": "01234567890",
- "document_type": "cpf",
- "email": "recipient1@gmail.com",
- "created_at": "2020-07-20T13:19:10.000000Z",
- "updated_at": "2020-07-20T13:19:10.000000Z"
}, - "message": "Recipient created"
}
clientId required | integer The Client ID. |
recipientId required | integer The Recipient ID. |
name required | string |
bank_code required | string |
bank_branch required | string |
bank_branch_digit required | string |
account required | string |
account_digit required | string |
account_type required | string |
pix_key required | string |
email required | string |
document required | string |
document_type required | string |
{- "name": "My Recipient",
- "bank_code": "001",
- "bank_branch": "6955",
- "bank_branch_digit": "0",
- "account": "1146208",
- "account_digit": "6",
- "account_type": "c",
- "pix_key": "01234567890",
- "email": "recipient1@gmail.com",
- "document": "01234567890",
- "document_type": "cpf"
}
{- "status": true,
- "data": {
- "id": 5,
- "wallet_uuid": "3e40f8f1-9f70-4f5d-97f9-90483027dfaa",
- "name": "My Recipient",
- "bank_code": "001",
- "bank_name": "001 - BANCO DO BRASIL S/A",
- "bank_branch": "6955",
- "bank_branch_digit": "0",
- "account": "1146208",
- "account_digit": "6",
- "account_type": "c",
- "pix_key": "01234567890",
- "document": "01234567890",
- "document_type": "cpf",
- "email": "recipient1@gmail.com",
- "created_at": "2020-07-20T13:19:10.000000Z",
- "updated_at": "2020-07-20T13:19:10.000000Z"
}, - "message": "Recipient created"
}
Return a recipient information using it's ID
clientId required | integer The Client ID. |
recipientId required | integer The Recipient ID. |
{- "id": 5,
- "wallet_uuid": "3e40f8f1-9f70-4f5d-97f9-90483027dfaa",
- "name": "My Recipient",
- "bank_code": "001",
- "bank_name": "001 - BANCO DO BRASIL S/A",
- "bank_branch": "6955",
- "bank_branch_digit": "0",
- "account": "1146208",
- "account_digit": "6",
- "account_type": "c",
- "pix_key": "01234567890",
- "document": "01234567890",
- "document_type": "cpf",
- "email": "recipient1@gmail.com",
- "created_at": "2020-07-20T13:19:10.000000Z",
- "updated_at": "2020-07-20T13:19:10.000000Z"
}
Returns a client or recipient balance
clientId required | integer The Client ID. |
recipient_id | string Use this if you want to retrieve a specific recipient balance |
{- "status": true,
- "data": {
- "balance": 10000,
- "available_balance_cents": 9319,
- "updated_at": "2020-07-20T10:55:38-03:00"
}, - "message": "Client balance amount in cents"
}
Returns the refund using its unique identifier
payinRefundId required | string |
{- "id": 1,
- "payinId": 1,
- "statusId": 2,
- "user": {
- "id": 1,
- "name": "Usuário de Teste"
}, - "clientId": 1,
- "amountCents": 100,
- "statuses": [
- {
- "id": 1,
- "statusId": 1,
- "name": "Solicitado",
- "notification": 1,
- "createdAt": "2022-03-11T17:14:47.000000Z"
}, - {
- "id": 2,
- "statusId": 2,
- "name": "Pago",
- "notification": 1,
- "createdAt": "2022-03-11T17:14:49.000000Z"
}
], - "endToEndId": "EFASA321654987456ASAS123",
- "reason": "Devolvendo valores",
- "createdAt": "2022-03-11T17:31:03.000000Z",
- "updatedAt": "2022-03-11T17:31:05.000000Z"
}
Create a new refund.
To initiate a refund, the unique identifier of the pix payment must be informed in the "payinId" parameter.
1
; Refund requested.2
; Refund was paid.3
; Refund Error.payinId required | string Identification of the charge to be refunded |
amountCents required | integer [ 0 .. 10000000 ] Amount to be refunded |
reason | string [ 1 .. 191 ] characters Reason for refund |
callbackUrl | string [ 1 .. 191 ] characters URL for sending the webhook |
{- "amountCents": 10000,
- "reason": "refund reason",
}
{- "id": 1,
- "payinId": 1,
- "statusId": 2,
- "user": {
- "id": 1,
- "name": "Usuário de Teste"
}, - "clientId": 1,
- "amountCents": 100,
- "statuses": [
- {
- "id": 1,
- "statusId": 1,
- "name": "Solicitado",
- "notification": 1,
- "createdAt": "2022-03-11T17:14:47.000000Z"
}, - {
- "id": 2,
- "statusId": 2,
- "name": "Pago",
- "notification": 1,
- "createdAt": "2022-03-11T17:14:49.000000Z"
}
], - "endToEndId": "EFASA321654987456ASAS123",
- "reason": "Devolvendo valores de teste",
- "createdAt": "2022-03-11T17:31:03.000000Z",
- "updatedAt": "2022-03-11T17:31:05.000000Z"
}
id | number Subscription code |
buyer_document | string Buyer Document |
invoice | string Invoice |
status_id | string Enum: "21" "22" "23" Subscription Status Id |
client_id | string Client Code |
created_before | string Created before |
created_after | string Created after |
per_page | string Per page |
page | string Page |
sort | string Enum: "ASC" "DESC" sort |
order_by | string Order By |
[- {
- "id": 0,
- "invoice": "string",
- "callbackUrl": "string",
- "client": {
- "id": 0,
- "name": "string"
}, - "status": {
- "id": 21,
- "name": "ACTIVE"
}, - "instructions": "string",
- "amountCents": 0,
- "sender": {
- "name": "string",
- "document": "string",
- "helpdesk": "string"
}, - "buyer": {
- "name": "string",
- "document": {
- "number": "string",
- "type": "CPF"
}
}, - "dateNextIssue": "2019-08-24",
- "dateLastPaid": "2019-08-24",
- "dateFirst": "2019-08-24",
- "daysBeforeExpiration": 0,
- "frequency": "MONTHLY",
- "quantity": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
WEEKLY
for subscription frequency, the maximum value allowed for the dateFirt
field is 7MONTHLY
for subscription frequency, the maximum value allowed for the dateFirt
field is 30callbackUrl
will be used to notify billing and subscription statuses.invoice required | string non-empty |
callbackUrl | string non-empty |
instructions required | string non-empty |
amountCents required | integer |
object | |
required | object |
dateFirst required | string <date> non-empty |
daysBeforeExpiration required | integer |
frequency required | string non-empty Enum: "WEEKLY" "MONTHLY" |
quantity | integer >= 2 |
clientId required | integer |
{- "invoice": "string",
- "callbackUrl": "string",
- "instructions": "string",
- "amountCents": 0,
- "sender": {
- "name": "string",
- "document": "string",
- "helpdesk": "string"
}, - "buyer": {
- "name": "string",
- "document": {
- "number": "string",
- "type": "string"
}
}, - "dateFirst": "string",
- "daysBeforeExpiration": 0,
- "frequency": "string",
- "quantity": "string",
- "clientId": 0
}
{- "id": 0,
- "invoice": "string",
- "callbackUrl": "string",
- "client": {
- "id": 0,
- "name": "string"
}, - "status": {
- "id": 21,
- "name": "ACTIVE"
}, - "instructions": "string",
- "amountCents": 0,
- "sender": {
- "name": "string",
- "document": "string",
- "helpdesk": "string"
}, - "buyer": {
- "name": "string",
- "document": {
- "number": "string",
- "type": "CPF"
}
}, - "dateNextIssue": "2019-08-24",
- "dateLastPaid": "2019-08-24",
- "dateFirst": "2019-08-24",
- "daysBeforeExpiration": 0,
- "frequency": "MONTHLY",
- "quantity": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
id required | string Subscription Code |
{- "id": 0,
- "invoice": "string",
- "callbackUrl": "string",
- "client": {
- "id": 0,
- "name": "string"
}, - "status": {
- "id": 21,
- "name": "ACTIVE"
}, - "instructions": "string",
- "amountCents": 0,
- "sender": {
- "name": "string",
- "document": "string",
- "helpdesk": "string"
}, - "buyer": {
- "name": "string",
- "document": {
- "number": "string",
- "type": "CPF"
}
}, - "dateNextIssue": "2019-08-24",
- "dateLastPaid": "2019-08-24",
- "dateFirst": "2019-08-24",
- "daysBeforeExpiration": 0,
- "frequency": "MONTHLY",
- "quantity": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
id required | string Subscription Code |
{- "id": 0,
- "invoice": "string",
- "callbackUrl": "string",
- "client": {
- "id": 0,
- "name": "string"
}, - "status": {
- "id": 1,
- "name": "ACTIVE"
}, - "instructions": "string",
- "amountCents": 0,
- "sender": {
- "name": "string",
- "document": "string",
- "helpdesk": "string"
}, - "buyer": {
- "name": "string",
- "document": {
- "number": "string",
- "type": "CPF"
}
}, - "dateNextIssue": "2019-08-24",
- "dateLastPaid": "2019-08-24",
- "dateFirst": "2019-08-24",
- "daysBeforeExpiration": 0,
- "frequency": "MONTHLY",
- "quantity": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Creates preview of the due date and generation date of future charges.
A total of maximum 6 charges will be returned.
dateFirst required | string <date> non-empty |
daysBeforeExpiration required | integer |
frequency required | string non-empty Enum: "WEEKLY" "MONTHLY" |
quantity | integer |
{- "dateFirst": "string",
- "daysBeforeExpiration": 0,
- "frequency": "string",
- "quantity": "string"
}
[- {
- "index": 0,
- "dateExpiration": "string",
- "dateIssue": "string"
}
]