Link de pagamento

Link de pagamento

Segurança

📘

BTG Id

O Authorization Server do BTG Empresas se chama BTG Id. Usando o BTG Id, um aplicativo parceiro consegue consentimento e autorização para executar operações nas APIs do BTG em nome do cliente. Para saber mais, acesse a documentação do BTG Id

Escopos necessários

O token para consumir a API de Pagamentos deve ser gerado usando o Authorization Code.

O escopo openid é obrigatório. Ele permite consultar o perfil do usuário BTG com acesso à conta.

É necessário escolher um dos seguintes escopos:

EscopoDescrição
brn:btg:empresas:payment-linkPermite a criação e o manejo de links de pagamentos e o recebimento de webhooks.
brn:btg:empresas:payment-link.readonlyPermite a consulta de links de pagamentos e o recebimento de webhooks.

Dicionário de Termos

TermoDescrição
companyIdCNPJ da conta emitindo o link de pagamento
payeeRecebedor do link de pagamento
payerPagador do link de pagamento

Eventos de webhook

Os payloads disponíveis abaixo representam o conteúdo do campo data, seguindo o formato do envio descrito em Eventos.

Por segurança, o taxId do pagador (payer.taxId) é enviado mascarado nos payloads de webhook.

EventoDescrição
payment-link.createdLink de pagamento criado.
payment-link.activatedLink de pagamento ativado.
payment-link.paidLink de pagamento pago.
payment-link.updatedLink de pagamento atualizado.
payment-link.expiredLink de pagamento expirado.
payment-link.cancelledLink de pagamento cancelado.
payment-link.failedFalha no processamento do link de pagamento.

payment-link.created

{
  "id": "8d241f83-6d04-457b-9cd4-eebc253a34fd",
  "name": "Link de pagamento teste",
  "payee": {
    "name": "COMDATA TELECOM LTDA",
    "personType": "J",
    "taxId": "50523744000169",
    "accountNumber": "008656317"
  },
  "payer": {
    "name": "JUAREZ BASTOS CUNHA",
    "personType": "F",
    "taxId": "***414325**"
  },
  "amount": 149,
  "paymentMethods": ["BANKSLIP"],
  "schedule": {
    "startAt": "2025-07-30T11:26:55.772Z",
    "endAt": "2025-08-15T11:26:55.772Z"
  },
  "createdAt": "2025-07-30",
  "updatedAt": "2025-07-30",
  "origin": "DEVELOPERS",
  "deliveryMediums": [],
  "linkUrl": "https://link.btgpactual.com/8d241f83",
  "type": "SINGLE"
}

payment-link.activated

{
  "id": "8d241f83-6d04-457b-9cd4-eebc253a34fd",
  "name": "Link de pagamento teste",
  "payee": {
    "name": "COMDATA TELECOM LTDA",
    "personType": "J",
    "taxId": "50523744000169",
    "accountNumber": "008656317"
  },
  "payer": {
    "name": "JUAREZ BASTOS CUNHA",
    "personType": "F",
    "taxId": "***414325**"
  },
  "amount": 149,
  "paymentMethods": ["BANKSLIP"],
  "schedule": {
    "startAt": "2025-07-30T11:26:55.772Z",
    "endAt": "2025-08-15T11:26:55.772Z"
  },
  "createdAt": "2025-07-30",
  "updatedAt": "2025-07-30",
  "origin": "DEVELOPERS",
  "deliveryMediums": [],
  "linkUrl": "https://link.btgpactual.com/8d241f83",
  "type": "SINGLE"
}

payment-link.paid

{
  "id": "8d241f83-6d04-457b-9cd4-eebc253a34fd",
  "name": "Link de pagamento teste",
  "payee": {
    "name": "COMDATA TELECOM LTDA",
    "personType": "J",
    "taxId": "50523744000169",
    "accountNumber": "008656317"
  },
  "payer": {
    "name": "JUAREZ BASTOS CUNHA",
    "personType": "F",
    "taxId": "***414325**"
  },
  "amount": 149,
  "paymentMethods": ["BANKSLIP"],
  "schedule": {
    "startAt": "2025-07-30T11:26:55.772Z",
    "endAt": "2025-08-15T11:26:55.772Z"
  },
  "createdAt": "2025-07-30",
  "updatedAt": "2025-08-11",
  "origin": "DEVELOPERS",
  "deliveryMediums": [],
  "linkUrl": "https://link.btgpactual.com/8d241f83",
  "type": "SINGLE"
}

