Adjust prepaid credits

This endpoint allows you to adjust the prepaid credit balance of a subscription by adding, deducting, or setting a final credit balance.

Token scope: Read & write subscription contracts

Rate limit - Global pool (i.e. 50 requests per second per domain)

Body parameters explained

  • subscriptionId - Id of the subscription for which you want to update the subscription credits for. This can be passed in the following format:

    • {id}- where id is the Loop internal id of the subscription contract. This is the default path param format.
    • loop-{id} - where id is the Loop internal id of the subscription contract.
    • shopify-${id}- Where id is the shopifySubscriptionId of the subscription contract.
  • amountType - Determines how the provided amount is applied to the subscription's prepaid credit balance.

    • DIFFERENCE - Adjusts the existing balance by the specified amount. Use a positive value to add credits and a negative value to deduct credits.
    • FINAL - Sets the subscription's prepaid credit balance to the specified amount.
  • amount - The amount by which to adjust the prepaid credit balance when using DIFFERENCE, or the final credit balance when using FINAL.

    Note: When amountType is DIFFERENCE, use a positive value to add credits and a negative value to deduct credits.

  • reason - The reason for adjusting the subscription's prepaid credit balance. This reason is recorded along with the adjustment for reference and auditing.

Path Params
string
required

The unique identifier of the subscription in Loop

Body Params
string
enum
required

Determines how the provided amount is applied to the subscription's prepaid credit balance

Allowed:
integer
required

The amount to add, deduct, or set as the prepaid credit balance

string
required

The reason for adjusting the prepaid credit balance

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json