---
updatedAt: 2025-06-12T21:22:24.000Z
agentTools:
  projectIndex: https://developers.opennode.com/llms.txt
---

# Create charge

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "opennode-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.opennode.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "",
        "x-default": "API-KEY"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "tags": [
    {
      "name": "Payments",
      "description": "Create and manage charges"
    }
  ],
  "paths": {
    "/v1/charges": {
      "post": {
        "summary": "Create charge",
        "description": "",
        "operationId": "create-charge",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Content-type header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Api key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount"
                ],
                "properties": {
                  "amount": {
                    "type": "integer",
                    "description": "Amount intended to be collected. The default currency is in 'satoshis', specify 'currency' param for fiat amounts",
                    "format": "int32"
                  },
                  "currency": {
                    "type": "string",
                    "description": "Three-letter ISO currency code, in uppercase. If specified will generate a charge for the equivalent amount of BTC at the current exchange rates"
                  },
                  "description": {
                    "type": "string",
                    "description": "Description to be shown in the payer's wallet"
                  },
                  "customer_name": {
                    "type": "string",
                    "description": "Payer's name"
                  },
                  "customer_email": {
                    "type": "string",
                    "description": "Payer's email"
                  },
                  "order_id": {
                    "type": "string",
                    "description": "Order ID for merchant's internal use"
                  },
                  "callback_url": {
                    "type": "string",
                    "description": "URL to receive webhooks for payment status updates"
                  },
                  "success_url": {
                    "type": "string",
                    "description": "URL to redirect user after successful payment"
                  },
                  "auto_settle": {
                    "type": "boolean",
                    "description": "Automatically convert payment to fiat (requires bank wallet setup)"
                  },
                  "split_to_btc_bps": {
                    "type": "integer",
                    "description": "Keep a percentage (in bps) of the payment in BTC",
                    "format": "int32"
                  },
                  "ttl": {
                    "type": "integer",
                    "description": "TTL (time to live) in minutes. Min: 10, Max: 4320 (72H), Default: 1440",
                    "format": "int32"
                  },
                  "notify_receiver": {
                    "type": "boolean",
                    "description": "Notify receiver (you) via email when this checkout is paid",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"data\": {\n\t\t\"id\": \"sample-1fc3-45c5-bed9-91e273a0299e\",\n\t\t\"description\": \"N/A\",\n\t\t\"desc_hash\": false,\n\t\t\"created_at\": 1661199392,\n\t\t\"status\": \"unpaid\",\n\t\t\"amount\": 10000,\n\t\t\"callback_url\": null,\n\t\t\"success_url\": null,\n\t\t\"hosted_checkout_url\": \"https://checkout.opennode.com/sample-1fc3-45c5-bed9-91e273a0299e\",\n\t\t\"order_id\": null,\n\t\t\"currency\": \"BTC\",\n\t\t\"source_fiat_value\": 10000,\n\t\t\"fiat_value\": 2.11,\n\t\t\"auto_settle\": false,\n\t\t\"notif_email\": null,\n\t\t\"address\": \"2N4itqmbbuZvVndyf8ALtkUzQjDjc9CKydv\",\n\t\t\"metadata\": {},\n\t\t\"chain_invoice\": {\n\t\t\t\"address\": \"2N4itqmbbuZvVndyf8ALtkUzQjDjc9CKydv\"\n\t\t},\n\t\t\"uri\": \"bitcoin:2N4itqmbbuZvVndyf8ALtkUzQjDjc9CKydv?amount=0.0001&label=N%2FA&lightning=lntb100u1p3s8epqpp5m94jdsjq3pwk54hlevvgvjtfunh4xle4da9x5vs0h9eyd0grz2cqdq9fch5zcqzpgxqzjhsp5lx49xndld4u2xparafm8480sm3pmq94f034589w3qskjf5sszjdq9qyyssqmsqvgeq7d95hcwwcffh0yr5znktjmyask6vxjjr2wf9v75kn8a8kywk07ck74xrnaa7c0p4s0qk6j4nc6zfdtp3se8pyyq8drnaf75gpd2v0fu\",\n\t\t\"ttl\": 1440,\n\t\t\"lightning_invoice\": {\n\t\t\t\"expires_at\": 1661199991,\n\t\t\t\"payreq\": \"lntb100u1p3s8epqpp5m94jdsjq3pwk54hlevvgvjtfunh4xle4da9x5vs0h9eyd0grz2cqdq9fch5zcqzpgxqzjhsp5lx49xndld4u2xparafm8480sm3pmq94f034589w3qskjf5sszjdq9qyyssqmsqvgeq7d95hcwwcffh0yr5znktjmyask6vxjjr2wf9v75kn8a8kywk07ck74xrnaa7c0p4s0qk6j4nc6zfdtp3se8pyyq8drnaf75gpd2v0fu\"\n\t\t}\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "sample-1fc3-45c5-bed9-91e273a0299e"
                        },
                        "description": {
                          "type": "string",
                          "example": "N/A"
                        },
                        "desc_hash": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "created_at": {
                          "type": "integer",
                          "example": 1661199392,
                          "default": 0
                        },
                        "status": {
                          "type": "string",
                          "example": "unpaid"
                        },
                        "amount": {
                          "type": "integer",
                          "example": 10000,
                          "default": 0
                        },
                        "callback_url": {},
                        "success_url": {},
                        "hosted_checkout_url": {
                          "type": "string",
                          "example": "https://checkout.opennode.com/sample-1fc3-45c5-bed9-91e273a0299e"
                        },
                        "order_id": {},
                        "currency": {
                          "type": "string",
                          "example": "BTC"
                        },
                        "source_fiat_value": {
                          "type": "integer",
                          "example": 10000,
                          "default": 0
                        },
                        "fiat_value": {
                          "type": "number",
                          "example": 2.11,
                          "default": 0
                        },
                        "auto_settle": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "notif_email": {},
                        "address": {
                          "type": "string",
                          "example": "2N4itqmbbuZvVndyf8ALtkUzQjDjc9CKydv"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {}
                        },
                        "chain_invoice": {
                          "type": "object",
                          "properties": {
                            "address": {
                              "type": "string",
                              "example": "2N4itqmbbuZvVndyf8ALtkUzQjDjc9CKydv"
                            }
                          }
                        },
                        "uri": {
                          "type": "string",
                          "example": "bitcoin:2N4itqmbbuZvVndyf8ALtkUzQjDjc9CKydv?amount=0.0001&label=N%2FA&lightning=..."
                        },
                        "ttl": {
                          "type": "integer",
                          "example": 1440,
                          "default": 0
                        },
                        "lightning_invoice": {
                          "type": "object",
                          "properties": {
                            "expires_at": {
                              "type": "integer",
                              "example": 1661199991,
                              "default": 0
                            },
                            "payreq": {
                              "type": "string",
                              "example": "lntb100u1p3s8epqpp5..."
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  success: false,\n  message: 'Field amount: Expected number, received nan'\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```