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.

StateDescriptionTransitions toTrigger/Event
CREATEDInitial state when the charge is created.- PENDING- Charge is initiated but not yet processed by the OF network
PENDINGThe 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.
SCHEDULEDThe 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.
SUCCEEDEDThe charge has been successfully processed.(End state - no further transitions)-
CANCELEDThe charge has been canceled.(End state - no further transitions)-
FAILEDThe 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"
  }
}

ParameterTypeDescriptionExample
idstringBelvo's unique identifier for the Charge.0d3ffb69-f83b-456e-ad8e-208d0998d71d
created_atstringThe ISO-8601 timestamp of when the data point was created in Belvo's database.2022-02-09T08:45:50.406032Z
updated_atstringThe ISO-8601 timestamp of when the Charge was last updated.2022-02-09T08:45:50.406032Z
created_bystringBelvo's unique ID for the user that created this item.bcef7f35-67f2-4b19-b009-cb38795faf09
customerstringBelvo's unique ID for the customer related to this Charge.531aa631-70a0-4eeb-ab97-51dea3e90c89
payment_intentstringBelvo's unique identifier for the Payment Intent associated with this Charge.50c04229-7b1d-4a53-951c-8ad53e10c6ca
statusstringThe current status of the charge. Can be one of the following values: CANCELED, PENDING , SCHEDULED , SUCCEEDED, FAILED , or PARTIALPENDING
amountstringThe amount of the charge.100.12
currencystringThe currency of the amount paid. For 🇧🇷 Brazil, the value must be BRL (Brazilian Real).BRL
descriptionstringThe description of the payment.Training shoes
statement_descriptionstringThe description that will appear on the customer's bank statement (if provided).Super Shoe Store - Brown Sneakers
beneficiarystringBelvo's unique ID used to identify the beneficiary’s bank account.58524ccc-89ac-4ab6-b62b-c3da3f19a722
payment_method_typestringType of payment methodopen_finance
payment_method_detailsobjectID of the payer institutionSee the payment_method_details section for details.
payment_method_informationobjectProvider request IDSee the payment_method_information section for details.
transactionsarray of objectsList of related transactionsSee our dedicated Transaction (OFPI) Model and States article.
failure_codestring or nullFailure code, if anynull
failure_messagestring or nullFailure message, if anynull
metadata.internal_reference_idstringInternal reference IDGGq73487w2

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.

ParameterTypeDescriptionExample
beneficiary_bank_accountstringBelvo's unique ID used to identify the beneficiary's bank account.a80d5a9d-20ae-479a-8dd7-ff3443bcbbfc
payer_institutionstringBelvo's unique identifier for the payer's institution.600f1b4a-1ef9-4f89-b341-1a35f0c32cc0
callback_urlstringThe callback URL that your user will be redirected to after confirming the payment in their banking application.https://www.acmecorp.com/checkout/3487321
cpfstringThe customer's CPF number. Only required when the customer is a BUSINESS.

> Note: This value is obfuscated.
23******00
scheduleobjectDetails 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.

ParameterTypeDescriptionExample
provider_request_idstringUnique ID for the payment, as sent by the provider.978c0c97ea847e78e8849634473c1f1
redirect_urlstringThe URL that redirects the user to their institution's website to authorize the payment.https://wakandanational.com/
end_to_end_idstringA unique ID for the transaction in the Brazil's PIX payment systemF203262942022211117487a213b1d140
settlement_datestring (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