Hello Square team,
I am implementing partial payments using this example here https://developer.squareup.com/docs/web-payments/gift-card-walkthrough.
The example starts by saying:
The following sections cover an end-to-end payment processing flow for a partial payment. You process a $30 payment using a gift card worth $5 and complete the remaining balance of $25.
But then starts the code snippet by saying:
Create a new
Order
object for a purchase worth $25 USD.
Is this a mistake? Shouldn’t the order be created for $30?
This is what I am trying:
- I want to purchase an item worth $30 which I want to split between Gift card and Credit card as $5 and $25
- Following the example, I am creating an Order of $25 as after applying the gift card ($30 - $5 = $25)
- I want to charge $25 to the credit card
- I want to charge $5 to gift card
When I do so, I get an error saying “The total of the requested payments does not match the total of the sale order.”
Kindly let us know if the example on that link is correct.