Store Credit Account Credit Transaction
Requires access scope.
A credit transaction which increases the store credit account balance.
Anchor to FieldsFields
- account (StoreCreditAccount!)
- amount (MoneyV2!)
- balanceAfterTransaction (MoneyV2!)
- createdAt (DateTime!)
- event (StoreCreditSystemEvent!)
- expiresAt (DateTime)
- id (ID!)
- origin (StoreCreditAccountTransactionOrigin)
- remainingAmount (MoneyV2!)
- Anchor to accountaccount•Store
Credit Account! non-null The store credit account that the transaction belongs to.
- Anchor to amountamount•Money
V2! non-null The amount of the transaction.
- Anchor to balanceAfterTransactionbalance•Money
After Transaction V2! non-null The balance of the account after the transaction.
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the transaction was created.
- Anchor to eventevent•Store
Credit System Event! non-null The event that caused the store credit account transaction.
- Anchor to expiresAtexpires•Date
At Time The time at which the transaction expires. Debit transactions will always spend the soonest expiring credit first.
- •ID!non-null
A globally-unique ID.
- Anchor to originorigin•Store
Credit Account Transaction Origin The origin of the store credit account transaction.
- Anchor to remainingAmountremaining•Money
Amount V2! non-null The remaining amount of the credit. The remaining amount will decrease when a debit spends this credit. It may also increase if that debit is subsequently reverted. In the event that the credit expires, the remaining amount will represent the amount that remained as the expiry ocurred.
Anchor to MutationsMutations
- storeCreditAccountCredit (StoreCreditAccountCreditPayload)
- •mutation
Adds funds to a
by creating a. The mutation accepts either a store credit account ID, aCustomerID, or aID. When you provide a customer or company location ID, it automatically creates an account if one doesn't exist for the specified currency.Store credit accounts are currency-specific. A single owner can have multiple accounts, each holding a different currency. Use the most appropriate currency for the given store credit account owner.
Credits can optionally include an expiration date.
- •ID!required
The ID of the store credit account or the ID of the account owner.
- Anchor to creditInputcredit•Store
Input Credit Account Credit Input! required The input fields for a store credit account credit transaction.
Arguments
- •ID!
Anchor to InterfacesInterfaces
- Node
- StoreCreditAccountTransaction
- •interface