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
Filter by subscription ID.
^[a-zA-Z0-9_-]*$application/json
application/json
application/json
application/json
curl -X GET "https://api-m.sandbox.paypal.com/customers/9c402857-a71e-4ea2-bcf9-57d3a41bc6ba/current_usage?subscription_id=SUB_1752779018503"{
"from_datetime": "2024-01-01T00:00:00Z",
"to_datetime": "2024-01-31T23:59:59Z",
"issuing_date": "2024-01-31",
"total_amount": {
"currency_code": "USD",
"value": 270
},
"taxes_amount": {
"currency_code": "USD",
"value": 2.75
},
"charges_usage": [
{
"units": "150.0",
"events_count": 3050,
"amount": {
"currency_code": "USD",
"value": 75
},
"charge": {
"id": "1c31a90-1c31-1c31-1c31-1c311c311c31",
"metric_id": "metric_01H3YT8P7Q5R3S1T2U0V4W9X8",
"charge_model": "STANDARD",
"properties": {
"amount": "0.50"
},
"min_amount": {
"value": 0.01,
"currency_code": "USD"
}
},
"metric": {
"name": "API Calls",
"code": "api_calls",
"aggregation_type": "COUNT"
}
},
{
"units": "2400.0",
"events_count": 2400,
"amount": {
"currency_code": "USD",
"value": 120
},
"charge": {
"id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"metric_id": "metric_02H3YT8P7Q5R3S1T2U0V4W9Y9",
"charge_model": "STANDARD",
"properties": {
"amount": "0.05"
},
"min_amount": {
"value": 0.01,
"currency_code": "USD"
}
},
"metric": {
"name": "Storage GB-Hours",
"code": "storage_gb_hours",
"aggregation_type": "SUM"
}
},
{
"units": "500.0",
"events_count": 500,
"amount": {
"currency_code": "USD",
"value": 75
},
"charge": {
"id": "1a901b42-1b42-1b42-1b42-1a901b421b42",
"metric_id": "metric_03H3YT8P7Q5R3S1T2U0V4W9Z0",
"charge_model": "STANDARD",
"properties": {
"amount": "0.15"
},
"min_amount": {
"value": 0.01,
"currency_code": "USD"
}
},
"metric": {
"name": "Bandwidth MB",
"code": "bandwidth_mb",
"aggregation_type": "SUM"
}
}
]
}{
"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": "INTERNAL_SERVER_ERROR",
"message": "An internal server error has occurred.",
"debug_id": "90957fca61718"
}