API Reference
Log In

Bank slip payment or Tax

This functionality allows clients to pay bank slips and taxes (water, electricity, gas, telephone bill, etc. See the list of available agreements).

Bill payment process

The payment process consists of the following steps:

  1. Query for the bill information
  2. With the response, the client system must validate some information before the payment.
    1. Validate bill payment status. The payment only will be made for bills with status equals to PENDING_PAYMENT.
    2. Validate the isAllowPartialPayment flag, where this indicates whether partial payment is allowed. If this flag is true, check the range of values according to the information present in the payment calculation object paymentCalculation.
  3. After the necessary checks, carry out the payment process.

Checking payment information

Requisition

GET 'https://apisandbox.delbank.com.br/baas/api/v1/bill-payments/43594939800000003250001112000000200000311672'
curl -X 'GET' \
  'https://apisandbox.delbank.com.br/baas/api/v1/bill-payments/43594939800000003250001112000000200000311672' \
  -H 'x-delbank-api-key: {{apiKey}}'

Headers

NameDescription
x-delbank-api-keyRequired. API key

Path parameters:

Inform the bar code or the digitable line.

Example: https://apisandbox.delbank.com.br/baas/api/v1/bill-payments/${PAYMENT_IDENTIFIER}

Response

{
    "identifierNumber": "3023063000107986253",
    "type": "BANKSLIP",
    "status": "PAYMENT_DEADLINE_EXCEEDED",
    "amount": 3.25,
    "dueDate": "2023-07-01T19:30:00",
    "barCode": "43594939800000003250001112000000200000311672",
    "digitableLine": "43590001161200000020300003116720493980000000325",
    "isAllowPartialPayment": false,
    "paymentCalculation": {
        "rebateAmount": 0.0,
        "interesetAmount": 2.23,
        "fineAmount": 3.25,
        "discountAmount": 0.0,
        "chargedAmount": 8.73,
        "minimumPaymentAmount": 8.73,
        "maximumPaymentAmount": 8.73
    },
    "payer": {
        "document": "1234567123",
        "name": "JAMES XPTO",
        "type": "NATURAL"
    },
    "overduePaymentInterest": {
        "date": "2023-07-02",
        "amount": 23.53,
        "type": "PERCENTAGE"
    },
    "overduePaymentFine": {
        "date": "2023-07-02",
        "amount": 3.25,
        "type": "FIXED"
    },
    "discounts": [],
    "beneficiary": {
        "document": "11468192000181",
        "name": "DEL CRED NP FUNDO DE INVESTIMENTO",
        "fantasyName": "DEL CRED NP FUNDO DE INVESTIMENTO",
        "type": "LEGAL"
    },
    "issuer": {
        "ispb": "38224857",
        "name": "DELCRED SCD S.A.",
        "nameFantasy": "DELBANK"
    }
}
NameTypeDescription
typeenumPayment type. Domains:
- BANKSLIP
- TAXES - Fee or Taxes
statusenumPayment status. Domains:
- PAID
- PENDING_PAYMENT
- BLOCKED_PAYMENT
- PAYMENT_DEADLINE_EXCEEDED
amountnumberPayment amount
dueDatedatetimeExpire date, including the hour.
barCodestringBar code
digitableLinestringDigitable line
isAllowPartialPaymentbooleanFlag that allows partial payment
payerobjectPayer information
payer.documentstringPayer document
payer.namestringPayer name
payer.typeenumPayer document type. Domains:
- NATURAL - Natural Person
- LEGAL - Legal Person
issuerobjectIssuing bank information
issuer.ispbstringIssuing bank ISPB
issuer.namestringIssuing bank name
issuer.nameFantasystringIssuing bank fantasy name
beneficiaryobjectBeneficiary information
beneficiary.namestringBeneficiary name
beneficiary.documentstringBeneficiary document
overduePaymentInterestobjectInterest parameters
overduePaymentInterest.datedateReference date for applying interest
overduePaymentInterest.amountnumberInterest charge type:
overduePaymentFine.typeenumInterest charge type. Domains:
- PERCENTAGE
- FIXED - Absolute value
overduePaymentFineobjectFine parameters object
overduePaymentInterest.datedateReference date for applying the fine
overduePaymentInterest.amountnumberReference amount when applying the fine
overduePaymentFine.typeenum Fine types:
- PERCENTAGE
- FIXED - Absolute value
paymentCalculationobjectAuxiliary information for use during payment calculation
paymentCalculation.rebateAmountnumberRebate amount (Bank slip)
paymentCalculation.interesetAmountnumberTotal interest amount
paymentCalculation.fineAmountnumberTotal fine amount
paymentCalculation.discountAmounnumberTotal discount amount
paymentCalculation.chargedAmountnumberTotal amount to be charged
paymentCalculation.minimumPaymentAmountnumberMinimum payment amount
paymentCalculation.maximumPaymentAmountnumberMaximum payment amount

Carrying out the payment

Request

POST 'https://apisandbox.delbank.com.br/baas/api/v1/bill-payments'
curl --request POST \
     --url https://apisandbox.delbank.com.br/baas/api/v1/bill-payments \
     --header 'IdempotencyKey: 9d16ea35-8a85-49ea-a41e-bcf56c677129' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-delbank-api-key: {{apiKey}}' \
     --data '
{
    "amount": 691.71,
    "barCode": "43596938200000691710001112000000200000309361"
}
'

Headers

NameDescription
x-delbank-api-keyRequired. API key
IdempotencyKeyRequired. Request's idempotency key. Provide a GUID, being a new one for each request.

Body

NameTypeDescription
amountnumberRequired. Payment amount
barCodestringCódigo de barras do pagamento de contas
* Utilizar essa informação caso não informe a digitableLine
digitableLinestringTypeable bill payment line
* Utilizar essa informação caso não informe abarCode

Response

The status code 200 ensures that the transaction has succeeded.

Being successful, the return will bring the following field in Json format:

{
    "id": "1694017754",
    "identifierNumber": "3023061406106689529",
    "barCode": "43596938200000691710001112000000200000309361",
    "digitableLine": "43590001161200000020300003093614693820000069171",
    "status": "PAID",
    "dueDate": "2023-06-15T19:30:00",
    "createdAt": "2023-09-06T16:29:14.950Z",
    "originalAmount": 691.71,
    "paidAmount": 691.71,
    "paymentCalculation": {
        "rebateAmount": 0.0,
        "interesetAmount": 862.92,
        "fineAmount": 100.0,
        "discountAmount": 0.0,
        "chargedAmount": 1654.63,
        "minimumPaymentAmount": 1654.63,
        "maximumPaymentAmount": 1654.63
    },
    "beneficiary": {
        "document": "11468192000181",
        "name": "DEL CRED NP FUNDO DE INVESTIMENTO",
        "fantasyName": "DEL CRED NP FUNDO DE INVESTIMENTO",
        "type": "LEGAL"
    },
    "issuer": {
        "ispb": "38224857",
        "name": "DELCRED SCD S.A.",
        "nameFantasy": "DELBANK"
    }
}

📘

Postman Collection

For more information and request simulation, bellow is the postman collection, access Collection Postman.