Customers > Customer Balance > customerBalanceTransactionCreate
Commerce APICustomersCustomer BalancecustomerBalanceTransactionCreate
customerBalanceTransactionCreate
POST:customer_balance/transaction.json

Description

Add or remove funds from customer balance.

Permission bit: "customer_balance.write"

Topic: Customer Balance

Arguments

customer_id: String!

Unique customer identifier. See also: Unique Identifiers

Example: "cu_EQzGqWoY"


data: CustomerBalanceCreate!

Main argument for mutations.


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

amount: Int!

Amount to add/subtract to customer balance

Example: 5000


comment: String

Comment describing the change

Example: "Loyalty credit"

Valid when: comment is not empty

Valid when: comment's length doesn't exceed 4096 characters


currency: String

Currency code of the amount to add/subtract (shop's primary by default)

Example: "USD"


Result

Boolean

Preview (typescript)

Loading module