question

yogeshm avatar image
yogeshm asked Bryanne Vega answered

how to add payment in order.

i have successfully created order but while i am adding payment details, it's not working my json data here : { "amount": "50000", "taxRates":[{"taxableAmount": "5000", "rate": "5", "name": "Testing payment"}] }

and i m testing here https://www.clover.com/api_docs#!/ord...

please guide which fields required in create payment order

Thank You

Orders
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

Bryanne Vega avatar image
Bryanne Vega answered

You are creating a payment object.

View: https://www.clover.com/api_docs#!/pay...

Under Model you can see which fields are optional, if it doesn't say it's optional, you must include that data.

I believe it should be somewhat like this, so please explore a bit more in depth:

{
  "amount": "long",
  "taxRates": [
    {
      "taxableAmount": "long",
      "rate": "long",
      "name": ""
    }
  ],
  "order": {
    "id": ""
  }
}

Note: the order id is to associate this payment with X order.

10 |2000

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