Parent Platforms

Setting up a Parent Platform

This is for businesses that facilitate other businesses in accepting bitcoin.

To integrate your business as a Parent Platform:

Adding payments

post

Adds a new payment to Branta. Expires after ttl seconds.

HMAC Authentication: When the API key has a parent platform, HMAC validation is required. The HMAC signature is computed as follows:

  1. Create a message string: {METHOD}|{URL}|{BODY}|{TIMESTAMP}

  2. Generate HMAC-SHA256 signature using the parent platform's API secret

  3. Include the signature in the X-HMAC-Signature header

  4. Include the timestamp in the X-HMAC-Timestamp header

The timestamp must be within 30 minutes of the current time to prevent replay attacks.

Header parameters
AuthorizationstringRequired

Authorization is required to authorize the request. This API key is unique to each client and must be included in the header of every request. Failure to provide a valid API key will result in an unauthorized error.

Keep your API key confidential.

X-HMAC-Timestampstring · int64Required

Unix timestamp in seconds. Must be within 30 minutes of the current time to prevent replay attacks.

X-HMAC-SignaturestringRequired

HMAC-SHA256 signature of the request. The signature is computed using the parent platform's API secret and includes the HTTP method, URL, request body, and timestamp.

Body
Responses
201

Payment created successfully

No content

post
POST /v1/payments HTTP/1.1
Host: staging.branta.pro
Authorization: text
X-HMAC-Timestamp: text
X-HMAC-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 112

{
  "payment": {
    "payment": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
    "ttl": "86400",
    "alt_payments": [
      "lnbc....",
      "bc1q..."
    ]
  }
}

No content

Scoping an API Key to a Parent Platform

If you're a business running bitcoin through on of Branta's Platform partners, you can select that Partner when creating your API key.

Last updated