Get a list of PrimerVaultedPaymentMethod for the customerId attached to the client session.
Build your own UI to display, manage and perform payments with them.
The list of vaulted payment methods is not affected by the checkout builder’s conditions.
For example, if you configured the checkout builder to not show Paypal with the current client session,
but Paypal was vaulted previously, fetchVaultedPaymentMethods will still return it.
The mentioned issue will be addressed and resolved in an upcoming release,
improving the overall functionality of the Vault Manager.
KOTLIN
Copy
Ask AI
suspend fun fetchVaultedPaymentMethods(): Result<List<PrimerVaultedPaymentMethod>>
The fetchVaultedPaymentMethods method fetches the vaulted payment methods for the customerId attached to the client session
and returns a result object of type Result.
The Result class represents the outcome of the operation, indicating success or failure.
By inspecting the returned Result object, you can determine the success or failure of the fetching of the vaulted payment methods.
This allows you to handle different scenarios based on the result.