Retrieve a ServiceAction object.
Learn more about calling API v2 endpoints.Parameters
- idstringRequired
The ID of the Service Action.
Returns
Response attributes
- idstring
Unique identifier for the ServiceAction.
- objectstring, value is "v2.billing.service_action"
String representing the object’s type. Objects of the same type share the same value of the object field.
- createdtimestamp
Timestamp of when the object was created.
- credit_
grantnullable object Details for the credit grant. Provided only if
type
is “credit_grant”. - credit_
grant_ per_ tenantnullable object Details for the credit grant per tenant. Provided only if
type
is “credit_grant_per_tenant”. - livemodeboolean
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode. - lookup_
keynullable string An internal key you can use to search for this service action.
- service_
intervalenum The interval for assessing service.
Possible enum valuesday
Assess service by days.
month
Assess service by months.
week
Assess service by weeks.
year
Assess service by years.
- service_
interval_ countinteger The length of the interval for assessing service.
- typeenum
The type of the service action.
Possible enum valuescredit_
grant The service action is of type credit grant.
credit_
grant_ per_ tenant The service action is of type credit grant per tenant.
Returned by ServiceAction API when the service action is not found.
{ "created": "2025-01-01T00:00:00.000Z", "id": "4242", "lookup_key": "4242", "object": "4242", "service_interval": "day", "service_interval_count": 4242, "type": "credit_grant", "livemode": true, "credit_grant": { "amount": { "type": "custom_pricing_unit", "custom_pricing_unit": { "id": "4242", "value": "4242" }, "monetary": { "currency": "4242", "value": "4242" } }, "applicability_config": { "scope": { "billable_items": [ "4242" ], "price_type": "metered" } }, "expiry_config": { "type": "end_of_service_period" }, "name": "4242" }}
Rate Cards v2
A RateCard describes usage-based pricing. To bill a customer using a RateCard, create a RateCardSubscription which links it to the corresponding Cadence.
- POST/
A RateCardSubscription links a RateCard to a specific billing Cadence. While the RateCardSubscription is active, Stripe will bill the Payer according to the RateCard’s pricing.
A PricingPlan describes a collection of pricing components that can be used to bill customers. To bill a customer using a PricingPlan, create a PricingPlanSubscription which links it to the corresponding Cadence.
- POST/
A PricingPlanSubscription links a PricingPlan to a specific billing Cadence. While the PricingPlanSubscription is active, Stripe will bill the Payer according to the PricingPlan’s components.
- POST/