---
agentTools:
  projectIndex: https://mk-bank.readme.io/llms.txt
---

# Authorize Bill Payment

The Authorize Bill Payment endpoint allows you to authorize a bill payment by providing either a barcode string or a digitable line. This endpoint is used when you want to initiate a bill payment transaction. You can include either the barcode or the digitable line in the request body, depending on the available information.

> ❗ Pay attention!
>
> This Endpoint is for use in a production environment, it is not possible to test in a staging environment

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "MK Bank Account API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://core-h.mkbank.com.br/api"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/bill_payment/authorize": {
      "post": {
        "summary": "Authorize Bill Payment",
        "description": "The Authorize Bill Payment endpoint allows you to authorize a bill payment by providing either a barcode string or a digitable line. This endpoint is used when you want to initiate a bill payment transaction. You can include either the barcode or the digitable line in the request body, depending on the available information.",
        "operationId": "authorize-bill-payment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "barcode": {
                    "type": "string",
                    "description": "Barcode string read by a barcode reader. Required if \"digitable\" is not present."
                  },
                  "digitable": {
                    "type": "string",
                    "description": "Digitable line of a bill. Required if \"barcode\" is not present."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "\"response\": {\n    \"assignor\": \"BANCO DO BRASIL S.A.\",\n    \"registerData\": {\n      \"documentRecipient\": \"00.0001/0001-00\",\n      \"documentPayer\": \"000.000.000-00\",\n      \"payDueDate\": \"2023-07-31T00:00:00\",\n      \"nextBusinessDay\": null,\n      \"dueDateRegister\": \"2023-07-31T00:00:00\",\n      \"allowChangeValue\": false,\n      \"recipient\": \"PICPAY INSTITUICAO DE PAGAMENTO S.A.\",\n      \"payer\": \"João teste\",\n      \"discountValue\": 0,\n      \"interestValueCalculated\": 0,\n      \"maxValue\": 1000,\n      \"minValue\": 1000,\n      \"fineValueCalculated\": 0,\n      \"originalValue\": 1000,\n      \"totalUpdated\": 1000,\n      \"totalWithDiscount\": 0,\n      \"totalWithAdditional\": 0\n    },\n    \"settleDate\": \"26/07/2023\",\n    \"dueDate\": \"2023-07-31T00:00:00Z\",\n    \"endHour\": \"20:00\",\n    \"initeHour\": \"07:00\",\n    \"nextSettle\": \"N\",\n    \"digitable\": \"0019000009034060980059125176494280000100000\",\n    \"transactionId\": 1653652231,\n    \"type\": 2,\n    \"value\": 1000,\n    \"maxValue\": null,\n    \"minValue\": null,\n    \"errorCode\": \"000\",\n    \"message\": null,\n    \"status\": 0,\n    \"validation_code\": \"fYorayRdSKqNeDX42vGrNef1jrefWCM74jNcbRlo2cU1kjgrd52jugvetXAB\"\n  },"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "\"response\": {\n    \"message\": \"(642) CODIGO DE BARRAS NAO LOCALIZADO NA BASE CENTRALIZADA\",\n    \"code\": \"BILL_PAYMENT_AUTHORIZE_ERROR\",\n    \"data\": []"
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "6297b52a229a9b00142bff3c:62a784d0180ba100824a1665"
}
```