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

Credit Grants

Credit Grants

Credit Grants

Create a credit grant
client.V1.CreditGrants.New(ctx, body) (*DataIDV1CreditGrantNewResponse, error)
post/v1/credits/createGrant
Update a credit grant
client.V1.CreditGrants.Edit(ctx, body) (*DataIDV1CreditGrantEditResponse, error)
post/v1/credits/editGrant
List credit grants
client.V1.CreditGrants.List(ctx, params) (*CursorPage[IDstringBalanceV1CreditGrantListResponseBalanceCustomFieldsmapCustomerIDstringDeductionsarrayEffectiveAtTimeExpiresAtTimeGrantAmountV1CreditGrantListResponseGrantAmountNamestringPaidAmountV1CreditGrantListResponsePaidAmountPendingDeductionsarrayPriorityfloat64CreditGrantTypestringInvoiceIDstringProductsarrayReasonstringUniquenessKeystringV1CreditGrantListResponse], error)
post/v1/credits/listGrants
List credit ledger entries
client.V1.CreditGrants.ListEntries(ctx, params) (*DataarrayNextPagestringV1CreditGrantListEntriesResponse, error)
post/v1/credits/listEntries
Void a credit grant
client.V1.CreditGrants.Void(ctx, body) (*DataIDV1CreditGrantVoidResponse, error)
post/v1/credits/voidGrant
Credit Ledger Entry
CreditLedgerEntrystruct
ShowShow
Amountfloat64

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

CreatedBystring
CreditGrantIDstring

the credit grant this entry is related to

formatuuid
EffectiveAtTime
formatdate-time
Reasonstring
RunningBalancefloat64

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

InvoiceIDstring
optional

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
RolloverAmountMaxAmountstruct
ShowShow
TypeRolloverAmountMaxAmountTypeMaxAmountRolloverAmountMaxAmountTypeRolloverAmountMaxAmountType

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

Hide ParametersShow Parameters
RolloverAmountMaxAmountTypeMaxAmountconst
RolloverAmountMaxAmountTypeMaxAmountRolloverAmountMaxAmountTypeRolloverAmountMaxAmountType
"MAX_AMOUNT"
Valuefloat64

The maximum amount to rollover.

Rollover Amount Max Percentage
RolloverAmountMaxPercentagestruct
ShowShow
TypeRolloverAmountMaxPercentageTypeMaxPercentageRolloverAmountMaxPercentageTypeRolloverAmountMaxPercentageType

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

Hide ParametersShow Parameters
RolloverAmountMaxPercentageTypeMaxPercentageconst
RolloverAmountMaxPercentageTypeMaxPercentageRolloverAmountMaxPercentageTypeRolloverAmountMaxPercentageType
"MAX_PERCENTAGE"
Valuefloat64

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

minimum0
maximum1