Quick Exchange
  • Quick Exchange for Partners
  • Expired Quote Handling
  • Widget Integration
    • Embedded Widget
    • Configuration
      • Config Version
      • Settlement Defaults
      • Settlement Parameters
      • Custom Styles
      • Identity
      • Special Layout
      • Partner Fields
    • Event Hooks
  • API Integration
    • Authentication
    • User Session
      • OAuth
      • KYC
    • Settlements
  • Settlements
    • Funding Methods
      • BLOCKCHAIN_TRANSFER
      • BLOCKCHAIN_DELEGATED_BROADCAST
      • CARD_PAYMENT
        • Test Cards
    • Payout Methods
      • BLOCKCHAIN_TRANSFER
      • LIQUID_PARTNER_WALLET
      • LIQUID_WALLET
      • LIQUID_USER_WALLET
  • E-Commerce
    • X-Quoine-Auth
    • Intents (Fixed Settlements)
      • Deliverable Currency
    • Transactions
      • Transaction Status
Powered by GitBook
On this page
  • Settlement Status
  • Parameters
  • Define Method
  • Input Parameters
  • No Setup Parameters
  • Define Method and Input Parameters

Was this helpful?

  1. API Integration

Settlements

PreviousKYCNextFunding Methods

Last updated 4 years ago

Was this helpful?

Settlement Status

Status

Description

PARAMETERS_REQUIRED

Information is required. Must be specified through /input_parameters

READY

All information for the settlement has been received. Waiting for the other settlement to be READY or COMPLETE

WAITING_USER

Waiting for the user to take some action not related to the API (eg initiate a blockchain transfer for funding)

WAITING_EXTERNAL

Waiting for some external process.

WAITING_INTERNAL

Waiting for some internal process.

COMPLETE

Settlement is complete

MANUAL_INTERVENTION_REQUIRED

Some error has occoured and the transaction has started in some way (ie funds are locked).

CANCELLED

Some error has occoured or the transaction has timed out and no funds are locked.

Parameters

In the general case, each settlement has four steps, allowing the API to accommodate a wide variety of methods.

Define Method

POST https://partners.liquid.com ​/api​/v1​/settlement​/method

Creates the settlement for the side of the transaction specified by direction. As a shortcut, method can be supplied when initiating the /intent_to_trade request.

Request Body

Name
Type
Description

transaction_id

string

direction

string

method

string

POST ​/api​/v1​/settlement​/method

{
  "transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364",
  "method": "BLOCKCHAIN_TRANSFER",
  "direction": "PAYOUT",
  "input_parameters": {
    "wallet_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"    
  }
}


RESPONSE 202

{
  "success": true,
  "payload": {
    "settlement_instruction_id": "1cfbbd0b-3ddc-40b6-9676-3cf91ea6949c",
    "transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364",
    "currency": "BTC",
    "direction": "PAYOUT",
    "method": "BLOCKCHAIN_TRANSFER",
    "status": "WAITING_EXTERNAL",
    "quantity": "0.008",
    "required_input": {
      "wallet_address": {
        "label": "Wallet Address",
        "required": true,
        "validation": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$"
      }
    },
    "expires": {
      "unix_ms": 1583138106331,
      "iso8601": "2020-03-02T08:35:06.331Z",
      "ttl_ms": 20000
    }
  }
}

Input Parameters

POST https://partners.liquid.com/api/v1/settlement/parameters

Set input parameter values. Should only be called if there are required input parameters.

Request Body

Name
Type
Description

api_key

string

settlement_instruction_id

string

input_parameters

string

POST /api/v1/settlement/parameters

{
  "settlement_instruction_id": "4e18c3eb-2039-4441-a033-16cfec8ec058",
  "input_parameters": {
    "wallet_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"    
  }
}


RESPONSE 202

{
  "success": true,
  "payload": {
    "settlement_instruction_id": "4e18c3eb-2039-4441-a033-16cfec8ec058",
    "transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364",
    "currency": "BTC",
    "direction": "PAYOUT",
    "method": "BLOCKCHAIN_TRANSFER",
    "status": "WAITING_EXTERNAL",
    "quantity": "0.008",
    "input_parameters": {
      "wallet_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"      
    },
    "expires": {
      "unix_ms": 1583138106331,
      "iso8601": "2020-03-02T08:35:06.331Z",
      "ttl_ms": 20000
    }
  }
}

No Setup Parameters

For settlement methods where no setup parameters are provided by the server, input parameters and can be optionally supplied when specifying the settlement method.

Define Method and Input Parameters

POST https://partners.liquid.com/api/v1/settlement/method

As a shortcut both method and input parameters can be supplied in the /intent_to_trade endpoints where there are no setup parameters.

Request Body

Name
Type
Description

api_key

string

transaction_id

string

method

string

direction

string

input_parameters

object

POST ​/api​/v1​/settlement​/method

{
  "transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364",
  "method": "BLOCKCHAIN_TRANSFER",
  "direction": "PAYOUT",
  "input_parameters": {
    "account_key": {
      "type": "WALLET_ADDRESS",
      "value": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"
    }
  }
}


RESPONSE 201

{
  "success": true,
  "payload": {
    "settlement_instruction_id": "1cfbbd0b-3ddc-40b6-9676-3cf91ea6949c",
    "transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364",
    "currency": "BCH",
    "direction": "FUNDING",
    "method": "BLOCKCHAIN_TRANSFER",
    "status": "WAITING_EXTERNAL",
    "quantity": "0.023470",
    "received_input": {
      "account_key": {
        "type": "WALLET_ADDRESS",
        "value": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"
      }
    },
    "expires": {
      "unix_ms": 1583138106331,
      "iso8601": "2020-03-02T08:35:06.331Z",
      "ttl_ms": 20000
    }
  }
}