Skip to content

Instant Settlement Request

INFO

This documentation is work in progress and subject to change. If you have any questions or feedback, please reach out to us via Support.

This object represents an Instant Settlement request data for your customer. It lets you manage Instant Settlement requests that belong to the customer.

Instant Settlement Object

PropertyTypeDescription
funding_idstringUnique identifier of the funding object (Assigned by Zetl).
customer_idstringZetl-generated customer ID
currencystring (exactly 3)Currency of funding request (ISO 4217 currency code). See: Supported Currencies
amountnumericAmount of funding request (in minor unit). See: Supported Currencies
account_chargeback_ratenumeric (min. 0, max. 1)Current account chargeback rate of the user (Represented in decimal, for example: 3% chargeback rate should be send as 0.03)
account_refund_ratenumeric (min. 0, max. 1)Current account refund rate of the user (Represented in decimal, for example: 3% refund rate should be send as 0.03)
settlement_periodnumericTransaction settlement period of the user (Represented in days).
interest_ratenumeric (min. 0, max. 1)Interest rate of the funding request (Represented in decimal, for example: 0.2% interest rate will be send as 0.002)
transactionsobjectHistorical transaction data of the user (Partner-supplied information in any valid JSON key-value format)
statusstring (enum)Status of funding request. See: Funding Status
created_atstringResource creation ISO datetime string (UTC)
updated_atstringResource last modified ISO datetime string (UTC)

Partner-feature

Some partner might use null value for account_chargeback_rate and account_refund_rate depending on partnership configuration

Funding Status

StatusDescription
submittedFunding request has been submitted to Zetl for review.
approvedFunding request has been approved by Zetl.
deniedFunding request has been denied by Zetl.
acceptedFunding request has been accepted by the customer.
rejectedFunding request has been rejected by the customer.
fundedFunding request has been funded by Zetl (money has been disbursed to customer).
repaidFunding request has been repaid by the customer.

Auto-Accepted Offer

Some partner might skip decision flow and found their funding offer auto-accepted depending on partnership configuration

Instant Settlement Example

json
{
  "funding_id": "c6241b71-4340-4710-a304-0409124ff87c",
  "customer_id": "b8a1dfe0-c575-4d5c-9840-2fca96b5d96a",
  "currency": "HKD",
  "amount": 100000,
  "account_chargeback_rate": 0.03,
  "account_refund_rate": 0.03,
  "settlement_period": 7,
  "interest_rate": 0.0049,
  "transactions": {
    "transaction_list": [
      {
        "transaction_id": "c6241b71-4340-4710-a304-0409124ff87c",
        "transaction_date": "2023-11-29",
        "transaction_currency": "HKD",
        "transaction_amount": 100000,
        "transaction_status": "success",
        "transaction_type": "sale",
        "transaction_settlement_date": "2023-12-07",
        "settlement_status": "settled"
      }
    ],
    "transaction_count": 1,
    "total_amount": 100000
  },
  "status": "approved",
  "created_at": "2023-12-01T00:02:00Z",
  "updated_at": "2023-12-01T00:02:00Z"
}

Create Instant Settlement Request

POST   /v1/instant-settlements

https://api.zetl.com/v1/instant-settlements

Submit a instant settlement request for your customer.

Request Properties

PropertyTypeDescription
customer_ratestringZetl-generated user ID
currencystring (exactly 3)Currency of funding request (ISO 4217 currency code). See: Supported Currencies
amountnumericAmount of funding request (in minor unit). See: Supported Currencies
account_chargeback_ratenumeric (min. 0, max. 1)Current account chargeback rate of the user (Represented in decimal, for example: 3% chargeback rate should be send as 0.03)
account_refund_ratenumeric (min. 0, max. 1)Current account refund rate of the user (Represented in decimal, for example: 3% refund rate should be send as 0.03)
settlement_periodnumeric (enum)Transaction settlement period of the user (Represented in days).
transactionsobjectHistorical transaction data of the user (Partner-supplied information in any valid JSON key-value format)

Partner-feature

Some partner might use null value for account_chargeback_rate and account_refund_rate depending on partnership configuration

Request Example

http
POST /v1/instant-settlements HTTP/1.1
Host: api.zetl.com
Content-Type: application/json
Authorization: Bearer <your-private-key>

