Vault Card Experience Context
August 21, 2026 ยท View on GitHub
A resource representing an experience context of vault a card.
Structure
VaultCardExperienceContext
Fields
| Name | Type | Tags | Description | Getter | Setter |
|---|---|---|---|---|---|
BrandName | String | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode. Constraints: Minimum Length: 1, Maximum Length: 127, Pattern: ^.*$ | String getBrandName() | setBrandName(String brandName) |
Locale | String | Optional | The language tag for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the ISO 639-2 language code, the optional ISO-15924 script tag, and the ISO-3166 alpha-2 country code or M49 region code. Constraints: Minimum Length: 2, Maximum Length: 10, Pattern: ^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}|[0-9]{3}))?$ | String getLocale() | setLocale(String locale) |
ReturnUrl | String | Optional | The URL where the customer is redirected after customer approves leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS. Constraints: Minimum Length: 1, Maximum Length: 4000 | String getReturnUrl() | setReturnUrl(String returnUrl) |
CancelUrl | String | Optional | The URL where the customer is redirected after customer cancels or leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS. Constraints: Minimum Length: 1, Maximum Length: 4000 | String getCancelUrl() | setCancelUrl(String cancelUrl) |
VaultInstruction | VaultInstructionAction | Optional | DEPRECATED. Vault Instruction on action to be performed after a successful payer approval. Constraints: Minimum Length: 1, Maximum Length: 255, Pattern: ^[A-Z_]+$ | VaultInstructionAction getVaultInstruction() | setVaultInstruction(VaultInstructionAction vaultInstruction) |
UserAction | VaultUserAction | Optional | User Action on action to be performed after a successful payer approval. Default: VaultUserAction.CONTINUEConstraints: Minimum Length: 1, Maximum Length: 255, Pattern: ^[A-Z_]+$ | VaultUserAction getUserAction() | setUserAction(VaultUserAction userAction) |
Example
import com.paypal.sdk.models.VaultCardExperienceContext;
import com.paypal.sdk.models.VaultInstructionAction;
import com.paypal.sdk.models.VaultUserAction;
VaultCardExperienceContext vaultCardExperienceContext = new VaultCardExperienceContext.Builder()
.brandName("brand_name2")
.locale("locale6")
.returnUrl("return_url4")
.cancelUrl("cancel_url6")
.vaultInstruction(VaultInstructionAction.ON_CREATE_PAYMENT_TOKENS)
.userAction(VaultUserAction.CONTINUE)
.build();