question

hergy80 avatar image
hergy80 asked hergy80 commented

REST payment BadRequest

I'm trying to send a payment request from my POS to our mini using a local connection (in the sandbox to a dev kit mini) but I keep getting a BadRequest response with no other information to help pinpoint the issue. I can successfully send Welcome Screen Requests and Order Display updates so I don't think it's a token issue. I've added the idempotency Key to the header, though I'm not sure what the parameters/restrictions other than it being 13 characters minimum. I'm using the endpoint /connect/v1/payments. Any ideas what it could be? Here's an example of the json request:

{
    "amount": 475,
    "capture": true,
    "deviceOptions": {
        "cardEntryMethods": [
            "MAG_STRIPE",
            "EMV",
            "NFC",
            "MANUAL"
        ],
        "cardNotPresent": false,
        "disableCashback": true,
        "disableRestartTransactionOnFail": true,
        "offlineOptions": {
            "allowOfflinePayment": true,
            "approveOfflinePaymentWithoutPrompt": true,
            "forceOfflinePayment": false
        }
    },
    "externalPaymentId": "C7EJMWx89TKF7pdtM3vuvYR42JpQWhMP",
    "externalReferenceId": "C7EJMWx89TKF7pdtM3vuvYR42JpQWhMP",
    "final": true
}
REST APIsemi-integrations
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
parquet76 avatar image
parquet76 answered hergy80 commented

Only pass what you need, do you need externalReferenceId? If not, don't pass it. If you need it reduce the length that field can only have a length of something like 11.

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hergy80 avatar image hergy80 commented ·
Ahh, I'll have to give that a try. Looking at the API explorer, that field is limited to 12 chars. Thanks!
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community