I am trying to create a checkout link via the POST /v2/online-checkout/payment-links
API.
I have done extensive testing in the sandbox version and it all worked fine. When I tried to create a real payment however I got the following response from your servers:
date: Tue, 18 Oct 2022 12:16:24 GMT
content-length: 158
square-version: 2022-09-21
vary: Origin, Accept-Encoding
content-encoding: gzip
x-frame-options: SAMEORIGIN
content-type: application/json
{
"errors": [
{
"category": "API_ERROR",
"code": "INTERNAL_SERVER_ERROR",
"detail": "An internal error has occurred, and the API was unable to service your request."
}
]
}
I have literally created the same purchase via sandbox and it worked fine.
Here is the request I am sending:
{
"order": {
"location_id": "LQ5ZE01ZXFNEV",
"reference_id": "123321123",
"customer_id": "3TWT3N4EGT7H1GKGXSSFTWEM74",
"line_items": [
{
"name": "Test DLC",
"quantity": "1",
"item_type": "ITEM",
"base_price_money": {
"amount": 99,
"currency": "USD"
}
}
],
"state": "OPEN"
},
"checkout_options": {
"allow_tipping": false,
"redirect_url": "https://exmple.com/api/purchases/verify_purchase?pid=123321123&secret_id=1233123123213",
"merchant_support_email": "[email protected]",
"ask_for_shipping_address": true
}
}