Skip to main content
POST
/
events
/
batch
Create multiple usage events in batch.
curl --request POST \
  --url https://api-m.paypal.com/v1/commerce/billing/events/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "events": [
    {
      "transaction_id": "event_t1_1753838783",
      "external_subscription_id": "91624203-791a-4639-8c86-4693948b3a41",
      "metric_code": "Billable_Metrics_1753827008",
      "timestamp": "2023-01-01T00:00:00Z",
      "properties": {
        "gb": 10
      }
    },
    {
      "transaction_id": "event_t2_1753838783",
      "external_subscription_id": "91624203-791a-4639-8c86-4693948b3a41",
      "metric_code": "Billable_Metrics_1753827008",
      "timestamp": "2023-01-01T00:00:00Z",
      "properties": {
        "gb": 10
      }
    }
  ]
}'
{
  "status": "ACCEPTED",
  "results": {
    "success_count": 2,
    "error_count": 0
  }
}

Authorizations

Authorization
string
header
required

Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.

Body

application/json
events
object[]

Response

Events accepted for processing.

status
enum<string>

Status indicating that the event has been accepted for processing

Available options:
ACCEPTED
Example:

"ACCEPTED"

results
object

Results of the accepted events

I