Refinancing

Create payment agreement

Create a payment agreement and post the refinanced debt as new installment transactions, beginning from the currently open statement.

The statement_agreement and compulsory flags are used to specify the transaction types of the transactions that are created on the customer's statement. Here are the possible combinations.

<b>Type of payment agreement:</b> Statement agreement Description: The customer renegotiates all debt for all their statements. statement_agreement: true compulsory: false Transaction types of transactions: 712 (INSTALLMENT AGREEMENT) 711 (CREDIT BY AGREEMENT) 713 (CONTRACT AGREEMENT)

<b>Type of payment agreement:</b> Installment agreement Description: This an agreement that the customer makes with their credit card issuer stating that they aren't able to pay off their debt within the current month, so they intend to settle the amount over the next few bills. In other words, the amount that remains outstanding is added to their statement for the following month. statement_agreement: false compulsory: false Transaction types of transactions: 702 (REFINANCING INSTALLMENT) 701 (INSTALLMENT CREDIT) 703 (REFINANCING CONTRACT)

<b>Type of payment agreement:</b> Compulsory agreement Description: This is the same as an installment agreement, except that it's the result of a renegotiation that was made independently of the customer. This is mandatory in Brazil, due to a measure initiated by the Central Bank to protect customers from revolving credit interest charged on the unpaid amount of the invoice. According to this measure, after 30 days, the bank or financial institution must offer more advantageous conditions for the customer to pay off the debt. In practice, the amount owed is automatically divided into installments, allowing the user to fit the payment of the debt into their monthly budget. statement_agreement: false compulsory: true Transaction types of transactions: 722 (CP REFINANCING INSTALLMENT) 721 (CP INSTALLMENT CREDIT) 723 (CP REFINANCING CONTRACT)

<b>Notes:</b>

  • The installment transactions for the refinanced debt have transaction type REFINANCING AGREEMENT.
  • The following combination is not valid. It returns the error message "A compulsory request requires the statement agreement field to be set to false." statement_agreement: true compulsory: true
  • After the installments are created, the Pismo platform asynchronously generates an Installment payment processed event. You should not try to access the new payment agreement until you receive this event.
post/statements/v4/accounts/{accountId}/installment-payments

Request

  • Base URL
    https://sandbox.pismolabs.io
  • URL
    https://sandbox.pismolabs.io/statements/v4/accounts/{accountId}/installment-payments
  • Auth
    HTTP bearer

Path parameters

accountIdinteger required
Example:101

Account ID

Headers

Authorizationstring required

Account token, not a regular access token. Account tokens are encoded with an account ID. Tokens can expire quickly, which can result in an Unauthorized message.

Request body

statement_agreementboolean required

Is the generated agreement a statement agreement (true) or an installment agreement (false)?

compulsoryboolean

Is the generated agreement a compulsory agreement (true) or not (false)?

settle_accrualboolean

Is the generated agreement settled to accrual (true) or not (false)? If true, pending accruals are included when calculating the refinanced amount.

split_iofboolean

Should IOF be split? If true, the Pismo platform generates a separate transaction for the IOF tax.

use_original_rateboolean

Set to true if the original installment rate should be used to generate accruals. Set to false, otherwise. The original installment rate is the payment agreement contract interest rate. So, if this field is set to true, this rate is used instead of the transaction category interest rate when a payment agreement installment is due.

payment_datetimestring date-time

Date/time of the down payment. Format = YYYY-MM-DDThr:mm:ss.

This field may represent the payment date for the down payment. When provided, this date is used as the transaction event date for credit and installments.

credit_transaction_descriptionstring

Credit Transaction Description field is up to 100 characters.

metadataMetadataPaymentAgreementV4

This is a JSON object converted to a string with additional information relevant to the customer. No business rule validation is performed on it.

Note: This field must not be used to send Personally Identifiable Information (PII), Payment Card Industry (PCI) data, or any sensitive/regulated information. Metadata fields are intended for operational, non-sensitive data only. For sensitive data, use the specific parameters designed for that purpose. For more information, refer to Get started with Pismo APIs.

Example request

{
  "statement_agreement": true,
  "installments": [
    {
      "installment_number": 1,
      "total_amount": 40,
      "principal_amount": 38,
      "interest_amount": 1,
      "interest_rate": 0.1,
      "iof_amount": 0.5,
      "daily_iof_amount": 0.5,
      "description": "installment #1",
      "custom_transactions": [
        {
          "custom_key": "tax",
          "amount": 1
        }
      ]
    },
    {
      "installment_number": 2,
      "total_amount": 40,
      "principal_amount": 38,
      "interest_amount": 1,
      "interest_rate": 0.1,
      "iof_amount": 0.5,
      "daily_iof_amount": 0.5,
      "description": "installment #2",
      "custom_transactions": [
        {
          "custom_key": "insurance",
          "amount": 3.99
        }
      ]
    }
  ],
  "compulsory": true,
  "payment_datetime": "2021-04-14T12:00:00-03:00",
  "credit_transaction_description": "CREDIT TRANSACTION",
  "metadata": {
    "key-1": 10,
    "key-2": 5
  },
  "custom_contract_transactions": [
    {
      "custom_key": "tax",
      "amount": 100
    },
    {
      "custom_key": "insurance",
      "amount": 200
    }
  ]
}

Response

Created

idinteger

Payment agreement ID

statement_agreementboolean

Is the generated agreement a statement agreement (true) or an installment agreement (false)?

compulsoryboolean

Is the generated agreement a compulsory agreement (true) or not (false)?

settle_agreementboolean

Is the generated agreement settled (true) or not (false)?

split_iofboolean

Should IOF be split? If true, the Pismo platform generates a separate transaction for the IOF tax.

created_atstring

Creation date/time. Format = yyyy-mm-ddThh:mm:ss.

Example response

{
  "id": 1,
  "statement_agreement": false,
  "status": "PROCESSED",
  "created_at": "2020-08-15T11:55:39Z",
  "compulsory": true,
  "split_iof": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.