Create Usage records using a PUT method using the Ordway API. Sample PUT method for Usage documentation and samples can be found here.
Preconditions:
1. User prefers entry of Usage data by API instead of import method by .CSV instead of import method.
2. User is set up to process JSON requests/responses with Ordway’s API documentation.
3. Usages have required fields as outlined in the Create Usage API document. In addition to the minimum required fields specified in the document:
-
- Include ‘subscription_id’ in the request when there are multiple subscriptions.
- Include ‘charge_id’ in the request when there are multiple usage-based charges.
- Include ‘subscription_line_id’ in the request when the same charge appears more than once in the subscription with overlapping periods (this value changes with subscription renewal).
4. Utilize Unit of Measure in the payload to uniquely identify the charge the usage belongs to. Considerations for using Unit of Measure include:
-
- Include the 'subscription_id’ with the request for Customers with more than one Subscription with the same Unit of Measure for usage charges.
- Include the ‘charge_id’ with the request for Customers with more than one usage charge in the same Subscription with the same Unit of Measure.
Error Handling
There are two circumstances when errors are sent:
- When API is sent with bad data during usage creation (example: incorrect subscription_id), error response is received immediately as part of API response.
- During Usage processing - Usage once accepted, needs to be processed to account for all related calculations such as billing/revenue. This happens offline after usage is created. If there is a failure during this stage, usage status is marked as ‘Failed’ and an email is sent to the email ID associated with the user that created the usage.
Comments
0 comments
Please sign in to leave a comment.