question

sean27 avatar image
sean27 asked retailcp commented

Sandbox E-Commerce API Internal Server Error 500

Hi I am making a request to https://scl-sandbox.dev.clover.com/v1/orders/id/pay and receiving the error:

{
    "message": "500 Internal Server Error",
    "error": {
        "type": "api_error",
        "code": "processing_error",
        "message": "Internal Server Error."
    }
}

I receive this error regardless of if I supply a source or a customer ID in the post body.

Here is the full request when using customer ID:

curl --request POST \
  --url https://scl-sandbox.dev.clover.com/v1/orders/<order id>/pay \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <api token>}' \
  --header 'content-type: application/json' \
  --data '{"customer": <customer id>}'

Request using source:

curl --request POST \
  --url https://scl-sandbox.dev.clover.com/v1/orders/<order id>/pay \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <api token>' \
  --header 'content-type: application/json' \
  --data '{"source":"<source>"}'


OrdersREST APISandbox
19 comments
10 |2000

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

David Marginian avatar image David Marginian ♦♦ commented ·

What exactly are you trying to do? Are you trying to use our e-commerce API to take a payment? The url you are using doesn't seem right to me. Have you seen our docs? https://docs.clover.com/clover-platform/docs/ecommerce-accepting-payments

0 Likes 0 ·
sean27 avatar image sean27 David Marginian ♦♦ commented ·

Yes, I am trying to use the e-commerce API to make a payment for an order as documented at the bottom of the link you sent as well as here: https://docs.clover.com/clover-platform/reference/orders#postordersidpay.

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ sean27 commented ·

E-comm API is new and I haven't experimented with it. However, you are trying to pass a customer in your pay call and from looking at the docs I would assume that means that you have already saved a card for that customer - https://docs.clover.com/clover-platform/docs/ecommerce-saving-card? Otherwise, the source needs to be a tokenized card. How are you tokenizing the card?

0 Likes 0 ·
Show more comments
retailcp avatar image
retailcp answered David Marginian Deactivated commented

Error 500 happens same as described in March comments by Sean27. We create token using I-Frame. we create Order. We add Customer ID. we try to pay. Result. Error 500

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.

David Marginian avatar image David Marginian ♦♦ commented ·

Please read through the comment thread (I understand it is extensive). I believe all issues brought up by Sean27 have a work-around that are provided in the comments if you read through them.

0 Likes 0 ·
retailcp avatar image
retailcp answered retailcp commented

We want a proper solution, not a workaround. or Clover needs to update this documentation.

This is from clover documentation

https://docs.clover.com/clover-platform/docs/ecommerce-accepting-payments


Once we try to follow this instructions, we end up with [ Error 500 ] as described on Feb 29 at 7:53 PM.

Of course, we have order created prior to this step.

So the question is, will this be fixed in the near future ?

thanks



step-2-payment.png (29.7 KiB)
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.

David Marginian avatar image David Marginian ♦♦ commented ·

You will need to provide me with an order id in a private post. I am showing that the issue should be resolved and deployed.

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