CoinfiraEnergy API
API v1 API Reference

Idempotency

Both order endpoints require client_order_id. It is the merchant's stable identifier for one logical purchase and must be unique within that merchant.

#Retry behavior

Coinfira fingerprints all fields that define the operation.

For a smart order these fields are:

  • client_order_id
  • from_address
  • to_address
  • currency
  • normalized duration

For a direct order these fields are:

  • client_order_id
  • address
  • quantity_energy
  • currency
  • normalized duration

An identical retry returns the existing order and does not create another delegation. A retry with the same client_order_id and any changed field returns:

{
  "error": {
    "code": "client_order_id_conflict",
    "message": "The client_order_id is already used with different request parameters."
  }
}

#Client requirements

  1. Create and persist client_order_id before making the request.
  2. Reuse it after timeouts, connection failures, or uncertain responses.
  3. Never reuse it for another payment or address.
  4. Store the response together with the business transaction.
  5. Query status using the same value, not the returned order_id.

The response order_id is Coinfira's deterministic 64-character idempotency key. It is useful for logs and support, but the status URL uses client_order_id.