Hello,
I am testing Checkout API. I was able to create a test order and I am trying to test WebHook to my service on “payment.updated” event.
I have created a payment link by calling POST /v2/online-checkout/payment-links
and opened URL from response in my browser.
I tried to use “Test payment” feature, but got a
500 HTTP Internal Server Error {"success":true,"error":"An unknown error occurred."}
Is it something I missed in my configuration, or in my request?
Is there a way to make this working?
Is there an other way to complete payment that was created by calling
payment-links
endpoint?
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Checkout API
Handle Bookings Webhook Events
Refunds API Webhooks
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
What’s the payment link that’s throwing this error and what’s you application ID?
Hello,
Here is the link Checkout API Sandbox Testing Panel
Application Id: sandbox-sq0idb-NHEU04g9F0WUAtah8KQq0g
I was able to replicate this and I’m checking with the team.
Hello,
Do you have any updates on that?
Is there another way to test payment?
Looks like this is failing because you don’t have a pickup_at
time. A SCHEDULED pickup must have a pickup_at
time. The team is aware that we shouldn’t be throwing a 5xx
and are working to fix that.
Thanks,
I managed to get this working only when I supplied all fields to FulfillmentPickupDetails
: ScheduleType: ASAP
, PickupWindowDuration
, PrepTimeDuration
, ExpiresAt
.
It would be helpful if all required fields are marked as those in the documentation, as it would have saved a lot of time.
The “Required” markers are actually present in the documentation, but not next to each required field.