Quick Start
Go from zero to your first successful test payment.
-
1. Create and verify your account
Sign up for a Starter or Registered Business account. You'll need a Ghana Card number to complete registration.
-
2. Generate your API keys
Once approved, go to API Keys in your dashboard and click Generate API Key. Save your Secret Key immediately — it's only shown once.
-
3. Initialize a transaction
curl -X POST https://starpaysgh.com/api/v1/transactions/initialize \ -H "Authorization: Bearer sk_test_xxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"amount": 50, "customer_email": "customer@example.com"}'$ch = curl_init('https://starpaysgh.com/api/v1/transactions/initialize'); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer sk_test_xxxxxxxxxxxx', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => json_encode([ 'amount' => 50, 'customer_email' => 'customer@example.com', ]), ]); $response = json_decode(curl_exec($ch), true); curl_close($ch);const response = await fetch('https://starpaysgh.com/api/v1/transactions/initialize', { method: 'POST', headers: { 'Authorization': 'Bearer sk_test_xxxxxxxxxxxx', 'Content-Type': 'application/json', }, body: JSON.stringify({ amount: 50, customer_email: 'customer@example.com' }), }); const data = await response.json();import requests response = requests.post( 'https://starpaysgh.com/api/v1/transactions/initialize', headers={'Authorization': 'Bearer sk_test_xxxxxxxxxxxx'}, json={'amount': 50, 'customer_email': 'customer@example.com'}, ) data = response.json() -
4. Redirect your customer
The response includes a
checkout_url. Send your customer there to complete payment. -
5. Confirm the result
Either listen for the webhook, or call the verify endpoint directly.