1
0
Files
PayPal-PHP-Server-SDK/doc/models/apple-pay-payment-object.md
2025-05-27 17:46:31 +00:00

3.8 KiB

Apple Pay Payment Object

Information needed to pay using ApplePay.

Structure

ApplePayPaymentObject

Fields

Name Type Tags Description Getter Setter
id ?string Optional ApplePay transaction identifier, this will be the unique identifier for this transaction provided by Apple. The pattern is defined by an external party and supports Unicode.

Constraints: Minimum Length: 1, Maximum Length: 250, Pattern: ^.*$
getId(): ?string setId(?string id): void
token ?string Optional Encrypted ApplePay token, containing card information. This token would be base64encoded. The pattern is defined by an external party and supports Unicode.

Constraints: Minimum Length: 1, Maximum Length: 10000, Pattern: ^.*$
getToken(): ?string setToken(?string token): void
name ?string Optional The full name representation like Mr J Smith.

Constraints: Minimum Length: 3, Maximum Length: 300
getName(): ?string setName(?string name): void
emailAddress ?string Optional The 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])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-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])+)\])$
getEmailAddress(): ?string setEmailAddress(?string emailAddress): void
phoneNumber ?PhoneNumber Optional The phone number in its canonical international E.164 numbering plan format. getPhoneNumber(): ?PhoneNumber setPhoneNumber(?PhoneNumber phoneNumber): void
card ?ApplePayCardResponse Optional The Card from Apple Pay Wallet used to fund the payment. getCard(): ?ApplePayCardResponse setCard(?ApplePayCardResponse card): void
attributes ?ApplePayAttributesResponse Optional Additional attributes associated with the use of Apple Pay. getAttributes(): ?ApplePayAttributesResponse setAttributes(?ApplePayAttributesResponse attributes): void
storedCredential ?CardStoredCredential Optional Provides additional details to process a payment using a card that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file). Parameter compatibility: payment_type=ONE_TIME is compatible only with payment_initiator=CUSTOMER. usage=FIRST is compatible only with payment_initiator=CUSTOMER. previous_transaction_reference or previous_network_transaction_reference is compatible only with payment_initiator=MERCHANT. Only one of the parameters - previous_transaction_reference and previous_network_transaction_reference - can be present in the request. getStoredCredential(): ?CardStoredCredential setStoredCredential(?CardStoredCredential storedCredential): void

Example (as JSON)

{
  "id": "id6",
  "token": "token0",
  "name": "name6",
  "email_address": "email_address4",
  "phone_number": {
    "national_number": "national_number6"
  }
}