# Partial payments using Gift Card and Credit Card

**URL:** <https://developer.squareup.com/forums/t/partial-payments-using-gift-card-and-credit-card/9482>\
**Category:** Questions\
**Tags:** orders-api, payments-api\
**Created:** [May 16, 2023, 9:06pm UTC](https://developer.squareup.com/forums/t/partial-payments-using-gift-card-and-credit-card/9482 "2023-05-16T21:06:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![siddharth.thevaril](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/siddharth.thevaril/32/2022_2.png) [@siddharth.thevaril](https://developer.squareup.com/forums/u/siddharth.thevaril)\
**Post date:** [May 16, 2023, 9:06pm UTC](https://developer.squareup.com/forums/t/partial-payments-using-gift-card-and-credit-card/9482/1 "2023-05-16T21:06:27Z")

</div>

Hello Square team,

I am implementing partial payments using this example here [https://developer.squareup.com/docs/web-payments/gift-card-walkthrough](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.

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [May 16, 2023, 10:02pm UTC](https://developer.squareup.com/forums/t/partial-payments-using-gift-card-and-credit-card/9482/2 "2023-05-16T22:02:26Z")

</div>

Thanks for bringing this to our attention. The amounts in the our documents were incorrect and have now been updated. 🙂

---

<div class="post-metadata">

**Author:** ![devbilal](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@devbilal](https://developer.squareup.com/forums/u/devbilal)\
**Post date:** [July 6, 2023, 4:50pm UTC](https://developer.squareup.com/forums/t/partial-payments-using-gift-card-and-credit-card/9482/3 "2023-07-06T16:50:03Z")

</div>

Can we get the the recipt url while using order.pay endpoint

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [July 6, 2023, 6:49pm UTC](https://developer.squareup.com/forums/t/partial-payments-using-gift-card-and-credit-card/9482/4 "2023-07-06T18:49:10Z")

</div>

Yes, the `receipt_url` is in the payment object. You’ll get the URL with the [Payments API](https://developer.squareup.com/reference/square/payments-api). 🙂
