Paypal Payment Token

November 13, 2025 ยท View on GitHub

Full representation of a PayPal Payment Token.

Structure

PaypalPaymentToken

Fields

NameTypeTagsDescriptionGetterSetter
DescriptionStringOptionalThe description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.

Constraints: Minimum Length: 1, Maximum Length: 128, Pattern: ^.*$
String getDescription()setDescription(String description)
UsagePatternUsagePatternOptionalExpected business/charge model for the billing agreement.

Constraints: Minimum Length: 1, Maximum Length: 30, Pattern: ^[0-9A-Z_]+$
UsagePattern getUsagePattern()setUsagePattern(UsagePattern usagePattern)
ShippingVaultedDigitalWalletShippingDetailsOptionalThe shipping details.VaultedDigitalWalletShippingDetails getShipping()setShipping(VaultedDigitalWalletShippingDetails shipping)
PermitMultiplePaymentTokensBooleanOptionalCreate multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.

Default: false
Boolean getPermitMultiplePaymentTokens()setPermitMultiplePaymentTokens(Boolean permitMultiplePaymentTokens)
UsageTypePaypalPaymentTokenUsageTypeOptionalThe usage type associated with a digital wallet payment token.

Constraints: Minimum Length: 1, Maximum Length: 255, Pattern: ^[0-9A-Z_]+$
PaypalPaymentTokenUsageType getUsageType()setUsageType(PaypalPaymentTokenUsageType usageType)
CustomerTypePaypalPaymentTokenCustomerTypeOptionalThe customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.

Constraints: Minimum Length: 1, Maximum Length: 255, Pattern: ^[0-9A-Z_]+$
PaypalPaymentTokenCustomerType getCustomerType()setCustomerType(PaypalPaymentTokenCustomerType customerType)
EmailAddressStringOptionalThe internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.


Constraints: Minimum Length: 3, Maximum Length: 254, Pattern: (?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
String getEmailAddress()setEmailAddress(String emailAddress)
PayerIdStringOptionalThe account identifier for a PayPal account.

Constraints: Minimum Length: 13, Maximum Length: 13, Pattern: ^[2-9A-HJ-NP-Z]{13}$
String getPayerId()setPayerId(String payerId)
NameNameOptionalThe name of the party.Name getName()setName(Name name)
PhonePhoneWithTypeOptionalThe phone information.PhoneWithType getPhone()setPhone(PhoneWithType phone)
AddressAddressOptionalThe portable international postal address. Maps to AddressValidationMetadata and HTML 5.1 Autofilling form controls: the autocomplete attribute.Address getAddress()setAddress(Address address)
AccountIdStringOptionalThe account identifier for a PayPal account.

Constraints: Minimum Length: 13, Maximum Length: 13, Pattern: ^[2-9A-HJ-NP-Z]{13}$
String getAccountId()setAccountId(String accountId)
PhoneNumberPhoneOptionalThe phone number, in its canonical international E.164 numbering plan format.Phone getPhoneNumber()setPhoneNumber(Phone phoneNumber)

Example (as JSON)

{
  "permit_multiple_payment_tokens": false,
  "description": "description6",
  "usage_pattern": "RECURRING_PREPAID",
  "shipping": {
    "name": {
      "full_name": "full_name6"
    },
    "email_address": "email_address2",
    "phone_number": {
      "country_code": "country_code2",
      "national_number": "national_number6"
    },
    "type": "SHIPPING",
    "address": {
      "address_line_1": "address_line_16",
      "address_line_2": "address_line_26",
      "admin_area_2": "admin_area_20",
      "admin_area_1": "admin_area_12",
      "postal_code": "postal_code8",
      "country_code": "country_code6"
    }
  },
  "usage_type": "MERCHANT"
}