On this page
No Headings
Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.
Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
readwriteThe unique external identifier of the customer
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://api-m.sandbox.paypal.com/v1/commerce/billing/customers/9c402857-a71e-4ea2-bcf9-57d3a41bc6ba" \ -H "Content-Type: application/json" \ -d '{}'{
"name": "Hello Customer",
"external_id": "5eb02857-a71e-4ea2-bcf9-1753826282",
"email": "customer1@gmail.com",
"address": {
"line1": "123 First Street",
"line2": "Alameda Court",
"city": "San Jose",
"state": "CA",
"postal_code": "94551",
"country": "US"
},
"phone": "5839458934",
"payment_method_token": "6ta69628uw121251c",
"payment_method_type": "CARD",
"id": "f772b19c-c5c2-426d-8871-346a6cd094c5",
"metadata": [
{
"key": "Purchase Order",
"value": "PO-2023-4521",
"display_in_invoice": true
},
{
"key": "Sales Region",
"value": "West Coast",
"display_in_invoice": false
}
]
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"debug_id": "dc99e3955cdd8",
"details": [
{
"field": "/email",
"value": "abc",
"location": "body",
"issue": "INVALID_PARAMETER_VALUE",
"description": "The value of a field does not conform to the expected format."
}
]
}{
"name": "NOT_AUTHORIZED",
"message": "Authorization failed due to insufficient permissions.",
"debug_id": "565f78f101498",
"details": [
{
"issue": "PERMISSION_DENIED",
"description": "You do not have permission to access or perform operations on this resource."
}
]
}{
"name": "string",
"debug_id": "string",
"message": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "string",
"issue": "string",
"description": "string"
}
]
}{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "90957fca61718",
"details": [
{
"field": "/email",
"value": "sdfwdj@sdfs.com",
"location": "body",
"issue": "UNSUPPORTED_EMAIL",
"description": "The email provided is not supported."
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"message": "An internal server error has occurred.",
"debug_id": "90957fca61718"
}Full name of the customer
1 <= length <= 512The internationalized email address.
^.+@[^"\-].+$3 <= length <= 254Unique code used to identify the billing entity. Must contain only alphanumeric characters, underscores, and hyphens.
^[a-zA-Z0-9_-]*$Address of the customer or party.
Primary phone number of the customer, including country code if available.
phoneToken representing the customer's saved payment method in PayPal Vault.
1 <= length <= 36List of unique codes used to identify taxes to be applied.