Card Payments
The Card Payments API enables merchants to securely accept payments from customers using Visa, Mastercard, and other supported bank cards. SplashPay provides a hosted payment page that securely captures card details and processes payments through a PCI DSS compliant payment gateway.Hosted Checkout
Customers are redirected to a secure payment page hosted by SplashPay’s payment provider. Card details are never transmitted through your servers.
Endpoint
Base URL
- Sandbox
- Production
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| reference | string | Yes | Unique merchant payment reference |
| buyer_name | string | Yes | Customer full name |
| buyer_email | string | Yes | Customer email address |
| buyer_phone | string | Yes | Customer phone number |
| amount | number | Yes | Payment amount |
| currency | string | Yes | Currency (TZS) |
| redirect_url | string | Yes | URL where customer is redirected after successful payment |
| cancel_url | string | Yes | URL where customer is redirected if payment is cancelled |
| billing_firstname | string | Yes | Billing first name |
| billing_lastname | string | Yes | Billing last name |
| billing_address | string | Yes | Billing address |
| billing_city | string | Yes | Billing city |
| billing_state | string | Yes | Billing state |
| billing_postcode | string | Yes | Billing postcode |
| billing_country | string | Yes | ISO 3166-1 Alpha-2 country code |
| billing_phone | string | Yes | Billing phone number |
Example Request
Successful Response
Redirect Customer
After receiving the response, redirect your customer to the URL provided in thepayment_gateway_url field.
Note
The payment_gateway_url may be Base64 encoded. Decode it before redirecting the customer if required by your integration.
Example
Payment Status
| Status | Description |
|---|---|
| pending | Waiting for customer to complete card payment |
| processing | Payment is being processed |
| success | Payment completed successfully |
| failed | Payment failed |
| cancelled | Customer cancelled the payment |
| expired | Payment session expired |
Webhook Payload
Error Responses
Invalid Request
Authentication Failed
Duplicate Request
Best Practices
Handle Webhooks
Do not rely solely on the customer’s browser redirect. Update payment status using webhook notifications.
Next Steps
Payment Status
Retrieve the latest status of a card payment.
Webhooks
Receive real-time payment notifications.
