Whenever trying to add an Apple Pay method to a square customer, I am prompted with the error ‘INVALID CARD DATA’ for the sourceId field of the create card request.
I am recieveing the same error on both Sandbox and Production environments. The nonce seems to be correctly generated through a PKPaymentAuthorization request on the client side, but when passed to my backend, the nonce (source_id) is rejected.
I have no issues adding credit or debit cards through the SQIPCardEntryViewController on both Sandbox and Production.
Is a different backend process required for adding credit / debit cards vs adding a card through Apple Pay?
I have attached a screenshot of the error for reference.
I have tested with creating a payment using the same nonce and am able to do so successfully. The square documentation clearly states that the payment nonce generated for an apple pay payment method should be sent to your backend to either store or charge the card (image attached)
Since I am only able to charge the card based on the nonce, does this mean that storing the card to the square customer is not possible without a payment_id? If this is the case, are there any workarounds to allow apple payment methods to be stored to the customer without them incurring a charge.
At this time the ability to store an Apple Pay card on file isn’t currently available. Only charging a customer using Apple Pay is currently supported. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team.
Thanks for the clarification.
Is it possible to store an Apple Pay method to a customer after a payment has been submitted, as opposed to storing the card based on the nonce from the card authorisation? Or is it currently not supported to store an Apple Pay card on file by any means?
If this is something that could be achieved by the API product team, that would be fantastic!
At this time the ability to store the card after payment isn’t currently supported. This is a popular feature request and we hope to have more for you soon.