Hi,
I have a question regarding the Square Checkout flow.
Here’s what I’ve implemented: POST /v2/online-checkout/payment-links - Square API Reference
I’ve added a custom input field to capture the customer’s zip code because I don’t receive the card zip code in the response but i need the zip code of customer (I’m fetching the data from orders and payments api).
Now, When attempting to make a payment by manually entering card details or using Google Pay without filling in the custom zip code input, the payment page correctly displays an error indicating that the zip code field is mandatory. However, when using Apple Pay, the error message indicating that the custom zip code input is mandatory is not displayed, and the payment is processed successfully without requiring the custom zip code input. Why is this the case?
This is how the payment page looks with custom zip code input:
I haven’t been able to replicate this. Every time I try with Apple Pay it errors out requesting the custom field input. Do you have an example request body that your seeing this with?
You mean the request data format that i’m sending to create payment link?
Here it is:
Request to: POST /v2/online-checkout/payment-links
Data:
{“idempotency_key”:“VALUE”,“quick_pay”:{“name”:“VALUE”,“price_money”:{“amount”:200,“currency”:“USD”},“location_id”:“VALUE”},“pre_populated_data”:{“buyer_email”:“VALUE”,“buyer_address”:{“first_name”:“VALUE”,“last_name”:“VALUE”}},“checkout_options”:{“redirect_url”:“VALUE”,“allow_tipping”:false,“ask_for_shipping_address”:false,“custom_fields”:[{“title”:“Zipcode”}],“accepted_payment_methods”:{“apple_pay”:true,“google_pay”:true},“enable_coupon”:false,“enable_loyalty”:false},“description”:“VALUE”,“payment_note”:“VALUE”}}