# Determining from nonce if payment is for a credit card or for Google Pay/Apple Pay(IE from a digital wallet)

**URL:** <https://developer.squareup.com/forums/t/determining-from-nonce-if-payment-is-for-a-credit-card-or-for-google-pay-apple-pay-ie-from-a-digital-wallet/1362>\
**Category:** Questions\
**Created:** [December 5, 2020, 12:50am UTC](https://developer.squareup.com/forums/t/determining-from-nonce-if-payment-is-for-a-credit-card-or-for-google-pay-apple-pay-ie-from-a-digital-wallet/1362 "2020-12-05T00:50:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hal-h](https://avatars.discourse-cdn.com/v4/letter/h/8edcca/32.png) [@hal-h](https://developer.squareup.com/forums/u/hal-h)\
**Post date:** [December 5, 2020, 12:50am UTC](https://developer.squareup.com/forums/t/determining-from-nonce-if-payment-is-for-a-credit-card-or-for-google-pay-apple-pay-ie-from-a-digital-wallet/1362/1 "2020-12-05T00:50:18Z")

</div>

I am trying to find a way to determine if a nonce is for a credit card payment or for Google Pay/Apple Pay(IE from a digital wallet). Is there a way to tell from the nonce or from the tenders returned by the charge call?

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [December 7, 2020, 5:26pm UTC](https://developer.squareup.com/forums/t/determining-from-nonce-if-payment-is-for-a-credit-card-or-for-google-pay-apple-pay-ie-from-a-digital-wallet/1362/2 "2020-12-07T17:26:55Z")

</div>

Hi @hal-h welcome to the forums!

In the [cardNonceResponseReceived](https://developer.squareup.com/docs/api/paymentform#cardnonceresponsereceived) callback, the `cardData` will have a `digital_wallet_type` enum present so you can see if it matches a digital wallet (or `NONE`). Please let me know if you have any additional questions or concerns, I’m happy to help!

---

<div class="post-metadata">

**Author:** ![hal-h](https://avatars.discourse-cdn.com/v4/letter/h/8edcca/32.png) [@hal-h](https://developer.squareup.com/forums/u/hal-h)\
**Post date:** [December 7, 2020, 9:50pm UTC](https://developer.squareup.com/forums/t/determining-from-nonce-if-payment-is-for-a-credit-card-or-for-google-pay-apple-pay-ie-from-a-digital-wallet/1362/3 "2020-12-07T21:50:36Z")

</div>

Thank you for your reply. I am calling Square through the V1 TransactionsAPI.charge( ) method (This is in the square\_connect gem) using a nonce. We have upgrading to V2 and the payments/order API in our dev plan but are not there yet. Is there a way to identify if the nonce came from a digital wallet or not?

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [December 7, 2020, 11:00pm UTC](https://developer.squareup.com/forums/t/determining-from-nonce-if-payment-is-for-a-credit-card-or-for-google-pay-apple-pay-ie-from-a-digital-wallet/1362/4 "2020-12-07T23:00:32Z")

</div>

What I provided above is for the Square Payment Form, before you hit Charge or CreatePayment, so it should still work. I don’t think this information is revealed in the Transactions or Payments API at this time.
