1
0
Files
PayPal-PHP-Server-SDK/doc/models/payment-token-response.md
2024-09-06 15:38:17 +05:00

4.2 KiB

Payment Token Response

Full representation of a saved payment token.

Structure

PaymentTokenResponse

Fields

Name Type Tags Description Getter Setter
id ?string Optional The PayPal-generated ID for the vault token.
Constraints: Minimum Length: 1, Maximum Length: 36, Pattern: ^[0-9a-zA-Z_-]+$
getId(): ?string setId(?string id): void
customer ?CustomerRequest Optional Customer in merchant's or partner's system of records. getCustomer(): ?CustomerRequest setCustomer(?CustomerRequest customer): void
paymentSource ?PaymentTokenResponsePaymentSource Optional The vaulted payment method details. getPaymentSource(): ?PaymentTokenResponsePaymentSource setPaymentSource(?PaymentTokenResponsePaymentSource paymentSource): void
links ?(LinkDescription[]) Optional An array of related HATEOAS links.
Constraints: Minimum Items: 1, Maximum Items: 32
getLinks(): ?array setLinks(?array links): void

Example (as JSON)

{
  "id": "id0",
  "customer": {
    "id": "id0",
    "merchant_customer_id": "merchant_customer_id2"
  },
  "payment_source": {
    "card": {
      "name": "name6",
      "last_digits": "last_digits0",
      "brand": "SYNCHRONY",
      "expiry": "expiry4",
      "billing_address": {
        "address_line_1": "address_line_12",
        "address_line_2": "address_line_28",
        "admin_area_2": "admin_area_28",
        "admin_area_1": "admin_area_14",
        "postal_code": "postal_code0",
        "country_code": "country_code8"
      }
    },
    "paypal": {
      "description": "description2",
      "shipping": {
        "name": {
          "full_name": "full_name6"
        },
        "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"
        }
      },
      "permit_multiple_payment_tokens": false,
      "usage_type": "usage_type2",
      "customer_type": "customer_type6"
    },
    "venmo": {
      "description": "description6",
      "shipping": {
        "name": {
          "full_name": "full_name6"
        },
        "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"
        }
      },
      "permit_multiple_payment_tokens": false,
      "usage_type": "usage_type6",
      "customer_type": "customer_type0"
    },
    "apple_pay": {
      "card": {
        "name": "name6",
        "last_digits": "last_digits0",
        "type": "UNKNOWN",
        "brand": "SYNCHRONY",
        "billing_address": {
          "address_line_1": "address_line_12",
          "address_line_2": "address_line_28",
          "admin_area_2": "admin_area_28",
          "admin_area_1": "admin_area_14",
          "postal_code": "postal_code0",
          "country_code": "country_code8"
        }
      }
    },
    "bank": {
      "ach_debit": {
        "verification_status": "verification_status6"
      },
      "sepa_debit": {
        "iban_last_chars": "iban_last_chars8",
        "account_holder_name": {
          "key1": "val1",
          "key2": "val2"
        },
        "billing_address": {
          "address_line_1": "address_line_12",
          "address_line_2": "address_line_28",
          "admin_area_2": "admin_area_28",
          "admin_area_1": "admin_area_14",
          "postal_code": "postal_code0",
          "country_code": "country_code8"
        },
        "authorization_details": {
          "status": "NOT_SUPPORTED"
        }
      }
    }
  },
  "links": [
    {
      "href": "href6",
      "rel": "rel0",
      "method": "HEAD"
    },
    {
      "href": "href6",
      "rel": "rel0",
      "method": "HEAD"
    }
  ]
}