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:
Signup on http://staging.branta.pro/account
Submit Name and Image (Branta Team will review withing 48 hours)
Create your Secret (for HMAC).
POST
Payments to Branta:
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:
Create a message string:
{METHOD}|{URL}|{BODY}|{TIMESTAMP}
Generate HMAC-SHA256 signature using the parent platform's API secret
Include the signature in the
X-HMAC-Signature
headerInclude the timestamp in the
X-HMAC-Timestamp
header
The timestamp must be within 30 minutes of the current time to prevent replay attacks.
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.
Unix timestamp in seconds. Must be within 30 minutes of the current time to prevent replay attacks.
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.
Payment created successfully
No content
Unauthorized - Invalid API key or HMAC validation failed
Unprocessable Content
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