HivePay Docs v1.0
Sign In Get API Keys
POST /api/v1/card-collection Visa • Mastercard

Card Checkout (USD)

Generate secure, hosted 3D-Secure credit and debit card checkout sessions for customers anywhere in the world paying in USD.

Request Parameters (JSON Body)

Parameter Type Required Description
amount number Required The amount to charge in USD (e.g. 25.00). Min $1.00.
currency string Required Set to USD.
name string Required Customer full name for cardholder verification.
email string Required Customer email address for card payment receipts.
reference string Optional Your unique internal invoice reference ID.
return_url string Optional Redirect URL where customer is sent after completing or cancelling checkout.

Code Example

curl -X POST https://hivepay.site/api/v1/card-collection \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "X-API-Secret: YOUR_API_SECRET" \
  -H "X-Account-Number: YOUR_ACCOUNT_NUMBER" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 25.00,
    "currency": "USD",
    "name": "Jane Doe",
    "email": "[email protected]",
    "reference": "CRD-1001",
    "description": "Premium Subscription",
    "return_url": "https://yourdomain.com/checkout/success"
  }'

Response (200 OK)

Response JSON
{
  "success": true,
  "message": "Card checkout session created successfully.",
  "reference": "CRD-1001",
  "gateway_reference": "HP-CRD-9876543210",
  "checkout_url": "https://checkout.hivepay.co/pay?session=hp_chk_...",
  "amount": 25,
  "currency": "USD",
  "status": "pending"
}