Vega
Vega

Reputation: 2929

PayPal Express Checkout - get PII / billing information from the PayPal account on payment

I am searching for a way to implement PayPal Express Checkout for a subscription model on a website.

People only need to enter an email address to buy a subscription for an easy purchase flow = we don't get any PII like first name + last name + address = we can't analyze customer data.

I am trying to find a way to get the PayPal PII from that PayPal account while only requiring an email address on our site to make the purchase as easy as possible.

So far I found:

which should work according to the docs for my use case with using GetExpressCheckoutDetails. But all those are deprecated/legacy.

Is there a modern replacement for GetExpressCheckoutDetails? Couldn't find anything in the current recommended REST API (https://developer.paypal.com/api/rest/).

Upvotes: 0

Views: 39

Answers (1)

Preston PHX
Preston PHX

Reputation: 30359

When using a current Subscriptions integration, whether it be a custom API+JS SDK integration or created via www.sandbox.paypal.com/billing/plans , the resulting profile id will have collected a shipping address by default. Example response:

GET v1/billing/subscriptions/I-HD1D7AUFMMVF

{
  "status": "ACTIVE",
  "status_update_time": "2024-03-22T21:44:49Z",
  "id": "I-HD1D7AUFMMVF",
  "plan_id": "P-3P2549811A474014LMABCDEF",
  "start_time": "2024-03-22T21:44:14Z",
  "quantity": "1",
  "shipping_amount": {
    "currency_code": "USD",
    "value": "0.0"
  },
  "subscriber": {
    "email_address": "[email protected]",
    "payer_id": "PSAJ5P72ZXFDW",
    "name": {
      "given_name": "Preston",
      "surname": "PHX"
    },
    "shipping_address": {
      "address": {
        "address_line_1": "1 Main St",
        "admin_area_2": "San Jose",
        "admin_area_1": "CA",
        "postal_code": "95131",
        "country_code": "US"
      }
    }
  },
  "billing_info": {
    "outstanding_balance": {
      "currency_code": "USD",
      "value": "0.0"
    },
    "cycle_executions": [
      {
        "tenure_type": "REGULAR",
        "sequence": 1,
        "cycles_completed": 1,
        "cycles_remaining": 0,
        "current_pricing_scheme_version": 1,
        "total_cycles": 0
      }
    ],
    "last_payment": {
      "amount": {
        "currency_code": "USD",
        "value": "100.0"
      },
      "time": "2024-03-22T21:44:48Z"
    },
    "next_billing_time": "2024-03-23T10:00:00Z",
    "failed_payments_count": 0
  },
  "create_time": "2024-03-22T21:44:47Z",
  "update_time": "2024-03-22T21:44:49Z",
  "plan_overridden": false,
  "links": [...]
}

Billing information, such as the name and address associated with a card used, or address of the PayPal account, is kept private to the sender's PayPal account by design. (This security is one of the advantages of using PayPal as a payment method on random websites a payer hasn't done business with before)

If you need to collect additional information along with a subscription, use your own form fields.

Upvotes: 0

Related Questions