payment-link.updated

{
  "id": "8d241f83-6d04-457b-9cd4-eebc253a34fd",
  "name": "Link de pagamento teste",
  "payee": {
    "name": "COMDATA TELECOM LTDA",
    "personType": "J",
    "taxId": "50523744000169",
    "accountNumber": "008656317"
  },
  "payer": {
    "name": "JUAREZ BASTOS CUNHA",
    "personType": "F",
    "taxId": "***414325**"
  },
  "amount": 149,
  "paymentMethods": ["BANKSLIP"],
  "schedule": {
    "startAt": "2025-07-30T11:26:55.772Z",
    "endAt": "2025-08-15T11:26:55.772Z"
  },
  "createdAt": "2025-07-30",
  "updatedAt": "2025-08-11",
  "origin": "DEVELOPERS",
  "deliveryMediums": [],
  "linkUrl": "https://link.btgpactual.com/8d241f83",
  "type": "SINGLE"
}

payment-link.expired

{
  "id": "8d241f83-6d04-457b-9cd4-eebc253a34fd",
  "name": "Link de pagamento teste",
  "payee": {
    "name": "COMDATA TELECOM LTDA",
    "personType": "J",
    "taxId": "50523744000169",
    "accountNumber": "008656317"
  },
  "payer": {
    "name": "JUAREZ BASTOS CUNHA",
    "personType": "F",
    "taxId": "***414325**"
  },
  "amount": 149,
  "paymentMethods": ["BANKSLIP"],
  "schedule": {
    "startAt": "2025-07-30T11:26:55.772Z",
    "endAt": "2025-08-15T11:26:55.772Z"
  },
  "createdAt": "2025-07-30",
  "updatedAt": "2025-08-15",
  "origin": "DEVELOPERS",
  "deliveryMediums": [],
  "linkUrl": "https://link.btgpactual.com/8d241f83",
  "type": "SINGLE"
}

payment-link.cancelled

{
  "id": "8d241f83-6d04-457b-9cd4-eebc253a34fd",
  "name": "Link de pagamento teste",
  "payee": {
    "name": "COMDATA TELECOM LTDA",
    "personType": "J",
    "taxId": "50523744000169",
    "accountNumber": "008656317"
  },
  "payer": {
    "name": "JUAREZ BASTOS CUNHA",
    "personType": "F",
    "taxId": "***414325**"
  },
  "amount": 149,
  "paymentMethods": ["BANKSLIP"],
  "schedule": {
    "startAt": "2025-07-30T11:26:55.772Z",
    "endAt": "2025-08-15T11:26:55.772Z"
  },
  "createdAt": "2025-07-30",
  "updatedAt": "2025-08-11",
  "origin": "DEVELOPERS",
  "deliveryMediums": [],
  "linkUrl": "https://link.btgpactual.com/8d241f83",
  "type": "SINGLE"
}

payment-link.failed

{
  "id": "8d241f83-6d04-457b-9cd4-eebc253a34fd",
  "name": "Link de pagamento teste",
  "payee": {
    "name": "COMDATA TELECOM LTDA",
    "personType": "J",
    "taxId": "50523744000169",
    "accountNumber": "008656317"
  },
  "payer": {
    "name": "JUAREZ BASTOS CUNHA",
    "personType": "F",
    "taxId": "***414325**"
  },
  "amount": 149,
  "paymentMethods": ["BANKSLIP"],
  "schedule": {
    "startAt": "2025-07-30T11:26:55.772Z",
    "endAt": "2025-08-15T11:26:55.772Z"
  },
  "createdAt": "2025-07-30",
  "updatedAt": "2025-08-11",
  "origin": "DEVELOPERS",
  "deliveryMediums": [],
  "linkUrl": "https://link.btgpactual.com/8d241f83",
  "type": "SINGLE"
}