When I try to create an order in sandbox environment, 500 error returns.
Here is the request. {:idempotency_key=>"dcea2d9b-36fc-4edc-a920-27544c3f2d6a", :order=>{:location_id=>"LK161QJ0P99ZK", :customer_id=>"KF4D7QXYJMX73C1AHX7TNCE8KR", :line_items=>[{:quantity=>"1", :catalog_object_id=>"KZAZC5P7IGFNCU5DJJG6IHPA"}], :fulfillments=>[{:type=>"PICKUP", :state=>"PROPOSED", :pickup_details=>{:recipient=>{:customer_id=>"KF4D7QXYJMX73C1AHX7TNCE8KR"}, :pickup_at=>"2021-01-26T21:40:00+00:00"}}]}}
Here is the response. [{:code=>"INTERNAL_SERVER_ERROR", :detail=>"An internal error has occurred, and the API was unable to service your request.", :category=>"API_ERROR"}]
I do not understand why this error occurs since it was working before.
You do not need to use PayOrder; calling CreateOrder with the order_id, if it’s for the full amount, should be enough to do that. However, we definitely shouldn’t be returning a 500 error; can you share the order_id so I can take a look at our logs?
You need the order to have a fulfillment (fulfillments field) when calling CreateOrder. Then, you can call CreatePayment and pass the order_id. That should be all you need to do to get it to show up. I’ll take a look at the order id you provided, though, thanks!