API ReferenceMerchant API

Get a single invoice with payment details.

Returns the invoice and its associated on-chain payments. The invoice must belong to the authenticated merchant and match the API key's environment.

GET
/v1/invoices/{invoiceID}
X-API-Key<token>

API key issued by the merchant dashboard. The key's environment (live/test) determines which data the caller can access. Permissions on the key control which endpoints are reachable.

In: header

Path Parameters

invoiceIDstring

Invoice UUID.

Formatuuid

Response Body

fetch("https://api.halfin.xyz/api/v1/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08", {  method: "GET"})
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",
    "currency": "string",
    "network": "string",
    "amount_requested": "string",
    "amount_paid": "string",
    "amount_usd": "string",
    "amount_fiat": "string",
    "amount_in_base_currency": "string",
    "fiat_currency": "string",
    "status": "draft",
    "environment": "live",
    "deposit_address": "string",
    "deposit_address_tag": "string",
    "description": "string",
    "external_id": "string",
    "idempotency_key": "string",
    "metadata": {},
    "redirect_url": "string",
    "source": "string",
    "static_address_id": "dfe0e820-d96d-4e58-a685-774321eca4db",
    "checkout_url": "string",
    "payments": [
      {
        "tx_hash": "string",
        "amount": "string",
        "confirmations": 0,
        "required_confirmations": 0,
        "status": "string",
        "detected_at": "2019-08-24T14:15:22Z",
        "settlement_conversion": {
          "target_currency": "string",
          "target_network": "string",
          "source_amount": "string",
          "target_gross_amount": "string",
          "fee_amount": "string",
          "net_amount": "string",
          "quote_status": "not_required",
          "execution_status": "not_required",
          "failure_class": "string",
          "quoted_at": "2019-08-24T14:15:22Z",
          "locked_until": "2019-08-24T14:15:22Z"
        }
      }
    ],
    "expires_at": "2019-08-24T14:15:22Z",
    "paid_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "is_deferred": true,
    "draft_expires_at": "2019-08-24T14:15:22Z",
    "activated_at": "2019-08-24T14:15:22Z",
    "activation_count": 0,
    "is_locked_fiat": true,
    "target_settlement_asset": "passthrough",
    "settlement_target_currency": "USDC",
    "settlement_target_network": "ethereum",
    "payer_email": "string",
    "sent_at": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "request_id": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": [
      "string"
    ]
  },
  "meta": {
    "request_id": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": [
      "string"
    ]
  },
  "meta": {
    "request_id": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": [
      "string"
    ]
  },
  "meta": {
    "request_id": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": [
      "string"
    ]
  },
  "meta": {
    "request_id": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": [
      "string"
    ]
  },
  "meta": {
    "request_id": "string"
  }
}