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

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


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!

Yes, with Square Apple Pay payments do allow for delay capture and can be updated with UpdatePayment. :slightly_smiling_face:

1 Like

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

"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

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. :slightly_smiling_face:

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.

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

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?

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. :slightly_smiling_face:

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?

Yes, once the payment is AUTHORIZED with a verification_token that was created with the intent of CHARGE you can call UpdatePayment to authorize the new amount and complete the payment by calling CompletePayment. :slightly_smiling_face:

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:

curl \
  -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"


  "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?

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. :slightly_smiling_face:

@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?

Whats the payment_id? :slightly_smiling_face:

payment_id  is TZaDBKNVbCVoKrOVb9xEmbTgaXdZY

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

I see it in the Dashboard. Here’s the link. 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. :slightly_smiling_face:

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!

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

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?

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. :slightly_smiling_face: