For the complete documentation index, see llms.txt. This page is also available as Markdown.

Adding Payments

post
Header parameters
AuthorizationstringRequired

Authorization: Bearer header with token is required.

Keep your API key confidential.

Body
ttlintegerRequired

Branta will remove the payment after ttl seconds.

Example: 86400
descriptionstringOptionalExample: Order #123
metadatastringOptional

Optional stringified JSON to show the user.

Example: {"Name": "S*****", "Email": "s******.com"}
Responses
201

Payment created successfully

No content

post/payments
POST /v2/payments HTTP/1.1
Host: staging.guardrail.branta.pro
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 245

{
  "destinations": [
    {
      "value": "lnurl1dp68gurn8ghj7c3wwdshguewvdhkvjndatxvsmtf5csdymt9v",
      "zk": false
    },
    {
      "value": "n2s5RV76sAMnQIOTMeRLsKkbS53g2v4gFUnH7i/RtRg4ZpIrDQq8WohDP9obSLLBGVrSnc8dR9TUC89veSg=",
      "zk": true
    }
  ],
  "description": "Order #123",
  "ttl": "86400"
}

No content

Zero Knowledge

Zero Knowledge requires the API caller to encrypt the destination value before POST. Below is a javascript example of the encryption algorithm. Our SDKs wrap the encrypt/decrypt functionality for you, if desired, or can be used for example code.

Last updated