Docs/SideBet/API Reference

API Reference

Complete endpoint documentation for the SideBet round-up API

Authentication

All requests require a Bearer token in the Authorization header. Obtain your API key from the Hedge Payments dashboard under Settings → API Keys.

Authorization Headerbash
curl -X POST https://api.hedgepayments.com/api/roundup/initiate \
  -H #98C379]">"Authorization: Bearer sk_live_your_api_key" \
  -H #98C379]">"Content-Type: application/json" \
  -d #98C379]">'{ ... }'

Base URLs

EnvironmentURL
Sandboxhttps://api-sandbox.hedgepayments.com
Productionhttps://api.hedgepayments.com
POST/api/roundup/initiate

Calculate and initiate a round-up ACH debit for a consumer bet. The round-up amount is determined by the provided strategy (or the merchant's default), subject to per-transaction and daily caps.

Request Body

ParameterTypeDescription
betAmount
integerBet amount in cents (e.g., 2347 for $23.47)
consumerId
stringThe consumer's unique ID from bank linking
strategy
stringRound-up strategy: nearest-dollar, nearest-5, percentage, fixed-amount, or dynamic
merchantId
stringYour merchant ID
strategyValue
numberRequired for percentage (1-10), fixed-amount (cents), and dynamic (multiplier)
Requestjson
{
  #98C379]">"betAmount": 2347,
  #98C379]">"consumerId": "cust_j4k5l6m7",
  #98C379]">"strategy": "nearest-dollar",
  #98C379]">"merchantId": "merch_xyz789"
}
Response — 200 OKjson
{
  #98C379]">"id": "roundup_9f8e7d6c",
  #98C379]">"roundUpCents": 53,
  #98C379]">"betAmountCents": 2347,
  #98C379]">"status": "pending",
  #98C379]">"skipped": false,
  #98C379]">"consumerId": "cust_j4k5l6m7",
  #98C379]">"merchantId": "merch_xyz789"
}
Response — daily cap reachedjson
{
  #98C379]">"id": null,
  #98C379]">"roundUpCents": 0,
  #98C379]">"betAmountCents": 2347,
  #98C379]">"status": "skipped",
  #98C379]">"skipped": true,
  #98C379]">"consumerId": "cust_j4k5l6m7",
  #98C379]">"merchantId": "merch_xyz789"
}
GET/api/roundup/consumer/:consumerId

Retrieve a consumer's round-up transaction history and current daily total. Useful for displaying round-up activity in your UI.

Path Parameters

ParameterTypeDescription
consumerId
stringThe consumer's unique ID
Response — 200 OKjson
{
  #98C379]">"consumerId": "cust_j4k5l6m7",
  #98C379]">"dailyTotalCents": 247,
  #98C379]">"dailyMaxCents": 5000,
  #98C379]">"transactions": [
    {
      #98C379]">"id": "roundup_9f8e7d6c",
      #98C379]">"roundUpCents": 53,
      #98C379]">"betAmountCents": 2347,
      #98C379]">"status": "completed",
      #98C379]">"createdAt": "2026-03-24T14:30:00Z"
    },
    {
      #98C379]">"id": "roundup_a1b2c3d4",
      #98C379]">"roundUpCents": 94,
      #98C379]">"betAmountCents": 1506,
      #98C379]">"status": "initiated",
      #98C379]">"createdAt": "2026-03-24T15:12:00Z"
    },
    {
      #98C379]">"id": "roundup_e5f6g7h8",
      #98C379]">"roundUpCents": 100,
      #98C379]">"betAmountCents": 5000,
      #98C379]">"status": "pending",
      #98C379]">"createdAt": "2026-03-24T16:45:00Z"
    }
  ]
}
POST/api/roundup/configure

Configure or update the round-up strategy for a merchant. Sets the default strategy, transaction caps, and settlement preferences.

Request Body

ParameterTypeDescription
merchantId
stringYour merchant ID
strategy
stringnearest-dollar, nearest-5, percentage, fixed-amount, or dynamic
strategyValue
numberValue for percentage (1-10), fixed-amount (cents), dynamic (multiplier)
perTransactionMaxCents
integerPer-transaction ceiling in cents. Default: 1000 ($10)
dailyMaxCents
integerDaily cap per consumer in cents. Default: 5000 ($50)
settlementType
stringUSDC (instant) or USD (3 business days). Default: USD
Requestjson
{
  #98C379]">"merchantId": "merch_xyz789",
  #98C379]">"strategy": "percentage",
  #98C379]">"strategyValue": 5,
  #98C379]">"perTransactionMaxCents": 1000,
  #98C379]">"dailyMaxCents": 5000,
  #98C379]">"settlementType": "USDC"
}
Response — 200 OKjson
{
  #98C379]">"merchantId": "merch_xyz789",
  #98C379]">"strategy": "percentage",
  #98C379]">"strategyValue": 5,
  #98C379]">"perTransactionMaxCents": 1000,
  #98C379]">"dailyMaxCents": 5000,
  #98C379]">"settlementType": "USDC",
  #98C379]">"updated": true
}
GET/api/roundup/merchant/:merchantId/summary

Retrieve aggregate round-up statistics for a merchant. Includes total volume, active consumers, and current strategy configuration.

Path Parameters

ParameterTypeDescription
merchantId
stringYour merchant ID
Response — 200 OKjson
{
  #98C379]">"merchantId": "merch_xyz789",
  #98C379]">"strategy": "nearest-dollar",
  #98C379]">"perTransactionMaxCents": 1000,
  #98C379]">"dailyMaxCents": 5000,
  #98C379]">"settlementType": "USDC",
  #98C379]">"stats": {
    #98C379]">"totalRoundUpsCents": 458320,
    #98C379]">"totalTransactions": 12847,
    #98C379]">"activeConsumers": 1923,
    #98C379]">"completedCount": 12105,
    #98C379]">"failedCount": 42,
    #98C379]">"returnedCount": 18,
    #98C379]">"pendingCount": 682,
    #98C379]">"avgRoundUpCents": 36
  }
}

Webhook Events

SideBet sends webhook events as ACH payments progress through the pipeline. See the Webhooks page for full payload structures, signature validation, and retry policy.

EventDescription
roundup.initiatedACH debit submitted to consumer's bank
roundup.completedFunds received and settled to merchant
roundup.failedPayment could not be processed
roundup.returnedBank returned the debit (e.g., insufficient funds)

Error Codes

All error responses follow a consistent envelope. The field property is included when the error relates to a specific request parameter.

CodeMeaning
400Bad Request
401Unauthorized
404Not Found
409Conflict
422Unprocessable Entity
429Too Many Requests
500Internal Server Error
Error Response Formatjson
{
  #98C379]">"error": {
    #98C379]">"code": 422,
    #98C379]">"message": "betAmount must be a positive integer",
    #98C379]">"field": "betAmount"
  }
}

Rate Limits

Rate limits are enforced per merchant API key. All limits use a sliding window.

EndpointLimitWindow
POST /api/roundup/initiate100 requestsper minute per merchant
GET /api/roundup/consumer/:id300 requestsper minute per merchant
POST /api/roundup/configure10 requestsper minute per merchant
GET /api/roundup/merchant/:id/summary60 requestsper minute per merchant