Backfill transactions

Creating credit notes requires reference data from the previous transaction. This data is required by the governments and can differ per country. Below are examples of how to provide this information to Fonoa before making an adjustment request

Required data for the original transaction is

  • country_code:
    ISO 3166-1 alpha-2 uppercase country code the original transaction took place in.
  • transaction_id:
    Unique external transaction identifier provided by the customer. Used as an idempotency key. e.g., MY_EXTERNAL_IDENTIFIER_0001.
  • transaction_number:
    Invoice number for the original transaction
  • transaction_date:
    Invoice issuance date for the original invoice

The API reference can be found here.

Example.

POST https://api-demo.fonoa.com/v1/transactions/backfill/reported

{
  "country_code": "ES",
  "transaction_id": "OTHER_SYSTEM_ID_004",
  "transaction_number": "ES00000102",
  "transaction_date": "2022-08-02T12:51:25Z"
}

Once you have successfully submitted your historical data you can proceed with the credit note request using the adjustment endpoint as documented here

POST https://api-demo.fonoa.com/v1/transactions/adjustment


{
  "country_code": "ES",
  "reference_transaction_id": "OTHER_SYSTEM_ID_002", // provided ID in the example above
  ... // ommitted for brevity all the other details
  ... // required to be submitted via /adjustments endpoint
}