{
  "customer_id": "b8a1dfe0-c575-4d5c-9840-2fca96b5d96a",
  "currency": "HKD",
  "amount": 100000,
  "account_chargeback_rate": 0.03,
  "account_refund_rate": 0.03,
  "settlement_period": 7,
  "transactions": {
    "transaction_list": [
      {
        "transaction_id": "c6241b71-4340-4710-a304-0409124ff87c",
        "transaction_date": "2021-01-01",
        "transaction_currency": "HKD",
        "transaction_amount": 100000,
        "transaction_status": "success",
        "transaction_type": "sale",
        "transaction_settlement_date": "2021-01-08",
        "settlement_status": "settled"
      }
    ],
    "transaction_count": 1,
    "total_amount": 100000
  }
}
shell
curl --request POST \
  --url https://api.zetl.com/v1/instant-settlements \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <your-private-key>' \
  --data '{
  "customer_id": "b8a1dfe0-c575-4d5c-9840-2fca96b5d96a",
  "currency": "HKD",
  "amount": 100000,
  "account_chargeback_rate": 0.03,
  "account_refund_rate": 0.03,
  "settlement_period": 7,
  "transactions": {
    "transaction_list": [
      {
        "transaction_id": "c6241b71-4340-4710-a304-0409124ff87c",
        "transaction_date": "2021-01-01",
        "transaction_currency": "HKD",
        "transaction_amount": 100000,
        "transaction_status": "success",
        "transaction_type": "sale",
        "transaction_settlement_date": "2021-01-08",
        "settlement_status": "settled"
      }
    ],
    "transaction_count": 1,
    "total_amount": 100000
  }
}'

Response Properties

Refer to Instant Settlement object

Possible Error

See Handling Error for generic possible errors.

CodeDescription
kyc_incompleteThe customer haven't completed the KYC filling process. Complete the KYC information and any necessary supporting documents upload (See: KYC Information)

Error Example

json
{
  "error": {
    "type": "invalid_request_error",
    "code": "kyc_incomplete",
    "message": "KYC is incomplete, please complete KYC first before requesting funding."
  }
}

Retrieve List of Instant Settlement (All)

GET   /v1/instant-settlements

https://api.zetl.com/v1/instant-settlements

Get a list of instant settlement request owned by your business (all customers).

Query Parameters

See Pagination for generic URL query parameters available.

Response Properties

PropertyTypeDescription
itemsarray of Instant SettlementList of instant settlement funding owned by your business (transactions key omitted).
countnumberTotal number of instant settlement funding owned by your business.

Response Example

json
{
  "items": [
    {
      "funding_id": "c6241b71-4340-4710-a304-0409124ff87c",
      "customer_id": "b8a1dfe0-c575-4d5c-9840-2fca96b5d96a",
      "currency": "HKD",
      "amount": 100000,
      "account_chargeback_rate": 0.03,
      "account_refund_rate": 0.03,
      "settlement_period": 7,
      "interest_rate": 0.0049,
      "status": "approved",
      "created_at": "2023-12-01T00:02:00Z",
      "updated_at": "2023-12-01T00:02:00Z"
    }
  ],
  "count": 1
}

Possible Error

See Handling Error for generic possible errors.

Retrieve Instant Settlement resource

GET   /v1/instant-settlements/{funding_id}

https://api.zetl.com/v1/instant-settlements/{funding_id}

Get details of a customer's instant settlement request

Response Properties

Refer to Instant Settlement object

Possible Error

See Handling Error for generic possible errors.

Retrieve List of Instant Settlement (Filtered)

GET   /v1/customers/{customer_id}/instant-settlements

https://api.zetl.coom/v1/customers/{customer_id}/instant-settlements

Get a list of instant settlement request owned by your customer. Refer to Retrieve List of Instant Settlement (All)

Retrieve Instant Settlement resource (Filtered)

GET   /v1/customers/{customer_id}/instant-settlements/{funding_id}

https://api.zetl.com/v1/customers/{customer_id}/instant-settlements/{funding_id}

Get details of a customer's instant settlement request. Refer to Retrieve Instant Settlement resource

Accept/Reject Instant Settlement Request

PUT   /v1/instant-settlements/{funding_id}/decision

https://api.zetl.com/v1/instant-settlements/{funding_id}/decision

Accept or reject an instant settlement request.

Request Properties

PropertyTypeDescription
typestring (enum)Type of decision, (accept or reject).
reasonstring?Reason for rejection. (Required only for reject type decision).

Request Example

http
POST /v1/instant-settlement/c6241b71-4340-4710-a304-0409124ff87c/decision HTTP/1.1
Host: api.zetl.com
Content-Type: application/json
Authorization: Bearer <your-private-key>

{
  "type": "accept"
}
shell
curl --request POST \
  --url https://api.zetl.com/v1/instant-settlement/c6241b71-4340-4710-a304-0409124ff87c/decision \
  --header 'Authorization: Bearer <your-private-key>' \
  --header 'Content-Type: application/json' \
  --data '{"type": "accept"}'

Response Properties

Refer to Instant Settlement object.

Possible Error

See Handling Error for generic possible errors.

CodeDescription
funding_status_invalidThe funding request is not in a valid status to be accepted/rejected. (Already denied / accepted / rejected / funded / repaid)

Error Example

json
{
  "error": {
    "type": "invalid_request_error",
    "code": "funding_status_invalid",
    "message": "Instant settlement with funding_id \"c6241b71-4340-4710-a304-0409124ff87c\" is already rejected."
  }
}