API Keys
BraidPay API keys allow developers to securely connect their applications to BraidPay. Keys are scoped and environment-specific (Test or Live) to ensure proper access control. You can create, revoke,
Creating an API Key
Navigate to Settings → API Keys in your BraidPay Dashboard.
Click Create API Key.
Choose:
Label: A human-readable name (e.g. My Storefront).
Scope:
checkout
: create checkout sessions and payment links.read_only
: view transactions, invoices, balances.full
: full API access.
Environment:
test
orlive
.
Copy the generated key — you will only see it once.
Using API Keys
Include your key in the Authorization
header:
POST https://api.braidpay.com/v1/checkout-sessions
Authorization: Bearer sk_test_xxx123
Content-Type: application/json
Rotating & Revoking
Rotate: Creates a new key while the old one remains valid for a short grace period.
Revoke: Immediately disables a key.
🚀 Developer Quickstart
Step 1: Create a Checkout Session
curl -X POST https://api.braidpay.com/v1/checkout-sessions \
-H "Authorization: Bearer sk_test_xxx123" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"currency": "usd",
"successUrl": "https://merchant.com/success",
"cancelUrl": "https://merchant.com/cancel"
}'
Response:
{
"id": "cs_test_123",
"checkoutUrl": "https://checkout.braidpay.com/cs_test_123"
}
Step 2: Redirect Customer
Your webhook will receive events such as payment.succeeded
:
{
"event": "payment.succeeded",
"data": {
"id": "cs_test_123",
"amount": 5000,
"currency": "usd",
"status": "succeeded"
}
}
Verify the signature (see Webhooks doc).
Last updated