---
updatedAt: 2026-06-02T20:06:00.000Z
agentTools:
  projectIndex: https://docs.zerohash.com/llms.txt
---

# Create a BOLT11 invoice for deposit

Creates a Lightning Network invoice (BOLT11) to deposit funds to the informed participant account.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "zerohash API",
    "description": "\n### Authentication\n\nzerohash Uses HMAC SHA-256 verification to ensure the authenticity of API requests, follow instructions by link [https://docs.zerohash.com/reference/api-authentication](https://docs.zerohash.com/reference/api-authentication)\n\n<a href=\"/zh-swagger.json\">Download zerohash OpenAPI Schema as JSON</a>\n",
    "version": "1.7.0"
  },
  "servers": [
    {
      "url": "https://api.cert.zerohash.com",
      "description": "Certification API server"
    }
  ],
  "x-readme": {
    "proxy-enabled": false
  },
  "tags": [
    {
      "name": "Deposits",
      "description": "Create deposit addressed and monitor deposits to accounts"
    }
  ],
  "paths": {
    "/deposits/bolt11": {
      "post": {
        "tags": [
          "Deposits"
        ],
        "summary": "Create a BOLT11 invoice for deposit",
        "description": "Creates a Lightning Network invoice (BOLT11) to deposit funds to the informed participant account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Signature"
          },
          {
            "$ref": "#/components/parameters/Timestamp"
          }
        ],
        "requestBody": {
          "description": "Details for creating a BOLT11 Lightning Network invoice, including participant code, amount, and description.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostBOLT11Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created BOLT11 Lightning Network invoice. Returns the created resource with generated IDs and timestamps.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostBOLT11Response"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Code400"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Code403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Code404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Code500"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Code503"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "apiKey": [],
      "apiPassphrase": []
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "description": "Your API public key. See the [Authentication guide](https://docs.zerohash.com/reference/api-authentication) for how to obtain keys.",
        "in": "header",
        "name": "X-SCX-API-KEY"
      },
      "apiPassphrase": {
        "type": "apiKey",
        "description": "The passphrase associated with your API key, set when the key was created.",
        "in": "header",
        "name": "X-SCX-PASSPHRASE"
      }
    },
    "parameters": {
      "Signature": {
        "name": "X-SCX-SIGNED",
        "in": "header",
        "description": "HMAC-SHA256 signature of the request, base64-encoded. See the [Authentication guide](https://docs.zerohash.com/reference/api-authentication) for the exact signing formula.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "Timestamp": {
        "name": "X-SCX-TIMESTAMP",
        "in": "header",
        "description": "Current Unix timestamp in seconds. Must be within 60 seconds of server time or the request is rejected.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "1678901234"
        }
      }
    },
    "schemas": {
      "Code400": {
        "type": "object",
        "description": "Request was rejected by validation or a downstream service. `errors` is an array of human-readable messages; each entry describes a single validation failure or business-rule violation.",
        "required": [
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "body/amount must be >= 0",
              "body/asset is required"
            ]
          }
        }
      },
      "Code403": {
        "type": "object",
        "description": "Authentication or authorization failed. `error` is always `true`; `message` explains which check failed (missing API key, bad signature, insufficient permission, etc.).",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "This api key does not have write permission to this endpoint"
          }
        }
      },
      "Code404": {
        "type": "object",
        "description": "The requested resource does not exist or is not visible to the caller.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "example": "Not Found"
          }
        }
      },
      "Code500": {
        "type": "object",
        "description": "An unexpected error occurred on the server. The request can be retried after a short delay, but the same inputs may reproduce the error.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "example": "Internal Server Error"
          }
        }
      },
      "Code503": {
        "type": "object",
        "description": "A downstream dependency was unavailable, timed out, or returned a retryable error. Safe to retry; the response carries a `zh-allow-retry: true` header.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "example": "Service Unavailable"
          }
        }
      },
      "PostBOLT11Body": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "description": "The amount that should be deposited. Max precision of 8 decimals (one satoshi)",
            "example": "1.00000001"
          },
          "participant_code": {
            "type": "string",
            "description": "The participant code to have the deposit credited to",
            "example": "CUST01"
          },
          "account_label": {
            "type": "string",
            "description": "The `account_label` associated with the participant account. This parameter is case sensitive.",
            "example": "general"
          },
          "test_mode": {
            "type": "boolean",
            "description": "For CERT enviroiment, this flag indicates whether the invoice will be used internally to simulate a payment using our /deposits/bolt11/test_payment endpoint. If set to true, the invoice is not available to be payed at a external TESTNET lightning service.",
            "example": true
          },
          "test_type": {
            "type": "string",
            "description": "For CERT environment, this field indicates the type of test to be simulated. If test_mode is set to false, this field is ignored\". If not provided, Default is `deposit`.",
            "example": "deposit",
            "enum": [
              "deposit",
              "withdrawal"
            ]
          },
          "test_memo": {
            "type": "string",
            "description": "For CERT environment, set a memo string to mark the test invoice. If test_mode is set to false, test_memo is ignored",
            "example": "invoice_test_12345"
          }
        },
        "required": [
          "amount",
          "participant_code"
        ]
      },
      "PostBOLT11Response": {
        "type": "object",
        "properties": {
          "encoded_invoice": {
            "type": "string",
            "description": "The encoded BOLT11 invoice the payer should pay to credit the deposit.",
            "example": "lnbcrt2u1pndp4y5pp5hgh2..."
          },
          "expiration": {
            "type": "string",
            "format": "date-time",
            "description": "The expiration timestamp in RFC3339 format.",
            "example": "2026-05-04T12:45:00Z"
          }
        },
        "required": [
          "encoded_invoice",
          "expiration"
        ]
      }
    }
  }
}
```