Payment Result
Displays the outcome of a payment attempt (success, error, or processing).
Usage
const result = client.components.paymentResult({
containerId: 'result',
status: 'success',
payment: paymentObject,
onDone: () => {
console.log('Done clicked');
},
});Configuration
PaymentResultConfig
containerId
string
Yes
ID of the container element
status
'success' | 'error' | 'processing'
Yes
Payment outcome
payment
Payment
No
Payment details (for success)
error
Error
No
Error details (for error status)
theme
ThemeConfig
No
Custom theme configuration
onDone
() => void
No
Called when "Done" is clicked
onRetry
() => void
No
Called when "Retry" is clicked (errors)
Status Types
Success
Shows a success message with payment details.
Error
Shows an error message with retry option.
Processing
Shows a processing indicator for async payments.
Example
Display
Success screen shows:
Success icon and message
Payment confirmation number
Amount paid
"Done" button
Error screen shows:
Error icon and message
Error details
"Retry" button
"Done" button
Processing screen shows:
Loading indicator
Processing message
"Done" button (to continue anyway)
Last updated
Was this helpful?
