question

souvikbose avatar image
souvikbose asked David Marginian Deactivated edited

Unable to pay "v1/orders/**/pay" || Unable to create order "v1/orders"

I am creating orders from

"https://sandbox.dev.clover.com/v3/merchants/xxxxxxxxxxxxxxxxxx/orders?access_token=xxx-xxxx-xxxxx-xxxxxx"

While paying for the same created order with :

"https://scl-sandbox.dev.clover.com/v1/orders/xxxxxxxxxxxxxxxx/pay "
It says

{

"message": "500 Internal Server Error",

"error": {

"type": "api_error",

"code": "processing_error",

"message": "Internal Server Error."

}

}

Token is generated with the following APIs
**https://apisandbox.dev.clover.com/pakms/apikey

**https://token-sandbox.dev.clover.com/v1/tokens
---------------------------------------------------------------------------------------------

I am also unable to create orders from the follwoing v1 api
https://scl-sandbox.dev.clover.com/v1/orders

It says:

{

"message": "404 Not Found",

"error": {

"code": "processing_error",

"message": "Not Found"

}

}
----------------------------------------------------------------------

Need urgent help. Thanks in advance

Orderse-commerce api
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

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

For the https://scl-sandbox.dev.clover.com/v1/orders/xxxxxxxxxxxxxxxx/pay endpoint, it looks like the order you are trying to pay for has no line items.

For the https://scl-sandbox.dev.clover.com/v1/orders endpoint, you are passing a customer of "123456789", which does not exist.


4 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.

souvikbose avatar image souvikbose commented ·

procreating the order i am using the following request body:

{"customers":[{"merchant":{"id":"xxxxxxxxxxxx"},"orders":[],"metadata":{},"id":"cust12345","firstName":"Souvik","lastName":"Bose","marketingAllowed":true}],"lineItems":[{"item":{"id":"4DR5FK58ZVK6P"},"exchangedLineItem":{},"refund":{"orderRef":{},"device":{},"payment":{},"employee":{},"overrideMerchantTender":{},"serviceChargeAmount":{},"germanInfo":{},"appTracking":{},"cardTransaction":{"extra":{},"vaultedCard":{}},"transactionInfo":{"identityDocument":{"payment":{}},"promotionalMessage":{},"eCommTransactionInfo":{"storedCredentials":{}},"sepaElvTransactionInfo":{}},"merchant":{}},"printGroup":{},"id":"1","name":"Green Apple","price":20,"priceWithModifiers":20,"priceWithModifiersAndItemAndOrderDiscounts":20,"unitQty":1,"unitName":"lb","itemCode":"ITEM001","printed":true}]}
----------------------------------------------------------------------------------------------------------

Now I have two questions :
1. Is it necessary to have line items registered / listed in my inventory ?
2. can you please provide me simple order create request body that contains customer details / line items and other necessary parameters only


Thank you

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

1) I believe so.

2) Let's start with you passing items that exist and valid customer ids that exist.

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

Order Create request body:


{"lineItems":[{"item":{"id":"E01TGGH1M2VPP"},"exchangedLineItem":{},"refund":{"orderRef":{},"device":{},"payment":{},"employee":{},"overrideMerchantTender":{},"serviceChargeAmount":{},"germanInfo":{},"appTracking":{},"cardTransaction":{"extra":{},"vaultedCard":{}},"transactionInfo":{"identityDocument":{"payment":{}},"promotionalMessage":{},"eCommTransactionInfo":{"storedCredentials":{}},"sepaElvTransactionInfo":{}},"merchant":{}},"printGroup":{},"id":"1","name":"Cheese cake","alternateName":"Dessert","price":4.95,"priceWithModifiers":4.95,"priceWithModifiersAndItemAndOrderDiscounts":4.95,"unitQty":1,"unitName":"pc.","itemCode":"E01TGGH1M2VPP","printed":true}],"testMode":true,"payType":"FULL","taxRemoved":true}
-----------------------------------------------------------
This is my new order request body .. The order is getting created but same issue with the payment api

0 Likes 0 ·
Show more comments

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