Vault Response
August 21, 2026 · View on GitHub
The details about a saved payment source.
Structure
VaultResponse
Fields
| Name | Type | Tags | Description | Getter | Setter |
|---|---|---|---|---|---|
Id | String | Optional | The PayPal-generated ID for the saved payment source. Constraints: Minimum Length: 1, Maximum Length: 255 | String getId() | setId(String id) |
Status | VaultStatus | Optional | The vault status. Constraints: Minimum Length: 1, Maximum Length: 255, Pattern: ^[0-9A-Z_]+$ | VaultStatus getStatus() | setStatus(VaultStatus status) |
Customer | VaultCustomer | Optional | This object represents a merchant’s customer, allowing them to store contact details, and track all payments associated with the same customer. | VaultCustomer getCustomer() | setCustomer(VaultCustomer customer) |
Links | List<LinkDescription> | Optional, Read-only | An array of request-related HATEOAS links. Constraints: Minimum Items: 1, Maximum Items: 10 | List | setLinks(List |
Example
import com.paypal.sdk.models.Name;
import com.paypal.sdk.models.VaultCustomer;
import com.paypal.sdk.models.VaultResponse;
import com.paypal.sdk.models.VaultStatus;
VaultResponse vaultResponse = new VaultResponse.Builder()
.id("id2")
.status(VaultStatus.VAULTED)
.customer(new VaultCustomer.Builder()
.id("id0")
.name(new Name.Builder()
.givenName("given_name2")
.surname("surname8")
.build())
.build())
.build();