POST
/
makeRefund
curl --request POST \
  --url https://dashu.sa/api/external/makeRefund \
  --header 'Content-Type: application/json' \
  --data '{
  "apiKey": "<string>",
  "data": {
    "Suppliers": [
      {}
    ]
  },
  "test": true
}'
{
  "IsSuccess": true,
  "Message": "Refund Created Successfully!",
  "ValidationErrors": null,
  "Data": {
    "Key": "3445302",
    "RefundId": 86815,
    "RefundReference": "2024000022",
    "RefundInvoiceId": 3449413,
    "Amount": 1,
    "Comment": "partial refund to the customer"
  }
}

Query Parameters

apiKey
string
required

The API Key of your account.

data
object
required
test
boolean

Set this property to true to send the request to the development environment.

{
  "IsSuccess": true,
  "Message": "Refund Created Successfully!",
  "ValidationErrors": null,
  "Data": {
    "Key": "3445302",
    "RefundId": 86815,
    "RefundReference": "2024000022",
    "RefundInvoiceId": 3449413,
    "Amount": 1,
    "Comment": "partial refund to the customer"
  }
}

Response properties

IsSuccess
boolean
required

The response status.

Message
string
required

The description of the response status.

ValidationErrors
array|null
required

List of validation errors (if any).

Data
object
required

Error Codes

Here’s a list of possible error codes of this endpoint.

CodeDescription
1Missing or invalid api key
2Key is a required parameter.
3KeyType is a required parameter.
4Key is invalid.
5Suppliers is not valid.
6wrong supplier code.
7An error meessage from the bank.