Skip to main content
Customer management helps you update an existing customer’s details and change their payment method. You can also remove customer information from PayPal when their business relationship ends.

Update customer details

Use a valid access token and send a PUT request to /v1/commerce/billing/customers/{id} with the modified request parameters such as customer name, email, address, phone, payment method token, and metadata. Path parameter: id is the customer’s unique identifier returned by PayPal when you registered the customer. On successful request processing, PayPal returns the updated customer information.
curl -X PUT 'https://api-m.sandbox.paypal.com/v1/commerce/billing/customers/f772b19c-c5c2-426d-8871-346a6cd094c5' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS-TOKEN>' \
-d '{
  "name": "Jane Doe",
  "email": "jdoe@gmail.com",
  "billing_entity_code": "US_ENTITY",
  "address": {
    "line1": "123 First Street",
    "line2": "Alameda Court",
    "city": "San Jose",
    "state": "CA",
    "postal_code": "95110",
    "country": "US"
  },
  "phone": "5839458934",
  "payment_method_token": "6ta69628uw121251c",
  "tax_codes": [
    "standard_vat",
    "digital_services_tax"
  ],
  "metadata": [
    {
      "key": "Purchase Order",
      "value": "PO-2023-4521",
      "display_in_invoice": true
    },
    {
      "key": "Sales Region",
      "value": "West Coast",
      "display_in_invoice": false
    }
  ]
}'
Note: For the exhaustive list of request and response parameter descriptions, see API reference.

Change payment method

Use a valid access token and send a PUT request to /v1/commerce/billing/customers/{id} with the modified payment method token. Path parameter: id is the customer’s unique identifier returned by PayPal when you registered the customer. There are two scenarios for updating a customer’s payment method: Scenario 1: Customer adding a new payment method
  1. Generate a payment method token.
  2. Use the following sample request to update customer details with the new token.
Scenario 2: Customer changing their payment method to an already vaulted payment method
  1. Retrieve the payment method token associated with the selected payment method. For information on this, see Get saved payment method details for customer confirmation.
  2. Use the following sample request to update customer details with the retrieved token.
On successful request processing, PayPal returns the updated customer information with the new payment method token.
curl -X PUT 'https://api-m.sandbox.paypal.com/v1/commerce/billing/customers/f772b19c-c5c2-426d-8871-346a6cd094c5' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS-TOKEN>' \
-d '{
  "name": "Jane Doe",
  "email": "jdoe@gmail.com",
  "billing_entity_code": "US_ENTITY",
  "address": {
    "line1": "123 First Street",
    "line2": "Alameda Court",
    "city": "San Jose",
    "state": "CA",
    "postal_code": "95110",
    "country": "US"
  },
  "phone": "5839458934",
  "payment_method_token": "8kf93hd72jw903847",
  "tax_codes": [
    "standard_vat",
    "digital_services_tax"
  ],
  "metadata": [
    {
      "key": "Purchase Order",
      "value": "PO-2023-4521",
      "display_in_invoice": true
    },
    {
      "key": "Sales Region",
      "value": "West Coast",
      "display_in_invoice": false
    }
  ]
}'
Note: For the exhaustive list of request and response parameter descriptions, see API reference.

Delete customer information

Use a valid access token and send a DELETE request to /v1/commerce/billing/customers/{id}. Path parameter: id is the customer’s unique identifier returned by PayPal when you registered the customer. On successful request processing, PayPal returns a 204 status code confirming the customer information has been removed.
curl -X DELETE 'https://api-m.sandbox.paypal.com/v1/commerce/billing/customers/f772b19c-c5c2-426d-8871-346a6cd094c5' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS-TOKEN>' \
I