Backend API
Create a new gift card debit.
Arguments
idobjectId
The ID of the gift card debit.
amountcurrencyrequired
Initial gift card debit value. Minimum of 0.01.
parent_idobjectIdrequired
ID of the parent gift card.
currencystring
Three-letter ISO currency code in uppercase. Defaults to the store's base currency.
date_createddate
Date and time the gift card debit was created.
date_updateddate
Date and time the gift card debit was last updated.
parentGift Card
paymentPayment
Expandable link to the payment.
payment_idobjectId
refundRefund
refund_idobjectId
Unique identifier for the refund.
POST/giftcards:debits
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');
await swell.post('/giftcards:debits', {
parent_id: 5fd21b2b53c2be21778d1f7e,
amount: 10.99,
currency: 'USD'
});The gift card debit model
{
"parent_id": "5fd21b2b53c2be21778d1f7e",
"payment_id": "5fd21b5353c2be21778d3293",
"amount": 35,
"currency": "USD",
"date_created": "2020-12-10T12:57:55.651Z",
"id": "5fd21b5353c2be21778d337d"
}