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:
- Query for the bill information
- With the response, the
client system
must validate some information before the payment.- Validate bill payment
status
. The payment only will be made for bills withstatus
equals toPENDING_PAYMENT
. - Validate the
isAllowPartialPayment
flag, where this indicates whether partial payment is allowed. If this flag istrue
, check the range of values according to the information present in the payment calculation objectpaymentCalculation
.
- Validate bill payment
- 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
Name | Description |
---|---|
x-delbank-api-key | Required. 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"
}
}
Name | Type | Description |
---|---|---|
type | enum | Payment type. Domains: - BANKSLIP - TAXES - Fee or Taxes |
status | enum | Payment status. Domains: - PAID - PENDING_PAYMENT - BLOCKED_PAYMENT - PAYMENT_DEADLINE_EXCEEDED |
amount | number | Payment amount |
dueDate | datetime | Expire date, including the hour. |
barCode | string | Bar code |
digitableLine | string | Digitable line |
isAllowPartialPayment | boolean | Flag that allows partial payment |
payer | object | Payer information |
payer.document | string | Payer document |
payer.name | string | Payer name |
payer.type | enum | Payer document type. Domains: - NATURAL - Natural Person- LEGAL - Legal Person |
issuer | object | Issuing bank information |
issuer.ispb | string | Issuing bank ISPB |
issuer.name | string | Issuing bank name |
issuer.nameFantasy | string | Issuing bank fantasy name |
beneficiary | object | Beneficiary information |
beneficiary.name | string | Beneficiary name |
beneficiary.document | string | Beneficiary document |
overduePaymentInterest | object | Interest parameters |
overduePaymentInterest.date | date | Reference date for applying interest |
overduePaymentInterest.amount | number | Interest charge type: |
overduePaymentFine.type | enum | Interest charge type. Domains: - PERCENTAGE - FIXED - Absolute value |
overduePaymentFine | object | Fine parameters object |
overduePaymentInterest.date | date | Reference date for applying the fine |
overduePaymentInterest.amount | number | Reference amount when applying the fine |
overduePaymentFine.type | enum | Fine types: - PERCENTAGE - FIXED - Absolute value |
paymentCalculation | object | Auxiliary information for use during payment calculation |
paymentCalculation.rebateAmount | number | Rebate amount (Bank slip) |
paymentCalculation.interesetAmount | number | Total interest amount |
paymentCalculation.fineAmount | number | Total fine amount |
paymentCalculation.discountAmoun | number | Total discount amount |
paymentCalculation.chargedAmount | number | Total amount to be charged |
paymentCalculation.minimumPaymentAmount | number | Minimum payment amount |
paymentCalculation.maximumPaymentAmount | number | Maximum 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
Name | Description |
---|---|
x-delbank-api-key | Required. API key |
IdempotencyKey | Required. Request's idempotency key. Provide a GUID, being a new one for each request. |
Body
Name | Type | Description |
---|---|---|
amount | number | Required. Payment amount |
barCode | string | Bill payment barcode * Use this information if you do not provide the digitableLine |
digitableLine | string | Typeable bill payment line * Use this information if you do not provide the barCode |
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.