showVaultManager(
clientToken: string,
options: VaultManagerOptions
): Promise<PrimerVaultManager>
PrimerVaultManager
,
which is used to manage the customer’s payment methods stored in the Primer Vault.
Hide Parameters
Hide Properties
'2.4'
.'legacy'
if you encounter compatibility issues with the latest API version and wish to revert to the previous stable behavior.Hide Payment method option
Hide Properties
Hide Properties
Hide Properties
Hide Properties
Hide Properties
Hide Properties
Hide Properties
Hide Properties
Hide Properties
Hide Customization options
const options = {
/* Other options ... */
submitButton: {
useBuiltInButton: false, // Default to true
// Callback for receiving the submit button's visible state in the current scene
onVisible(isVisible, context: { currentSceneId }) {
// Show or hide your custom submit button
},
// Callback for receiving the submit button's disabled state in the current scene
onDisable(isDisabled, context: { currentSceneId }) {
// Disable or enable your custom submit button
},
// Callback for receiving the submit button's loading state in the current scene
onLoading(isLoading, context: { currentSceneId }) {
// Show your submit button in a loading state
},
// Callback for receiving the submit button's content in the current scene
onContentChange(content, context: { currentSceneId }) {
// Set your submit button's content with either the content provided or your own custom content
},
},
};
Hide Properties
Hide Callbacks
Hide context
Hide context
Hide context
Hide Properties
Hide Properties
Hide Lifecycle Callbacks
Hide Data
Hide PrimerClientError
Hide Promise<PrimerVaultManager>
import { Primer } from "@primer-io/checkout-web";
const clientToken = "YOUR_CLIENT_TOKEN";
async function showVaultManager() {
const primerVaultManager = await Primer.showVaultManager(clientToken, {
container: "#my-element",
// other options...
});
}