What is a Hosted Payment Page?
A hosted payment page is a secure checkout page hosted by Revolv3. Instead of building your own payment form, you redirect customers to Revolv3’s page where they enter their payment details. Benefits:- ✅ No card data handling: You never see or handle sensitive payment information
- ✅ PCI compliance: Revolv3 handles all PCI requirements
- ✅ Quick integration: Just create a checkout session and redirect
- ✅ Optimized UX: Payment forms are designed for conversion
- ✅ Mobile-friendly: Works great on all devices
- You want the fastest integration possible
- You prefer not to handle payment forms
- You want Revolv3 to manage the entire checkout experience
- You’re okay with redirecting customers to a different URL
Prerequisites
Before you begin, make sure you have:- ✅ Revolv3 account: Active merchant account with configured processors
- ✅ API key: Developer static token for authentication
- ✅ Trusted hostnames: Your website domain added to Trusted Checkout Hostnames in the portal
Step 1: Create a Checkout Session
Create a checkout session by sending a POST request to the checkout endpoint.API Endpoint
{{Api Root}} with:
- Production:
api.revolv3.com - Sandbox:
api-sandbox.revolv3.com
Required Headers
Include these headers:Origin: Your website’s origin (e.g.,https://mysite.com)x-revolv3-token: Your API keyContent-Type:application/json
Sample Request
Understanding the Request
| Field | Description |
|---|---|
ReturnUrl | Important: Where to redirect the customer after payment. Must be URL-encoded and the hostname must be in your trusted hostnames list. |
OneTimePayment.CheckoutLineItems | Array of items the customer is purchasing. Each item has a name, description, value, and value type. |
ReturnUrl must be URL-encoded. For example:
- Original:
https://mysite.com/checkout/complete - Encoded:
https%3A%2F%2Fmysite.com%2Fcheckout%2Fcomplete
Response
When you create a checkout session, you’ll get back a checkout link:checkoutId: Unique identifier for this checkout session (save this for tracking)checkoutLink: The URL to redirect the customer to (this is Revolv3’s secure payment page)
Step 2: Redirect Customer to Checkout
Once you have thecheckoutLink, redirect the customer to it:
JavaScript Example
Server-Side Redirect Example
Step 3: Customer Completes Payment
- Customer is redirected to Revolv3’s secure payment page
- Customer enters payment details (card, billing address, etc.)
- Customer reviews order details
- Customer completes payment
- Customer is redirected back to your
ReturnUrl
Step 4: Handle the Return
When the customer returns to yourReturnUrl, you can:
- Check checkout status: Use the checkout API to get the current status
- Show confirmation: Display a success or failure message
- Update order status: Mark the order as paid or failed in your system
Getting Checkout Status
Use the checkout ID to get the current status:{checkoutId} with the ID from the checkout session response.
Referrer-Policy Header
Referrer-Policy HTTP headerTo ensure Revolv3 can verify that the customer was redirected from your authorized website, add a Referrer-Policy header with the value In HTTP requests, include the header:
origin to your HTTP requests or HTML pages.In HTML, add this meta tag:Real-World Example Flow
Complete Integration Example
1. Customer clicks “Checkout” on your site 2. Your backend creates checkout session:Best Practices
- Always set ReturnUrl: Customers need somewhere to return after payment
- URL encode ReturnUrl: Encode it properly before sending
- Store checkoutId: Save it so you can check status later
- Handle errors: Check checkout status when customer returns
- Test thoroughly: Test the full flow in sandbox before production
Common Questions
Q: What if the customer closes the payment page? A: The checkout session remains valid. You can check its status or create a new one if needed. Q: Can I customize the payment page? A: The hosted page uses Revolv3’s standard design. For more customization, consider embedded checkout. Q: How long is a checkout session valid? A: Checkout sessions typically expire after a period of inactivity. Check with Revolv3 support for specific timeout values. Q: Can I use this for subscriptions? A: Yes, checkout supports both one-time payments and subscriptions. See the API reference for subscription checkout options.Next Steps
- Embedded Checkout — Learn about embedding checkout in your site
- Checkout Line Items — Understand how to structure checkout items
- Checkout Overview — Return to checkout overview

