Charge (OFPI) Model and States
Reference information regarding the Charges resource (Payments Brazil).
A Charge in OFPI represents the actual payment that needs to be made in Brazil's Open FInance Network.
Charge States
Below we outline the various states in the OFPI charge process, detailing the possible transitions between these states and describing the conditions under which these transitions occur. Please see the table below to get a comprehensive overview of each state and the flow of the charge process.
State | Description | Transitions to | Trigger/Event |
---|---|---|---|
CREATED | Initial state when the charge is created. | - PENDING | - Charge is initiated but not yet processed by the OF network |
PENDING | The charge is awaiting further action or scheduling. | - SCHEDULED - SUCCEEDED - CANCELED - FAILED | - Charge is scheduled for processing - The Charge has successfully been processed in the OF netowrk - Charge is canceled by OF network while pending - Charge fails in the OF network while pending. |
SCHEDULED | The charge is scheduled for processing at a future date. | - SUCCEEDED - CANCELED - FAILED | - Charge is successfully processed - Charge is canceled while scheduled - Charge fails while scheduled. |
SUCCEEDED | The charge has been successfully processed. | (End state - no further transitions) | - |
CANCELED | The charge has been canceled. | (End state - no further transitions) | - |
FAILED | The charge has failed. | (End state - no further transitions) | - |
Charge Model
{
"id": "0d3ffb69-f83b-456e-ad8e-208d0998d71d",
"created_at": "2022-02-09T08:45:50.406032Z",
"updated_at": "2022-02-09T08:45:50.406032Z",
"created_by": "bcef7f35-67f2-4b19-b009-cb38795faf09",
"customer": "531aa631-70a0-4eeb-ab97-51dea3e90c89",
"payment_intent": "50c04229-7b1d-4a53-951c-8ad53e10c6ca",
"status": "PENDING",
"amount": "100.12",
"currency": "BRL",
"description": "Training shoes",
"statement_description": "Super Shoe Store - Brown Sneakers",
"beneficiary": "58524ccc-89ac-4ab6-b62b-c3da3f19a722",
"payment_method_type": "open_finance",
"payment_method_details": {}, // See the dedicated payment_method_details section
"payment_method_information": {}, // See the dedicated payment_method_information section
"transactions": [], // See our dedicated Transactions (OFPI) Model and States article
"failure_code": null,
"failure_message": null,
"metadata": {
"internal_reference_id": "GGq73487w2"
}
}
Parameter | Type | Description | Example |
---|---|---|---|
id | string | Belvo's unique identifier for the Charge. | 0d3ffb69-f83b-456e-ad8e-208d0998d71d |
created_at | string | The ISO-8601 timestamp of when the data point was created in Belvo's database. | 2022-02-09T08:45:50.406032Z |
updated_at | string | The ISO-8601 timestamp of when the Charge was last updated. | 2022-02-09T08:45:50.406032Z |
created_by | string | Belvo's unique ID for the user that created this item. | bcef7f35-67f2-4b19-b009-cb38795faf09 |
customer | string | Belvo's unique ID for the customer related to this Charge. | 531aa631-70a0-4eeb-ab97-51dea3e90c89 |
payment_intent | string | Belvo's unique identifier for the Payment Intent associated with this Charge. | 50c04229-7b1d-4a53-951c-8ad53e10c6ca |
status | string | The current status of the charge. Can be one of the following values: CANCELED , PENDING , SCHEDULED , SUCCEEDED , FAILED , or PARTIAL | PENDING |
amount | string | The amount of the charge. | 100.12 |
currency | string | The currency of the amount paid. For 🇧🇷 Brazil, the value must be BRL (Brazilian Real). | BRL |
description | string | The description of the payment. | Training shoes |
statement_description | string | The description that will appear on the customer's bank statement (if provided). | Super Shoe Store - Brown Sneakers |
beneficiary | string | Belvo's unique ID used to identify the beneficiary’s bank account. | 58524ccc-89ac-4ab6-b62b-c3da3f19a722 |
payment_method_type | string | Type of payment method | open_finance |
payment_method_details | object | ID of the payer institution | See the payment_method_details section for details. |
payment_method_information | object | Provider request ID | See the payment_method_information section for details. |
transactions | array of objects | List of related transactions | See our dedicated Transaction (OFPI) Model and States article. |
failure_code | string or null | Failure code, if any | null |
failure_message | string or null | Failure message, if any | null |
metadata.internal_reference_id | string | Internal reference ID | GGq73487w2 |
payment_method_details
{
"payment_method_details": {
"open_finance": {
"beneficiary_bank_account": "a80d5a9d-20ae-479a-8dd7-ff3443bcbbfc",
"payer_institution": "600f1b4a-1ef9-4f89-b341-1a35f0c32cc0",
"callback_url": "https://www.acmecorp.com/checkout/3487321"
}
}
}
{
"payment_method_details": {
"open_finance": {
"beneficiary_bank_account": "a80d5a9d-20ae-479a-8dd7-ff3443bcbbfc",
"payer_institution": "600f1b4a-1ef9-4f89-b341-1a35f0c32cc0",
"callback_url": "https://www.acmecorp.com/checkout/3487321",
"cpf": "23******00"
}
}
}
In the open_finance
object of payment_method_details
, we provide you with details regarding the OFPI payment intent.
Parameter | Type | Description | Example |
---|---|---|---|
beneficiary_bank_account | string | Belvo's unique ID used to identify the beneficiary's bank account. | a80d5a9d-20ae-479a-8dd7-ff3443bcbbfc |
payer_institution | string | Belvo's unique identifier for the payer's institution. | 600f1b4a-1ef9-4f89-b341-1a35f0c32cc0 |
callback_url | string | The callback URL that your user will be redirected to after confirming the payment in their banking application. | https://www.acmecorp.com/checkout/3487321 |
cpf | string | The customer's CPF number. Only required when the customer is a BUSINESS .> Note: This value is obfuscated. | 23******00 |
schedule | object | Details regarding the scheduled or recurring payment. |
payment_method_information
{
"payment_method_information": {
"open_finance": {
"provider_request_id": "978c0c97ea847e78e8849634473c1f1",
"redirect_url": "https://wakandanational.com/",
"end_to_end_id": "F203262942022211117487a213b1d140",
"settlement_date": "2024-10-22"
}
}
}
In the open_finance
object of payment_method_information
, we provide you with details regarding the payment within the Open Finance Network.
Parameter | Type | Description | Example |
---|---|---|---|
provider_request_id | string | Unique ID for the payment, as sent by the provider. | 978c0c97ea847e78e8849634473c1f1 |
redirect_url | string | The URL that redirects the user to their institution's website to authorize the payment. | https://wakandanational.com/ |
end_to_end_id | string | A unique ID for the transaction in the Brazil's PIX payment system | F203262942022211117487a213b1d140 |
settlement_date | string (date) | The settlement_date field indicates the date on which a scheduled payment (charge) is planned to be settled. This field is relevant in various states of the charge's lifecycle:- Scheduled Charges: When a charge has the status SCHEDULED this field represents the planned settlement date.- Completed Charges: When a charge has the status SUCCEEDED , this field reflects the date that the payment was made.- Failed or Canceled Charges: When a charge has the status CANCELED or FAILED , this field will still contain the originally calculated settlement date, indicating when the charge was intended to be settled.> Note: The settlement_date does not change based on the success or failure of the charge. It consistently reflects the original planned settlement date. | 2024-10-22 |
Updated 28 days ago