Authorizations
Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.
curl --request GET \
--url https://api-m.paypal.com/v1/commerce/billing/customers \
--header 'Authorization: Bearer <token>'
{
"customers": [
{
"id": "f772b19c-c5c2-426d-8871-346a6cd094c5",
"name": "TechStart Solutions",
"external_id": "5eb02857-a71e-4ea2-bcf9-1753826282",
"email": "finance@techstart.io",
"address": {
"line1": "123 Innovation Way",
"line2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"postal_code": "94087",
"country": "US"
},
"phone": "+1 (555) 789-1234",
"payment_method_token": "6ta69628uw121251c",
"payment_method_type": "CARD",
"metadata": [
{
"key": "Purchase Order",
"value": "PO-2023-4521",
"display_in_invoice": true
},
{
"key": "Sales Region",
"value": "West Coast",
"display_in_invoice": false
}
]
},
{
"id": "3c25d14a-5fe4-455e-8862-dfb07d384d08",
"name": "TechStart Solutions",
"external_id": "5eb02857-a71e-4ea2-bcf9-1753642317",
"email": "finance@techstart.io",
"address": {
"line1": "123 Innovation Way",
"line2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"postal_code": "94087",
"country": "US"
},
"phone": "+1 (555) 789-1234",
"payment_method_token": "6ta69628uw121251c",
"payment_method_type": "CARD"
}
]
}
curl --request GET \
--url https://api-m.paypal.com/v1/commerce/billing/customers \
--header 'Authorization: Bearer <token>'
{
"customers": [
{
"id": "f772b19c-c5c2-426d-8871-346a6cd094c5",
"name": "TechStart Solutions",
"external_id": "5eb02857-a71e-4ea2-bcf9-1753826282",
"email": "finance@techstart.io",
"address": {
"line1": "123 Innovation Way",
"line2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"postal_code": "94087",
"country": "US"
},
"phone": "+1 (555) 789-1234",
"payment_method_token": "6ta69628uw121251c",
"payment_method_type": "CARD",
"metadata": [
{
"key": "Purchase Order",
"value": "PO-2023-4521",
"display_in_invoice": true
},
{
"key": "Sales Region",
"value": "West Coast",
"display_in_invoice": false
}
]
},
{
"id": "3c25d14a-5fe4-455e-8862-dfb07d384d08",
"name": "TechStart Solutions",
"external_id": "5eb02857-a71e-4ea2-bcf9-1753642317",
"email": "finance@techstart.io",
"address": {
"line1": "123 Innovation Way",
"line2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"postal_code": "94087",
"country": "US"
},
"phone": "+1 (555) 789-1234",
"payment_method_token": "6ta69628uw121251c",
"payment_method_type": "CARD"
}
]
}
Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.
Was this page helpful?