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
readwriteapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api-m.sandbox.paypal.com/v1/commerce/billing/billing-entities" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme Inc", "code": "acme_inc" }'{
"id": "e7f4c956-23fc-663d-a8c3-egcb1f5d4h0e",
"code": "acme_west",
"name": "Acme Western Division",
"default_currency": "USD",
"finalize_zero_amount_invoice": true,
"is_default": false,
"address": {
"line1": "789 Tech Boulevard",
"line2": "Suite 1200",
"city": "San Francisco",
"state": "CA",
"country": "US",
"postal_code": "94107"
},
"legal_name": "Acme Corporation Western LLC",
"legal_number": "US87654321",
"email": "[email protected]",
"timezone": "America/Los_Angeles",
"created_at": "2023-01-15T00:00:00Z",
"updated_at": "2023-01-15T00:00:00Z"
}{
"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": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "90957fca61718",
"details": [
{
"field": "/email",
"value": "[email protected]",
"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"
}Name of the billing entity
Currency code in ISO 4217 format.
^[A-Z]{3}$3 <= length <= 3Whether to finalize invoices with zero amount
Address of the customer or party.
Legal name of the entity
Legal registration number
Contact email for the entity
emailThe timezone of the billing entity
Unique code used to identify the billing entity. Must contain only alphanumeric characters, underscores, and hyphens.
^[a-zA-Z0-9_-]*$