Quick Start
Installation
Basic Setup
Core Concepts
Requests vs Elements
Acclaim uses two main concepts:
- Requests: Server-side objects that define what you want to do (payment or setup)
- Elements: Client-side UI components that collect payment information
Payment Request
- Create a Payment Request for immediate processing
- Create an Element to collect payment info
- Mount the element to your page
- Submit the element when the user clicks the pay button
Setup Request
- Create a Setup Request to save payment methods
- Create an Element to collect payment info
- Mount the element to your page
- Submit the element when the user clicks the submit button
Payment Processing
Creating Payment Requests
See the Payment Requests documentation for more information on how to create a payment request.
Creating and Mounting Elements
Element Options
Appearance Customization
Handling Payment Completion
Complete Payment Example
Setup (Saving Payment Methods)
Creating a Setup Request
See the Setup Requests documentation for more information on how to create a setup request.
Creating and Mounting Elements
Handling Setup
3D Secure Authentication
Acclaim automatically handles 3D Secure authentication when required. The process is transparent to your integration.
Manual 3DS Handling
Digital Wallets
Apple Pay
Apple Pay is automatically detected on supported devices and browsers. No additional setup required.
Requirements:
- Safari browser
- macOS with Touch ID or iPhone/iPad with Face ID/Touch ID
- Valid Apple Pay merchant certificate (handled by Acclaim)
Google Pay
Google Pay is automatically detected when the Google Pay API is available.
Requirements:
- Supported browser (Chrome, Edge, etc.)
- Valid Google Pay merchant configuration
PayPal
In order to use the PayPal payment method, you must supply a return_url and cancel_url in your payment request.
Event Handling
Element Events
Available Events
Error Handling
Common Error Types
Error Object Structure
Styling and Themes
Built-in Themes
Custom Styling
Testing
Test Cards
Use these test card numbers in sandbox mode:
Test Environment
Webhook Testing
Use tools like ngrok to test webhooks locally:
API Reference
Acclaim Constructor
Options:
publishableKey (string, required): Your Acclaim publishable API key
Methods
createPaymentElement(sessionId, container)
Creates a payment element for the given request.
Returns: Promise<PaymentElement>
PaymentElement Methods
mount(container)
Mount the element to a DOM container.
Parameters:
container (string|Element): CSS selector or DOM element
Returns: Promise<PaymentElement>
unmount()
Remove the element from the DOM.
on(event, callback)
Listen for element events.
Parameters:
event (string): Event name
callback (function): Event handler
update(options)
Update element appearance or configuration.
Parameters:
options (object): New options to apply
submit()
Confirm and process the payment or setup.
Returns: Promise<PaymentResult>
handle3DSecure(options)
Manually handle 3D Secure authentication.
Returns: Promise<AuthenticationResult>Last modified on May 23, 2026