Update the reserved amount of an applied gift card
Updates the amount for the reservation identified by card_number_hash. The balance is read from cache to avoid a gateway round-trip.
The new amount is subject to the same caps as the apply step, with one adjustment: the card's current reserved amount is temporarily added back to the unpaid total so the calculation treats it as if the card were not yet applied.
Cannot exceed the cached available balance
Cannot exceed the unpaid total (including this card's current amount)
Cannot push the cumulative gift card total above
GIFT_CARD_CONFIG.max_amount_per_order
After the update, the previously selected payment method is reset so the payment step is re-evaluated.
Cache expiry: If the cached balance has expired, the reservation is automatically removed. The response returns an error asking the user to re-add the card.
Required Fields:
card_number_hash: Hash identifying the reservation to update (max 255 chars)new_amount: New desired amount (decimal, must be greater than zero)
Validation:
new_amountmust be greater than zeroIf the final capped amount resolves to zero, a validation error is returned
If
card_number_hashis not found among the applied cards, a validation error is returned
Next Pages:
EmptyPage
Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.
XMLHttpRequestPossible values: Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)
Hash of the gift card number identifying the reservation to update.
Obtained from card_number_hash in the applied cards list returned by
the Gift Card Page.
abc123hashNew desired reserved amount (12 digits, 2 decimal places). Must be greater than zero. Subject to the same cap rules as the apply step, adjusted so the card's current reserved amount is treated as if it were not yet applied.
75.00Gift card reservation amount updated
POST /orders/checkout/?page=GiftCardUpdateAmountPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 54
"card_number_hash='abc123hash'&new_amount='75.00'"Gift card reservation amount updated
{
"context_list": [],
"pre_order": {
"user_email": "user@akinon.com",
"unpaid_amount": "175.00",
"payment_option": null
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

