Creating charges
POST/paymentlink/create
This endpoint allows the creation of a new charge via API, using the payment link model.
Request​
Header Parameters
Authentication Token.
- application/json
Body
required
charge
object
required
Charge name.
Charge description.
Possible values: <= 15 characters
Payment order identifier.
Possible values: <= 1000 characters
URL redirect.
payment
required
Payment methods that will be included in the charge.
Mandatory if the value 'BRCODE' is passed in the payment_methods field.
amounts
object
Billing amounts. The sum cannot exceed 999999999 (R$9,999,999.99)
Value of the product of the charge. Value only in cents e.g. R$100 is equivalent to R$1.0
Shipping cost of collection. Value only in cents e.g. R$100 is equivalent to R$1.0
options
object
required
Billing options.
Field used to inform whether the requester authorizes create a pix key for the user, if one does not exist.
Field used to inform the maximum number of installments for a charge. This field is mandatory when 'payment_methods' contains the value 'CREDIT_CARD'.
Field used to inform the charge expiration date.
Responses​
- 201
- 422
- 503
Charge created.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Qrcode generated for payment.
Charge name.
Charge description.
Charge amount in cents.
Charge link.
Charge deeplink.
Pix key.
Transaction code txid.
Payments method.
Payment Methods.
Current billing status.
Charge name.
Expirate date.
maximum number of installments.
maximum number of installments.
Maximum amount of payments accepted.
details
required
Product value in cents.
Shipping cost in cents.
Order number.
URL redirect
{
"brcode": "00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***63041D3D",
"name": "Banana Fantasia Pag2",
"description": "Descrição de teste 1",
"amount": 3500,
"link": "https://link.picpay.com/p/1688060808649dc38881cdc",
"deeplink": "https://cobranca.picpay.com/p/1688060808649dc38881cdc",
"pixKey": "13d7eaf0-222c-4858-9722-75ba8f81443f",
"txid": "PPJ-P2B-1fg34glo9-0015-F12345678",
"paymentMethods": [
"BRCODE",
"CREDIT_CARD"
],
"paymentBrcodeArrangements": [
"PICPAY",
"PIX"
],
"status": "active",
"chargeName": "BRCODE charge",
"expirationDate": "2024-03-27T00:00:00.000000Z",
"ppMaxInstallmentNumber": null,
"cardMaxInstallmentNumber": null,
"maxPaymentQuantity": 10,
"details": {
"productAmount": 3000,
"deliveryAmount": 500,
"orderNumber": "01234abc",
"redirectURL": "https://translate.google.com.br/?sl=auto&tl=pt&op=translate"
}
}
{
"brcode": "00020126730015COM.PICPAY.LINK0150https://...",
"name": "Pera ME",
"description": null,
"amount": 3500,
"link": "https://link.picpay.com/p/...",
"deeplink": "https://cobranca.picpay.com/p/...",
"pixKey": null,
"txid": null,
"paymentMethods": [
"BRCODE"
],
"paymentBrcodeArrangements": [
"PICPAY"
],
"status": "active",
"chargeName": "BRCODE and CREDIT_CARD Payment",
"expirationDate": null,
"ppMaxInstallmentNumber": null,
"cardMaxInstallmentNumber": null,
"maxPaymentQuantity": null,
"details": {
"orderNumber": "XPTO-1234",
"productAmount": 3000,
"deliveryAmount": 500,
"redirectURL": null
}
}
Business rules error.
- application/json
- Schema
- Example (from schema)
- Example
Schema
errors
required
{
"errors": {
"message": "Seller conta liquidação não é elegÃvel para pix.",
"type": "pix",
"code": "B001"
}
}
{
"error": {
"message": "Seller conta liquidação não é elegÃvel para pix.",
"type": "pix",
"code": "B001"
}
}
Integration errors with other services.
- application/json
- Schema
- Example (from schema)
- Example
Schema
errors
required
{
"errors": {
"message": "Erro de comunicação.",
"type": "pix",
"code": "C001"
}
}
{
"error": {
"message": "Erro de comunicação.",
"type": "pix",
"code": "C001"
}
}