支付征税发票(协议/税务)
此端点用于支付征税发票。支付必须在查询之后进行,使用查询返回的信息以确保流程正常运行,避免支付过程中出现失败。
征税发票
此类账单由服务特许经营商(水、电、电话和燃气账单)和政府机构(税务)开具。它们未在银行间支付结算所(CIP/Núclea)登记,因此返回的信息与银行票据不同。
Request
请求端点
ENDPOINT
/account/ACCOUNT_KEY/payment/collection_slipMÉTODO
POST请求路径参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
account_key * | uuid4 | 账户唯一标识键。 | 36 |
Request Body: 使用数字行支付征税发票
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"digitable_line": "00190000090361557400500000024174396700000991000",
"payment_amount": 1156.8
}
Request Body: 使用条形码支付征税发票
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"barcode": "00190000090361557400500000024174396700000991000",
"payment_amount": 1156.8
}
Body 参数
| 字段 | 类型 | 描述 |
|---|---|---|
request_control_key * | uuid4 | 客户请求唯一标识键。 |
barcode | string | 条形码。 |
digitable_line | string | 数字行。 |
payment_amount * | number | 待 支付金额。 |
警告
payment_amount 必须始终等于银行票据查询返回的 total_amount。
Response
成功响应
STATUS
201Response Body: 支付已执行
{
"payment_key": "33860ad0-bcb0-47b7-bbe7-c7e3ec2fc61a",
"request_control_key": "ae4508df-f2cb-4e28-9f04-a19b7f2758c9",
"payer_name": "COOPERATIVA INDUSTRIAL MURILO",
"payer_document_number": "62069937000118",
"source_account_key": "daae79e6-ee8b-449f-aa1e-96959d5d5a72",
"transaction_key": "fc9ccfd0-2f21-4207-9772-69238be74152",
"transaction_revert_key": null,
"paid_amount": 1389.21,
"payment_date": "2024-04-30",
"payment_type": "collection_slip",
"bank_slip": null,
"collection_slip": {
"barcode": null,
"digitable_line": "836200000138892100450006762142420244046000010192",
"collection_name": "CIA ULTRAGAZ SA-COD",
"collection_document_number": "00394460005887",
"expiration_date": "2024-04-15",
"total_amount": 1389.21
},
"payment_status": "executed"
}
STATUS
202Webhook
当支付返回状态 202 时,处理仍在进行中。在通过 webhook 收到最终状态更新之前,请勿重试支付。
Response Body: 支付待处理
{
"payment_key": "33860ad0-bcb0-47b7-bbe7-c7e3ec2fc61a",
"request_control_key": "ae4508df-f2cb-4e28-9f04-a19b7f2758c9",
"payer_name": "COOPERATIVA INDUSTRIAL MURILO",
"payer_document_number": "62069937000118",
"source_account_key": "daae79e6-ee8b-449f-aa1e-96959d5d5a72",
"transaction_key": "fc9ccfd0-2f21-4207-9772-69238be74152",
"transaction_revert_key": null,
"paid_amount": 1389.21,
"payment_date": "2024-04-30",
"payment_type": "collection_slip",
"bank_slip": null,
"collection_slip": {
"barcode": null,
"digitable_line": "836200000138892100450006762142420244046000010192",
"collection_name": "CIA ULTRAGAZ SA-COD",
"collection_document_number": "00394460005887",
"expiration_date": "2024-04-15",
"total_amount": 1389.21
},
"payment_status": "pending"
}
Response Body 参数
| 字段 | 类型 | 描述 |
|---|---|---|
payment_key * | uuid4 | 支付唯一标识键。 |
request_control_key * | uuid4 | 客户请求唯一标识键。 |
payer_name * | string | 实际付款人姓名。 |
payer_document_number * | string | 实际付款人文件号码(CPF/CNPJ)。 |
source_account_key * | uuid4 | 被扣款账户的键。 |
transaction_key * | uuid4 | 支付交易键。 |
transaction_revert_key | uuid4 | 支付冲销交易键。 |
paid_amount * | number | 实际支付金额。 |
payment_date * | string | 支付日期。 |
payment_type * | enum | 支付类型。 |
bank_slip | object | 银行票据。 |
collection_slip | object | 征税发票。 |
payment_status * | enum | 支付状态。 |
payment_type 枚举值
| 枚举值 | 类型 | 描述 |
|---|---|---|
bank_slip | string | 银行票据 |
collection_slip | string | 征税发票 |
警告
bank_slip 枚举值不适用于征税发票流程,bank_slip 对象也始终为空。
payment_status 枚举值
| 枚举值 | 描述 |
|---|---|
pending | 待处理 |
executed | 已执行 |
reverted | 已冲销 |
rejected | 已拒绝 |
error | 错误 |
collection_slip 对象
| 字段 | 类型 | 描述 |
|---|---|---|
barcode | string | 条形码。 |
digitable_line | string | 数字行。 |
collection_name * | string | 协议名称。 |
collection_document_number | string | 协议文件号码(CPF/CNPJ)。 |
expiration_date * | string | 到期日期。 |
total_amount * | number | 总金额。 |
错误响应
STATUS
4XXResponse Body
{
"title": "Título",
"description": "Description in english",
"translation": "Descrição em português",
"code": "Código"
}
| HTTP 代码 | QI 代码 | 标题 | 描述(英文) | 描述(葡文) |
|---|---|---|---|---|
| 400 | BIP000032 | Bad Request | The bill sent does not correspond to a collection slip. | A conta enviada não corresponde a uma fatura de recolhimento. |
| 400 | BIP000033 | Bad Request | The barcode or digitable line of the collection slip must have 44 or 48 characters. | O código de barras ou linha digitável da fatura de recolhimento deve ter 44 ou 48 caracteres. |
| 403 | BIP000010 | Forbidden | User is not allowed to do this action | Usuário não tem autorização para fazer essa ação |
| 404 | BIP000011 | Not Found | The source account key was not found. | A chave da conta de origem não foi encontrada. |
| 400 | BIP000012 | Bad Request | It was not possible to consult the source account at this time. Please try again in a few minutes. | Não foi possível consultar a conta de origem neste momento. Por favor, tente novamente em alguns minutos. |
| 400 | BIP000013 | Bad Request | The source account is closed. | A conta de origem está fechada. |
| 400 | BIP000014 | Bad Request | The source account is blocked. | A conta de origem está bloqueada. |
| 400 | BIP000023 | Bad Request | The source account has insufficient balance. Payment cannot be made. | A conta de origem possui saldo insuficiente. Pagamento não pode ser realizado. |
| 400 | BIP000024 | Bad Request | Request control key already exists. | Chave de controle da requisição já existe. |
| 400 | BIP000028 | Bad Request | The source account has blocked balance. Payment cannot be made. | A conta de origem possui saldo em conta bloqueado. Pagamento não pode ser realizado. |
| 400 | BIP000034 | Bad Request | Collection slip already paid. | Fatura de recolhimento já paga. |
| 400 | BIP000035 | Bad Request | Covenant slip invalid barcode. | Código de barras da fatura de recolhimento inválido. |
| 400 | BIP000036 | Bad Request | Covenant slip overdue. | Fatura de recolhimento vencida. |
| 400 | BIP000037 | Bad Request | Error in collection slip consultation. | Erro na consulta da fatura de recolhimento. |
| 400 | BIP000038 | Bad Request | Outside of covenant payment hours. | Fora do horário de pagamento do convênio. |
| 400 | BIP000039 | Bad Request | Collection slip not accepted. | Fatura de recolhimento não aceita. |
| 400 | BIP000040 | Bad Request | Minimum advance not reached. | Mínimo de dias de adiantamento não atingido. |
| 400 | BIP000041 | Bad Request | Max payment amount exceeded. | Valor máximo de pagamento excedido. |
| 400 | BIP000044 | Bad Request | It was not possible to pay the collection slip at this time. Please verify your information and, if necessary, contact us for assistance. | Não foi possível pagar a fatura de recolhimento neste momento. Por favor, verifique suas informações e, se necessário, entre em contato conosco para assistência. |
| 400 | BIP000045 | Bad Request | Collection slip payment service is closed. | Serviço de pagamento de fatura de recolhimento está fechado. |
Sandbox 环境
在我们的 sandbox 环境中,我们提供了模拟的数字行,用于模拟成功支付和测试错误场景。
成功场景
| 数字行 |
|---|
| 828300000007411100972013905080001546763201900028 |
| 838000000009235700481007241345219112001474229880 |
| 848000000006308600802021201071261517689002201070 |
| 858200000015000000643025703477209504800448091020 |
错误场景
| 数字行 | 错误代码 |
|---|---|
| 858500000037350000643217212883260006147448091022 | BIP000035 |