# Apple Pay web sdk with auth + deferred capture with different amount

**URL:** <https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560>\
**Category:** Questions\
**Tags:** payments-api, web-payments-sdk\
**Created:** [February 13, 2023, 5:55pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560 "2023-02-13T17:55:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![amit-divrt](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@amit-divrt](https://developer.squareup.com/forums/u/amit-divrt)\
**Post date:** [February 13, 2023, 5:55pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/1 "2023-02-13T17:55:14Z")

</div>

Trying to use apple pay with the web payments sdk. Our use case requires an auth followed by a capture several hours to days later with a varying amount (usage-based). This amount may be higher or lower than the authorized amount.

Per Apple Pay guidelines, this may be a supported mode of operation:  
"  
_Authorization & capture with different amount_

_Reserve funds on a customer’s account and transfer money to your bank once an order is successfully completed for an amount higher or lower than authorized_

_Taxi, Scooter_  
"

Here:

> **[Planning - Apple Pay](https://developer.apple.com/apple-pay/planning/#:~:text=up%20in%20store-,Authorization,-%26%20capture%20with%20different)**
>
> Apple Pay provides an easy and secure way for users to buy physical goods and services in your app and website.

Please confirm this is a supported mode of operation with the web payments SDK and if so, how do I use it to get what we need? Thanks!

---

<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:** [February 13, 2023, 7:35pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/2 "2023-02-13T19:35:59Z")

</div>

Yes, with Square [Apple Pay](https://developer.squareup.com/docs/web-payments/apple-pay) payments do allow for [delay capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture) and can be updated with [UpdatePayment](https://developer.squareup.com/reference/square/payments-api/update-payment). 🙂

---

<div class="post-metadata">

**Author:** ![anveshtokala](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anveshtokala](https://developer.squareup.com/forums/u/anveshtokala)\
**Post date:** [February 14, 2023, 7:27am UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/3 "2023-02-14T07:27:48Z")

</div>

Hi Square,

We were able to pre-authorize digital wallet payments using `autocomplete` to `false` but later when we try to update the payment with higher or lower value it throws following error incase of digital wallets payments only

```auto
"errors": [
    {
      "code": "BAD_REQUEST",
      "detail": "amount_money cannot be decreased in value. EDIT_AMOUNT_DOWN capability is not available.",
      "field": "amount_money",
      "category": "INVALID_REQUEST_ERROR"
    }
  ]

```

We are also looking for “ **digital wallet on file** ” feature. where we can preauthorize the digital wallet payment and then charge varying amount (usage-based).

Please let us know if square supports below feature with digital wallets  
_Authorization & capture with different amount_

_Reserve funds on a customer’s account and transfer money to your bank once an order is successfully completed for an amount higher or lower than authorized_

---

<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:** [February 14, 2023, 5:18pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/4 "2023-02-14T17:18:14Z")

</div>

Currently the ability to store a digital wallet card on file isn’t currently possible. Also it’s entirely up to the bank whether the payment amount can be updated or not. This isn’t something that we control. We just make the requests to the bank to approve the amount. 🙂

---

<div class="post-metadata">

**Author:** ![amit-divrt](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@amit-divrt](https://developer.squareup.com/forums/u/amit-divrt)\
**Post date:** [February 15, 2023, 12:52am UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/5 "2023-02-15T00:52:18Z")

</div>

Thanks @Bryan-Square !

Perhaps we shouldn’t be doing an auth + deferred capture. Rather we may be able to just do a verify + auth/capture instead. Would love to seek your opinion if we can jump on a PM. Thanks.

---

<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:** [February 15, 2023, 1:32am UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/6 "2023-02-15T01:32:25Z")

</div>

It all depends on what works best for your use case. Do you need to adjust the amount after the initial authorization? 🙂

---

<div class="post-metadata">

**Author:** ![amit-divrt](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@amit-divrt](https://developer.squareup.com/forums/u/amit-divrt)\
**Post date:** [February 15, 2023, 4:42am UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/7 "2023-02-15T04:42:45Z")

</div>

Yes. Parking in general is a usage (based on time) model. The auth is helpful to insure nominal funds, but ultimately the cost for parking is driven by length of stay.

That said, if in your experience Banks are 50/50 with adjustable (up or down) amounts, then we prob will go more conservative and perform a verify only and an atomic auth/capture at the time of checkout.

Any advice?

---

<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:** [February 15, 2023, 5:44pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/8 "2023-02-15T17:44:58Z")

</div>

If this is all happening at checkout then there wouldn’t be a need to update the payment. But if you are authorizing at checkin then you would want to authorize an amount close to what you think the total would be. That will make the percentage increase/decrease much less and would make banks less likely to decline since the incremental increase close to the total. 🙂

---

<div class="post-metadata">

**Author:** ![anveshtokala](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anveshtokala](https://developer.squareup.com/forums/u/anveshtokala)\
**Post date:** [February 23, 2023, 1:49pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/9 "2023-02-23T13:49:27Z")

</div>

Hi Square,

Can we use a verification token(charge based intent) generated using digital wallet(Apple pay) to charge user with deferred amount?

I mean:  
STEP 1: Create a verification token with amount $100 using digital wallet(Apple Pay)  
STEP 2: Later charge/capture using above verification token with variable amount based on the metered billing. Here the amount could be higher or lower than the amount(i.e $100 ) which we have used for generating verification token.

Any Suggestion?

---

<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:** [February 23, 2023, 6:00pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/10 "2023-02-23T18:00:43Z")

</div>

Yes, once the payment is `AUTHORIZED` with a `verification_token` that was created with the intent of `CHARGE` you can call [UpdatePayment](https://developer.squareup.com/reference/square/payments-api/update-payment) to authorize the new amount and complete the payment by calling [CompletePayment](https://developer.squareup.com/reference/square/payments-api/complete-payment). 🙂

---

<div class="post-metadata">

**Author:** ![anveshtokala](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anveshtokala](https://developer.squareup.com/forums/u/anveshtokala)\
**Post date:** [February 27, 2023, 5:27am UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/11 "2023-02-27T05:27:36Z")

</div>

Hi Square,

I have tried the following usecase  
-\>Use a verification token(charge based intent) generated before 48 hrs using digital wallet(Apple pay) to charge user with deferred amount

And here is error I received:  
**REQUEST:**

```auto
curl https://connect.squareupsandbox.com/v2/payments \
  -X POST \
  -H 'Square-Version: 2023-01-19' \
  -H 'Authorization: Bearer EAAAEB-tYGoSa6-HgECcF-g_ixaScNQ0enkRIrzry_TZPt-cb9l8O-rVikXLDo0_' \
  -H 'Content-Type: application/json' \
  -d '{
    "idempotency_key": "8c79d226-3755-478e-8c80-630e3a29548f",
    "amount_money": {
      "currency": "USD",
      "amount": 120025
    },
    "source_id": "cnon:CBASEFy7Nhregkjr5t4xxh5UnOk",
    "location_id": "xxxx",
    "customer_id": "xxxx",
    "verification_token": "verf:CBASEMCc8FruLVr0LWsYlUSO3rU"
  }'

```

**RESPONSE:**

```auto
{
  "errors": [
    {
      "code": "CARD_TOKEN_EXPIRED",
      "detail": "Card nonce expired; please request new nonce.",
      "category": "INVALID_REQUEST_ERROR"
    }
  ]
}

```

From you square documentation. I read " **Nonce values expire after 24 hours**."  
1.Can we regenerate a new nonce from the expired one?  
2.How can we complete a payment with verification token and charge event happening after 24 hrs of nonce generation?

---

<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:** [February 27, 2023, 6:32pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/12 "2023-02-27T18:32:02Z")

</div>

Generating a new nonce value for an expired one isn’t possible with our APIs. At this time the only way to keep the payment authorized for more then 24 hours is to set `autocomplete` to false and call `CompletePayment` when your ready to complete the payment. 🙂

---

<div class="post-metadata">

**Author:** ![anveshtokala](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anveshtokala](https://developer.squareup.com/forums/u/anveshtokala)\
**Post date:** [April 19, 2023, 6:54pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/13 "2023-04-19T18:54:17Z")

</div>

> [@Bryan-Square](#):
>
> es, once the payment is `AUTHORIZED` with a `verification_token` that was created with the intent of `CHARGE` you can call [UpdatePayment](https://developer.squareup.com/reference/square/payments-api/update-payment) to authorize the new amount and complete the payment by calling [CompletePayment](https://developer.squareup.com/reference/square/payments-api/complete-payment). 🙂

@Bryan-Square We have successfully implemented this process for apple pay in production. We have executed a Apple pay transaction using above flow. And I see in the payment response amount has been captured and status as completed.  
But I can’t see transaction reflecting in the seller dashboard. Could you please let us know how long does it take to reflect in seller dashboard?  
By the way i can see the payment success transaction in API logs. Please let me know how his transaction will be shown in dashboard?

---

<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:** [April 19, 2023, 11:58pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/14 "2023-04-19T23:58:13Z")

</div>

Whats the `payment_id`? 🙂

---

<div class="post-metadata">

**Author:** ![anveshtokala](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anveshtokala](https://developer.squareup.com/forums/u/anveshtokala)\
**Post date:** [April 20, 2023, 3:59am UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/15 "2023-04-20T03:59:53Z")

</div>

```auto
payment_id is TZaDBKNVbCVoKrOVb9xEmbTgaXdZY

```

Also please share the link where I can see this transaction on dashboard?

---

<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:** [April 20, 2023, 5:56pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/16 "2023-04-20T17:56:49Z")

</div>

I see it in the Dashboard. Here’s the [link](https://squareup.com/dashboard/sales/transactions/YtRR9alLXSLOWIgyQNVQdaysPXaZY/by-unit/L8P768Q818QCR). I also see that a fee was collected. Please note that the fee collected won’t show in the Transactions section of the Dashboard. It gets added to the Balance that will be deposited to the linked bank account. 🙂

---

<div class="post-metadata">

**Author:** ![anveshtokala](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anveshtokala](https://developer.squareup.com/forums/u/anveshtokala)\
**Post date:** [April 20, 2023, 6:16pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/17 "2023-04-20T18:16:43Z")

</div>

I can’t see anything on my dashboard. Can you be specific what you are seeing on the dashboard?

I have tried to open the link that you have given. I dont see any transaction. It is empty. Please look at the screenshot. I need immediate help to figure out the transactions in square account using apple pay!  
Also Please let us know if we are missing any settings in our dashboard due to which transactions are not getting appeared?  
We need immediate help. As we want to go live today!

 ![image](https://global.discourse-cdn.com/square/original/2X/1/1824e6361cd322ccf3e8ef99b3648c631f80049e.png)

---

<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:** [April 20, 2023, 6:46pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/18 "2023-04-20T18:46:55Z")

</div>

I see the timezone your in is IST. If you expand the date range to this week do you see the payment? 🙂

---

<div class="post-metadata">

**Author:** ![anveshtokala](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anveshtokala](https://developer.squareup.com/forums/u/anveshtokala)\
**Post date:** [April 20, 2023, 6:55pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/19 "2023-04-20T18:55:42Z")

</div>

No I have tried to expand date range. Still nothing. Please let us know if we can get on a call to fix this thinig?

 ![image](https://global.discourse-cdn.com/square/original/2X/e/e61c7373905892d2835c324bf94fa5c58ebbf323.png)

---

<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:** [April 20, 2023, 7:06pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560/20 "2023-04-20T19:06:02Z")

</div>

Are you logged in the Square account that took the payment? The only way I can replicate the error is if I’m logged into a different Square account. 🙂

[Next page](https://developer.squareup.com/forums/t/apple-pay-web-sdk-with-auth-deferred-capture-with-different-amount/8560.md?page=2)
