Quick Start
Get up and running with UltraPay in just a few minutes. Follow these three simple steps to start accepting payments on your website.
1. Test Your Connection
First, verify that your API keys are working correctly by making a test request:
curl -X GET https://pay.ultrapay.cc/api/v1/auth/test \-H "X-Public-Key: upp_your_public_key" \-H "X-Secret-Key: ups_your_secret_key"
If successful, you'll receive a response showing your group details and available SafeSites.
2. Create a Payment
Create a payment session by sending a POST request with the payment details:
curl -X POST https://pay.ultrapay.cc/api/v1/payments/create \-H "X-Public-Key: upp_your_public_key" \-H "X-Secret-Key: ups_your_secret_key" \-H "Content-Type: application/json" \-d '{"amount": 5000,"currency": "usd","customerEmail": "customer@example.com","successUrl": "https://yoursite.com/thank-you","cancelUrl": "https://yoursite.com/checkout"}'
Response
{"success": true,"data": {"transactionId": "550e8400-e29b-41d4-a716-446655440000","paymentUrl": "https://checkout.stripe.com/c/pay/cs_xxx...","sessionId": "cs_live_xxx...","expiresAt": "2025-01-01T12:30:00.000Z"}}
3. Redirect Customer
Redirect your customer to the paymentUrl to complete their payment:
// Redirect customer to checkoutwindow.location.href = response.data.paymentUrl;
⚠️ Never use iframes! Payment URLs must be opened via full page redirect. Stripe and most payment processors block iframe embedding for security reasons. Using iframes will cause payment failures.
Tip: Always save the transactionId with your order. You'll need it to verify the payment status after the customer returns.
What's Next?
- Learn about Authentication to secure your API requests
- Explore all API Endpoints for full payment control
- Set up Webhooks for real-time payment notifications
- Check out Code Examples in your preferred language