Welcome to the Opendeck API documentation. Build powerful financial applications with our comprehensive API and developer tools.
Opendeck is an open-finance infrastructure platform built on top of payments. We provide APIs and tools for businesses and developers to integrate financial services, including:
Our ML-first infrastructure provides real-time affordability checks, usage predictions, and payment optimization to help you build smarter financial applications.
Bank-grade encryption and PSD2 compliance
99.9% uptime SLA with sub-100ms response times
AI-driven affordability checks and predictions
Get started with the Opendeck API in minutes. Our RESTful API is designed for simplicity and power.
https://api.opendeck.co.uk
Opendeck uses JWT-based authentication. Register a user account to get started.
POST /api/auth/registerPOST /api/auth/loginAuthorization: Bearer YOUR_TOKEN headerSecure JWT-based authentication with OAuth2 support.
Payment processing for gaming operators and platforms.
Manage pension contributions and accounts.
ML-powered utility bill payments with affordability checks.
Connect to UK banks via Open Banking APIs.
Proprietary feature: Automatic pension micro-contributions (0.01%) from event payments.
Financial analytics and risk assessment.
Platform management and monitoring.
curl -X POST https://api.opendeck.co.uk/api/gaming/operators \
-H "Content-Type: application/json" \
-d '{
"company_name": "Example Gaming Ltd",
"trading_name": "Example Casino",
"contact_email": "api@example.com",
"contact_phone": "+44 20 1234 5678",
"company_number": "12345678",
"uk_gambling_license": "LIC123456"
}'
{
"operator_id": "123e4567-e89b-12d3-a456-426614174000",
"api_key": "opdk_live_TZfnxh-dZlRDQ2DWbam0grXwToSXjlPZt4OQSIpF7Tc",
"api_secret": "KhSxDRVf6ymBgHZjKVWxNkjdmHj5ggkRTIud2cxdP3DuxqtAyTDQhYrPe4IPdfKP"
}
Note: Save your API credentials immediately - they won't be shown again!
curl -X GET https://api.opendeck.co.uk/api/merchant/dashboard/overview?period=month \
-H "X-API-Key: opdk_live_YOUR_API_KEY_HERE"
{
"total_volume": 125000.50,
"total_revenue": 1875.75,
"transaction_count": 342,
"success_rate": 0.98,
"active_players": 156,
"pending_transactions": 3,
"volume_change_percent": 12.5,
"revenue_change_percent": 8.3,
"period_start": "2024-11-17T00:00:00Z",
"period_end": "2024-12-17T00:00:00Z"
}
// Register a new user
const response = await fetch('https://api.opendeck.co.uk/api/auth/register', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'user@example.com',
password: 'securePassword123',
firstName: 'Paul',
lastName: 'Davis'
})
});
const data = await response.json();
const token = data.token; // Store for authenticated requests
// Make authenticated API call
const response = await fetch('https://api.opendeck.co.uk/api/accounts', {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
}
});
const accounts = await response.json();
import requests
# Authenticate
response = requests.post(
'https://api.opendeck.co.uk/api/auth/login',
json={'email': 'user@example.com', 'password': 'password'}
)
token = response.json()['token']
# Make authenticated request
headers = {'Authorization': f'Bearer {token}'}
accounts = requests.get(
'https://api.opendeck.co.uk/api/accounts',
headers=headers
).json()
curl -X POST https://api.opendeck.co.uk/api/gaming/transactions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operator_id": "op_123",
"player_id": "player_456",
"type": "deposit",
"amount": 100.00,
"currency": "GBP"
}'
curl -X POST https://api.opendeck.co.uk/api/gaming/operators \
-H "Content-Type: application/json" \
-d '{
"company_name": "Your Company Ltd",
"trading_name": "Your Trading Name",
"contact_email": "contact@example.com",
"contact_phone": "+44 20 1234 5678",
"uk_gambling_license": "LIC123456"
}'
Returns API key and secret - save these!
Online casinos, sportsbooks, esports platforms, fantasy sports, and skill-based gaming
Gaming operators, casinos, sportsbooks, and esports platforms can integrate with Opendeck to process payments with ML-powered affordability checks, real-time transaction processing, and comprehensive player account management.
🔒 Security First: All connections are encrypted, authenticated, and comply with PSD2, UK Gambling Commission regulations, and GDPR. Your API credentials are hashed and never stored in plain text.
Start by registering your gaming operator organization with Opendeck. This creates your operator account and generates secure API credentials.
API Endpoint
POST https://api.opendeck.co.uk/api/gaming/operators
Content-Type: application/json
{
"company_name": "Gaming Operator Ltd",
"trading_name": "Your Casino Brand",
"contact_email": "api@yourcasino.com",
"contact_phone": "+44 20 1234 5678",
"company_number": "12345678",
"uk_gambling_license": "LIC123456",
"website_url": "https://www.yourcasino.com",
"webhook_url": "https://api.yourcasino.com/webhooks/opendeck"
}
Response: You'll receive your API credentials immediately:
{
"operator_id": "550e8400-e29b-41d4-a716-446655440000",
"api_key": "opdk_live_abc123...",
"api_secret": "opdk_secret_xyz789..."
}
⚠️ CRITICAL: Save these credentials immediately! They are only shown once and cannot be recovered.
Required Fields:
company_name - Your registered company nametrading_name - Your public-facing brand namecontact_email - Technical contact emailcontact_phone - Contact phone numberOptional Fields:
company_number - UK Companies House numberuk_gambling_license - UK Gambling Commission license number (required for UK operators)website_url - Your public website URLwebhook_url - Your webhook endpoint for real-time notificationsAfter registration, your operator account starts with pending status. Opendeck will review your application for compliance and activate your account.
Check Account Status
GET https://api.opendeck.co.uk/api/gaming/operators/me
X-API-Key: opdk_live_YOUR_API_KEY_HERE
Response:
{
"operator_id": "550e8400-e29b-41d4-a716-446655440000",
"company_name": "Gaming Operator Ltd",
"trading_name": "Your Casino Brand",
"status": "pending",
"created_at": "2024-01-15T10:30:00Z"
}
Activation Status: Check your account status by calling GET /api/gaming/operators/me with your API key. Status will change from pending to active when approved. Activation typically takes 1-2 business days for compliance review. You'll receive an email notification when your account is activated.
Before processing transactions, create player accounts for your users. Each player account is linked to your operator and can have multiple payment methods.
Create Player Account
POST https://api.opendeck.co.uk/api/gaming/players
X-API-Key: opdk_live_YOUR_API_KEY_HERE
Content-Type: application/json
{
"operator_id": "550e8400-e29b-41d4-a716-446655440000",
"player_id": "player_12345",
"email": "player@example.com",
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-15",
"country": "GB"
}
Response:
{
"player_id": "player_12345",
"operator_id": "550e8400-e29b-41d4-a716-446655440000",
"email": "player@example.com",
"status": "active",
"created_at": "2024-01-15T10:30:00Z"
}
Process player deposits and withdrawals with automatic affordability checks. All transactions are processed securely with real-time status updates.
Create Deposit Transaction
POST https://api.opendeck.co.uk/api/gaming/transactions
X-API-Key: opdk_live_YOUR_API_KEY_HERE
Content-Type: application/json
{
"operator_id": "550e8400-e29b-41d4-a716-446655440000",
"player_id": "player_12345",
"type": "deposit",
"amount": 100.00,
"currency": "GBP",
"operator_transaction_id": "CASINO-TXN-12345"
}
Response:
{
"transaction_id": "txn_abc123",
"operator_transaction_id": "CASINO-TXN-12345",
"player_id": "player_12345",
"type": "deposit",
"amount": 100.00,
"currency": "GBP",
"status": "pending",
"affordability_check": {
"status": "approved",
"risk_score": 0.15,
"recommendation": "proceed"
},
"created_at": "2024-01-15T10:30:00Z"
}
Transaction Types:
deposit - Player deposits funds to their accountwithdrawal - Player withdraws funds from their accountrefund - Refund a previous transactionOpendeck automatically performs ML-powered affordability checks on all transactions to ensure responsible gambling and compliance with UK Gambling Commission regulations.
Request Affordability Check
POST https://api.opendeck.co.uk/api/gaming/affordability/check
X-API-Key: opdk_live_YOUR_API_KEY_HERE
Content-Type: application/json
{
"player_id": "player_12345",
"amount": 500.00,
"currency": "GBP",
"transaction_type": "deposit"
}
Response:
{
"affordability_status": "approved",
"risk_score": 0.12,
"recommendation": "proceed",
"factors": {
"income_verification": "verified",
"spending_pattern": "normal",
"deposit_frequency": "moderate"
},
"warnings": []
}
Affordability Status Values:
approved - Transaction is safe to proceedwarning - Proceed with caution, review recommendedrejected - Transaction should be declinedReceive real-time notifications about transaction status changes, player account updates, and affordability check results via webhooks.
Webhook Events
transaction.status_changed - Transaction status updatedtransaction.completed - Transaction completed successfullytransaction.failed - Transaction failedaffordability.check_completed - Affordability check completedplayer.account_created - New player account createdWebhook Payload Example
POST https://api.yourcasino.com/webhooks/opendeck
Content-Type: application/json
X-Webhook-Signature: sha256=abc123...
{
"event": "transaction.status_changed",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"transaction_id": "txn_abc123",
"operator_transaction_id": "CASINO-TXN-12345",
"status": "completed",
"amount": 100.00,
"currency": "GBP"
}
}
Security: All webhooks are signed with HMAC SHA-256. Verify the signature using your API secret to ensure the webhook is from Opendeck.
Access your merchant dashboard to view transaction analytics, player statistics, and account overview.
Dashboard Overview
GET https://api.opendeck.co.uk/api/merchant/dashboard/overview?period=day
X-API-Key: opdk_live_YOUR_API_KEY_HERE
Response:
{
"period": "day",
"total_transactions": 1250,
"total_volume": 125000.00,
"successful_transactions": 1180,
"failed_transactions": 70,
"average_transaction_value": 100.00,
"top_players": [...]
}
For technical support, API questions, or compliance inquiries, contact our team:
Production-ready integration guide for pension providers
🔒 Security First: All connections are encrypted, authenticated, and comply with PSD2 and GDPR regulations. Your API credentials are hashed and never stored in plain text.
Start by registering your pension provider organization with Opendeck. This creates your operator account and generates secure API credentials.
API Endpoint
POST https://api.opendeck.co.uk/api/gaming/operators
Content-Type: application/json
{
"company_name": "NEST Corporation",
"trading_name": "NEST Pensions",
"contact_email": "api@nestpensions.com",
"contact_phone": "+44 20 1234 5678",
"company_number": "RC000727",
"website_url": "https://www.nestpensions.org.uk",
"webhook_url": "https://api.nestpensions.com/webhooks/opendeck"
}
Response: You'll receive your API credentials immediately:
{
"operator_id": "550e8400-e29b-41d4-a716-446655440000",
"api_key": "opdk_live_abc123...",
"api_secret": "opdk_secret_xyz789..."
}
⚠️ CRITICAL: Save these credentials immediately! They are only shown once and cannot be recovered.
Required Fields:
company_name - Your registered company nametrading_name - Your public-facing brand namecontact_email - Technical contact emailOptional Fields:
company_number - UK Companies House numberwebhook_url - Your webhook endpoint for real-time notificationsuk_gambling_license - Not required for pension providersAfter registration, your account starts with pending status. Opendeck performs compliance verification before activation.
Verification Process:
Check Activation Status:
GET https://api.opendeck.co.uk/api/gaming/operators/me
Headers:
X-API-Key: opdk_live_YOUR_API_KEY
Status values: pending → active
⏱️ Typical Timeline: 1-2 business days for standard verification. Complex cases may take up to 5 business days. You'll receive email notifications at each stage.
Once activated, establish a secure connection between Opendeck and your pension provider system. This enables real-time account verification and payment processing.
Connection Methods:
Option A: API Token Exchange (Recommended)
Exchange secure tokens for authenticated API access:
POST https://api.opendeck.co.uk/api/pensions/providers/connect
Headers:
X-API-Key: opdk_live_YOUR_API_KEY
Content-Type: application/json
Body:
{
"provider_token": "your_secure_provider_token",
"provider_api_endpoint": "https://api.yourpension.com/v1",
"encryption_key": "base64_encoded_public_key"
}
Option B: OAuth 2.0 Integration
For providers with OAuth support:
POST https://api.opendeck.co.uk/api/pensions/providers/oauth/authorize
Headers:
X-API-Key: opdk_live_YOUR_API_KEY
Body:
{
"oauth_client_id": "your_client_id",
"oauth_client_secret": "your_client_secret",
"redirect_uri": "https://api.opendeck.co.uk/api/pensions/providers/oauth/callback"
}
✅ Connection Verified: Once connected, Opendeck can:
When users connect their pension accounts, Opendeck securely verifies and links them to your provider system.
Connection Flow:
User Initiates Connection
User provides pension account details via Opendeck app/web
Opendeck Validates Account
Opendeck calls your API to verify account exists and is valid
Secure Token Exchange
Provider returns encrypted access token for future API calls
Account Linked
User can now make contributions through Opendeck
Provider API Endpoint (Your Side):
POST https://api.yourpension.com/v1/accounts/verify
Headers:
Authorization: Bearer YOUR_PROVIDER_TOKEN
X-Opendeck-Signature: HMAC_SIGNATURE
Body:
{
"account_number": "PEN123456",
"scheme_name": "Workplace Pension Scheme",
"user_national_insurance": "AB123456C"
}
Response:
{
"valid": true,
"account_id": "ACC789",
"account_name": "John Smith",
"current_balance": 50000.00,
"currency": "GBP"
}
When users make pension contributions, Opendeck processes payments and notifies your system via webhooks.
Payment Flow:
completedWebhook Payload Example:
POST https://api.yourpension.com/webhooks/opendeck
Headers:
X-Opendeck-Event: pension.payment.completed
X-Opendeck-Signature: HMAC_SHA256_SIGNATURE
X-Opendeck-Timestamp: 1703123456
Body:
{
"event_id": "evt_abc123",
"event_type": "pension.payment.completed",
"created_at": "2024-01-15T10:30:00Z",
"data": {
"payment_id": "pay_xyz789",
"pension_account_id": "acc_456",
"user_id": "usr_123",
"amount": 100.00,
"currency": "GBP",
"tax_relief_amount": 25.00,
"gross_amount": 125.00,
"payment_source": "bank_account",
"provider_payment_id": "PEN-2024-001234"
}
}
Security: Always verify the X-Opendeck-Signature header using HMAC SHA256 with your webhook secret.
Webhook Events:
pension.payment.completed - Payment successfully processedpension.payment.failed - Payment failedpension.account.connected - User connected their accountpension.account.disconnected - User disconnected their account🔐 API Key Security
🔒 Webhook Security
📋 Compliance
Step-by-step guide to implement Opendeck pension integration in your system.
🚀 Quick Start Checklist
1. Implement Account Verification Endpoint
When users connect their pension accounts, Opendeck will call your API to verify account details.
Required Endpoint:
POST https://api.yourpension.com/v1/accounts/verify
Headers:
Authorization: Bearer YOUR_PROVIDER_TOKEN
X-Opendeck-Signature: HMAC_SHA256_SIGNATURE
X-Opendeck-Timestamp: 1703123456
Content-Type: application/json
Request Body:
{
"account_number": "PEN123456",
"scheme_name": "Workplace Pension Scheme",
"user_national_insurance": "AB123456C",
"user_email": "user@example.com"
}
Success Response (200 OK):
{
"valid": true,
"account_id": "ACC789",
"account_name": "John Smith",
"current_balance": 50000.00,
"currency": "GBP",
"scheme_name": "Workplace Pension Scheme",
"provider_account_id": "PROV-ACC-123",
"tax_relief_applicable": true,
"tax_relief_rate": 20.0,
"contribution_rate": 5.0,
"employer_contribution_rate": 3.0
}
Error Response (400 Bad Request):
{
"valid": false,
"error": "Account not found",
"error_code": "ACCOUNT_NOT_FOUND"
}
Security: Always verify the X-Opendeck-Signature header. The signature is computed as:
HMAC_SHA256(
timestamp + request_body,
your_webhook_secret
)
Python Example Implementation:
from flask import Flask, request, jsonify
import hmac
import hashlib
import time
app = Flask(__name__)
WEBHOOK_SECRET = "your_webhook_secret"
def verify_signature(signature, timestamp, body):
expected = hmac.new(
WEBHOOK_SECRET.encode(),
(timestamp + body).encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(signature, expected)
@app.route('/v1/accounts/verify', methods=['POST'])
def verify_account():
# Verify signature
signature = request.headers.get('X-Opendeck-Signature')
timestamp = request.headers.get('X-Opendeck-Timestamp')
if not verify_signature(signature, timestamp, request.data):
return jsonify({"error": "Invalid signature"}), 401
# Check timestamp (prevent replay attacks)
if abs(time.time() - int(timestamp)) > 300: # 5 minutes
return jsonify({"error": "Request expired"}), 401
data = request.json
account_number = data.get('account_number')
ni_number = data.get('user_national_insurance')
# Verify account in your system
account = verify_account_in_system(account_number, ni_number)
if account:
return jsonify({
"valid": True,
"account_id": account.id,
"account_name": account.name,
"current_balance": float(account.balance),
"currency": "GBP",
"scheme_name": account.scheme_name,
"tax_relief_applicable": True,
"tax_relief_rate": 20.0
}), 200
else:
return jsonify({
"valid": False,
"error": "Account not found"
}), 400
2. Implement Webhook Handler for Payments
Opendeck will send webhook notifications when payments are processed. Your system must handle these events.
Webhook Endpoint (Your Side):
POST https://api.yourpension.com/webhooks/opendeck
Headers:
X-Opendeck-Event: pension.payment.completed
X-Opendeck-Signature: HMAC_SHA256_SIGNATURE
X-Opendeck-Timestamp: 1703123456
Content-Type: application/json
Webhook Payload:
{
"event_id": "evt_abc123",
"event_type": "pension.payment.completed",
"created_at": "2024-01-15T10:30:00Z",
"data": {
"payment_id": "pay_xyz789",
"pension_account_id": "acc_456",
"user_id": "usr_123",
"amount": 100.00,
"currency": "GBP",
"tax_relief_amount": 25.00,
"gross_amount": 125.00,
"payment_source": "bank_account",
"provider_payment_id": "PEN-2024-001234"
}
}
Expected Response (200 OK):
{
"received": true,
"processed": true
}
Python Webhook Handler Example:
from flask import Flask, request, jsonify
import hmac
import hashlib
import time
app = Flask(__name__)
WEBHOOK_SECRET = "your_webhook_secret"
@app.route('/webhooks/opendeck', methods=['POST'])
def handle_opendeck_webhook():
# Verify signature
signature = request.headers.get('X-Opendeck-Signature')
timestamp = request.headers.get('X-Opendeck-Timestamp')
event_type = request.headers.get('X-Opendeck-Event')
if not verify_signature(signature, timestamp, request.data):
return jsonify({"error": "Invalid signature"}), 401
data = request.json
event_type = data.get('event_type')
event_data = data.get('data')
# Handle different event types
if event_type == 'pension.payment.completed':
# Process payment
payment_id = event_data.get('payment_id')
amount = event_data.get('amount')
account_id = event_data.get('pension_account_id')
# Update pension account in your system
result = process_pension_contribution(
account_id=account_id,
amount=amount,
payment_id=payment_id
)
if result:
return jsonify({"received": True, "processed": True}), 200
else:
return jsonify({"received": True, "processed": False}), 500
elif event_type == 'pension.payment.failed':
# Log failed payment
log_failed_payment(event_data)
return jsonify({"received": True}), 200
elif event_type == 'pension.account.connected':
# Handle account connection
handle_account_connection(event_data)
return jsonify({"received": True}), 200
return jsonify({"received": True}), 200
⚠️ Important: Always implement idempotency. Use the event_id to prevent processing the same event twice. Store processed event IDs and check before processing.
3. Testing Your Integration
Test Account Verification:
# Use Opendeck sandbox to test account verification
curl -X POST https://sandbox-api.opendeck.co.uk/api/pensions/providers/verify-account \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"account_number": "TEST123",
"scheme_name": "Test Scheme",
"user_national_insurance": "AB123456C",
"provider": "nest"
}'
Test Payment Processing:
# Create a test payment
curl -X POST https://sandbox-api.opendeck.co.uk/api/pensions/pay \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pension_account_id": "test-account-id",
"amount": 100.00,
"currency": "GBP",
"payment_source": "bank_account"
}'
Testing Webhooks: Use a tool like webhook.site or ngrok to expose your local webhook endpoint for testing.
4. Common Integration Patterns
Pattern: Batch Processing
For high-volume providers, implement batch processing of webhooks:
# Queue webhook events for batch processing
def handle_webhook(event):
# Add to processing queue
queue.enqueue(process_pension_payment, event.data)
# Return immediately
return {"received": True}, 200
# Process in background worker
def process_pension_payment(payment_data):
# Batch process multiple payments
payments = get_pending_payments()
update_pension_accounts_batch(payments)
Pattern: Retry Logic
Implement retry logic for failed webhook processing:
def process_webhook_with_retry(event_data, max_retries=3):
for attempt in range(max_retries):
try:
result = process_payment(event_data)
return result
except Exception as e:
if attempt == max_retries - 1:
# Log to error tracking system
log_error(e, event_data)
raise
time.sleep(2 ** attempt) # Exponential backoff
🧪 Sandbox Environment
Test your integration in our sandbox:
https://sandbox-api.opendeck.co.uk
Explore all endpoints with our interactive Swagger documentation.
View Swagger Docs →Official SDKs for popular programming languages.
99.9% uptime SLA with sub-100ms response times.
Bank-grade encryption and PSD2 compliance.
Detailed guides, examples, and best practices.
Utility providers (electricity, gas, water, broadband, mobile) can integrate with Opendeck to enable bill payments from users with ML-powered affordability checks and usage predictions.
Utility providers use the same operator registration endpoint as gaming operators:
POST /api/gaming/operators
Content-Type: application/json
{
"company_name": "Utility Provider Ltd",
"trading_name": "Your Utility Service",
"contact_email": "api@utilityprovider.com",
"contact_phone": "+44 20 1234 5678",
"company_number": "12345678",
"website_url": "https://utilityprovider.com"
}
Note: uk_gambling_license is not required for utility providers.
Utility provider accounts require activation by Opendeck for compliance and verification purposes.
After registration, Opendeck will:
Activation Status: Check your account status by calling GET /api/gaming/operators/me with your API key. Status will change from pending to active when approved.
Once activated, users can connect their utility accounts and make payments through Opendeck:
POST /api/utilities/accountsPOST /api/utilities/payOpendeck supports payments for:
Electricity
Gas
Water
Broadband
Mobile
Landline
TV
Council Tax
Our ML-first infrastructure provides:
GPU Acceleration: Our infrastructure uses GPU-accelerated ML models for sub-100ms inference times, ensuring fast affordability checks even with large datasets.
POST /api/utilities/accounts
Authorization: Bearer YOUR_USER_TOKEN
Content-Type: application/json
{
"provider": "british_gas",
"provider_name": "British Gas",
"utility_type": "electricity",
"account_number": "12345678",
"meter_number": "1234567890",
"property_address": "123 Main St, London, SW1A 1AA",
"is_primary": true
}
POST /api/utilities/pay
Authorization: Bearer YOUR_USER_TOKEN
Content-Type: application/json
{
"utility_account_id": "account-uuid-here",
"amount": 125.50,
"payment_source": "bank_account",
"bill_reference": "BG-2024-001234",
"bill_period_start": "2024-11-01T00:00:00Z",
"bill_period_end": "2024-11-30T23:59:59Z",
"usage_data": {
"kwh_used": 450,
"days_in_period": 30,
"average_daily_usage": 15
}
}
The usage_data field is used by our ML models for predictions and affordability analysis.
Enable automatic pension micro-contributions (0.01% of payments) to incentivize attendance at sports events, music shows, and entertainment venues. This proprietary feature helps venues stand out while promoting financial wellness.
Proprietary Feature: This is a unique Opendeck feature that automatically contributes 0.01% of all event payments to users' chosen pension accounts.
Sports Events
Music Shows
Theater
Entertainment
Payments include tickets, concessions, merchandise, parking, and upgrades.
POST /api/events/venues
Authorization: Bearer YOUR_USER_TOKEN
Content-Type: application/json
{
"name": "Wembley Stadium",
"venue_type": "stadium",
"address": "Wembley, London",
"city": "London",
"postcode": "HA9 0WS",
"capacity": 90000,
"description": "National football stadium",
"contribution_rate": 0.0001
}
The contribution_rate defaults to 0.0001 (0.01%) but can be customized per venue.
POST /api/events/
Authorization: Bearer YOUR_USER_TOKEN
Content-Type: application/json
{
"name": "Premier League Match: Arsenal vs Chelsea",
"event_type": "sports",
"venue_id": "venue-uuid-here",
"start_date": "2024-12-15T15:00:00Z",
"end_date": "2024-12-15T17:00:00Z",
"description": "Premier League football match",
"contribution_rate": 0.0001
}
POST /api/events/payments
Authorization: Bearer USER_TOKEN
Content-Type: application/json
{
"event_id": "event-uuid-here",
"payment_type": "ticket",
"amount": 75.00,
"pension_account_id": "pension-account-uuid",
"payment_source": "open_banking",
"currency": "GBP",
"operator_transaction_id": "VENUE-TXN-12345"
}
Automatic Calculation: For a £75 payment, the system automatically calculates £0.0075 (0.01%) as a micro-contribution to the user's pension account. This happens seamlessly with every payment.
Users can view their pension micro-contributions from events:
GET /api/events/contributions
Authorization: Bearer USER_TOKEN
Response:
{
"contributions": [
{
"id": "contrib-uuid",
"event_payment_id": "payment-uuid",
"pension_account_id": "pension-uuid",
"amount": 0.0075,
"currency": "GBP",
"status": "completed",
"created_at": "2024-12-15T15:30:00Z"
}
],
"total_contributed": 0.0525,
"total_count": 7
}
User buys: Match ticket (£50) + Food & drinks (£25) = £75 total
Micro-contribution: £0.0075 (0.01% of £75)
Result: Payment processed normally, micro-contribution automatically added to user's pension account
User sees: Real-time notification of contribution in their Opendeck dashboard