Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

Credit Grants

Credit Grants

Credit Grants

Create a credit grant
client.v1.creditGrants.create(CreditGrantCreateParamsbody, RequestOptionsoptions?): dataIDCreditGrantCreateResponse
post/v1/credits/createGrant
Update a credit grant
client.v1.creditGrants.edit(CreditGrantEditParamsbody, RequestOptionsoptions?): dataIDCreditGrantEditResponse
post/v1/credits/editGrant
List credit grants
client.v1.creditGrants.list(CreditGrantListParamsparams?, RequestOptionsoptions?): CursorPage<idstringbalanceBalancecustom_fieldsRecord<string, string>customer_idstringdeductionsarrayeffective_atstringexpires_atstringgrant_amountGrantAmountnamestringpaid_amountPaidAmountpending_deductionsarrayprioritynumbercredit_grant_typeunioninvoice_idunionproductsarrayreasonunionuniqueness_keyunionCreditGrantListResponse>
post/v1/credits/listGrants
List credit ledger entries
client.v1.creditGrants.listEntries(CreditGrantListEntriesParamsparams?, RequestOptionsoptions?): dataarraynext_pageunionCreditGrantListEntriesResponse
post/v1/credits/listEntries
Void a credit grant
client.v1.creditGrants.void(CreditGrantVoidParamsbody, RequestOptionsoptions?): dataIDCreditGrantVoidResponse
post/v1/credits/voidGrant
Credit Ledger Entry
CreditLedgerEntry
ShowShow
amountnumber

an amount representing the change to the customer's credit balance

created_bystring
credit_grant_idstring

the credit grant this entry is related to

formatuuid
effective_atstring
formatdate-time
reasonstring
running_balancenumber

the running balance for this credit type at the time of the ledger entry, including all preceding charges

invoice_idunion
optional
string | null

if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant's paid_amount was charged

formatuuid
Rollover Amount Max Amount
RolloverAmountMaxAmount
ShowShow
type"MAX_AMOUNT"

Rollover up to a fixed amount of the original credit grant amount.

Hide ParametersShow Parameters
"MAX_AMOUNT"
valuenumber

The maximum amount to rollover.

Rollover Amount Max Percentage
RolloverAmountMaxPercentage
ShowShow
type"MAX_PERCENTAGE"

Rollover up to a percentage of the original credit grant amount.

Hide ParametersShow Parameters
"MAX_PERCENTAGE"
valuenumber

The maximum percentage (0-1) of the original credit grant to rollover.

minimum0
maximum1