CreateBillingMeterEvent
Creates a billing meter event.
Stored Procedure Specific Information
Stripe allows only a small subset of columns to be used in the Exec query. These columns can typically be used with only = comparison.
The 'EventName', 'PayloadCustomerMappingValue' and 'PayloadValueSettingsValue' parameters are required to execute the procedure. Examples:
Creating a meter event without supplying the values of 'PayloadCustomerMappingKey' and 'PayloadValueSettingsKey' fields:
EXEC CreateBillingMeterEvent PayloadValueSettingsValue = '25', PayloadCustomerMappingValue = 'cus_SGxBCKpgR8gIhP', EventName = 'first_meter_event';This will create a meter event with the value of 'PayloadCustomerMappingKey' field being 'stripe_customer_id' and 'PayloadValueSettingsKey' being 'value'.
If a meter was created using custom values of the customer mapping and value settings payload keys, you must supply those values in the 'PayloadCustomerMappingKey' and 'PayloadValueSettingsKey' respectively. The 'PayloadCustomerMappingKey' parameter corresponds to the 'CustomerMappingEventPayloadKey' column and the 'PayloadValueSettingsKey' parameter corresponds to the 'ValueSettingsEventPayloadKey' column of the 'Meters' table of the 'Stripe' schema.
EXEC CreateBillingMeterEvent EventName = 'first_meter_event', PayloadCustomerMappingKey = 'cust_id', PayloadCustomerMappingValue = 'cus_SGxBCKpgR8gIhP', PayloadValueSettingsKey = 'valhere', PayloadValueSettingsValue = '25';
Input
| Name | Type | Description |
| EventName | String | The name of the meter event. Corresponds with the event_name field on a meter. |
| PayloadCustomerMappingKey | String | Part of the payload of the event. This should contain the value of the field corresponding to a meter's customer_mapping.event_payload_key (default is stripe_customer_id). |
| PayloadCustomerMappingValue | String | Part of the payload of the event. This should contain the value for the customer mapping key. |
| PayloadValueSettingsKey | String | Part of the payload of the event. This should contain the value of the field corresponding to a meter's value_settings.event_payload_key (default is value). |
| PayloadValueSettingsValue | String | Part of the payload of the event. This should contain the value for the value settings key. |
| Identifier | String | A unique identifier for the event. If not provided, one will be generated. |
| Timestamp | Datetime | The time of the event. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified. |
Result Set Columns
| Name | Type | Description |
| * | String | The fields returned by Stripe. |