Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Refunds

    Return the units of a paid order, in full or in part, to the method that paid.

    On this page

    Refund an order

    POST /pos/v1/orders/{orderId}/refunds

    Returns units of a paid order to the method that paid, with a reason. A refund of every unit makes the order refunded; a refund of some leaves it paid. The amount is worked out from the lines: the price paid for a unit, discount included, with the parts of a full refund adding up to the line. restock puts the units back on the shelf. A refund needs the network and a sale that has been posted.

    Parameters

    NameInTypeRequiredMeaning
    orderId path string (uuid) Yesrequired The order.

    Request body

    FieldTypeRequiredMeaning
    operationId string (uuid) Yesrequired A UUID you choose for this change. Send it again to repeat the request.
    expectedRevision integer Yesrequired The revision of the order you read.
    lines RefundLine[] Yesrequired The units to return, one entry for each item.
    lines[].sku string Yesrequired The code of the item.
    lines[].quantity string Yesrequired Units returned, as a decimal string.
    method string Yesrequired The method to give the money back on. It must be one the customer paid by. One of card, cash
    reason string Yesrequired Why the units come back. One of wrong_item, damaged, changed_mind, price_error
    restock boolean Yesrequired Whether the units go back on the shelf. Use false for goods that cannot be sold again.

    Responses

    StatusMeaningBody
    202 The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. OperationResult
    401 The token is missing, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The order does not exist in your account. Error
    409 operation_reused: The operationId was already used with a different request. revision_conflict: The record changed since the revision you sent. Nothing was applied. Error
    422 day_closed: The business day of the till is closed. Nothing was changed. not_paid: Only a paid order can be refunded. nothing_to_refund: Every unit of the order has already been returned. order_not_posted: The sale is still in the queue of the till and has not been posted yet. network_lost: The till has no network. Card payments, refunds and closing the day need it. insufficient_cash: The drawer does not hold that much cash. reason_required: A refund needs a reason from the list. invalid_quantity: A quantity is a whole number from 1. no_such_line: The order has no line with this sku. quantity_exceeds_sold: The refund returns more units than were sold and not yet returned. method_not_used: The customer did not pay by this method. exceeds_method: The refund is more than was paid by this method and not yet returned. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/pos/v1/orders/2f3dc72e-67d0-42c7-9d92-98e4dac497d0/refunds" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "72bf144e-4a7b-4081-982e-1317d053dcb2",
      "expectedRevision": 3,
      "lines": [
        {
          "sku": "FA-0001",
          "quantity": "1"
        }
      ],
      "method": "cash",
      "reason": "damaged",
      "restock": false
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/orders/2f3dc72e-67d0-42c7-9d92-98e4dac497d0/refunds`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "72bf144e-4a7b-4081-982e-1317d053dcb2",
        "expectedRevision": 3,
        "lines": [
          {
            "sku": "FA-0001",
            "quantity": "1"
          }
        ],
        "method": "cash",
        "reason": "damaged",
        "restock": false
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/pos/v1/orders/2f3dc72e-67d0-42c7-9d92-98e4dac497d0/refunds',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '72bf144e-4a7b-4081-982e-1317d053dcb2',
            'expectedRevision': 3,
            'lines': [
                {
                    'sku': 'FA-0001',
                    'quantity': '1',
                },
            ],
            'method': 'cash',
            'reason': 'damaged',
            'restock': False,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "72bf144e-4a7b-4081-982e-1317d053dcb2",
      "expectedRevision": 3,
      "lines": [
        {
          "sku": "FA-0001",
          "quantity": "1"
        }
      ],
      "method": "cash",
      "reason": "damaged",
      "restock": false
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/orders/2f3dc72e-67d0-42c7-9d92-98e4dac497d0/refunds');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $body,
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/pos/v1/orders/2f3dc72e-67d0-42c7-9d92-98e4dac497d0/refunds");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "72bf144e-4a7b-4081-982e-1317d053dcb2",
      "expectedRevision": 3,
      "lines": [
        {
          "sku": "FA-0001",
          "quantity": "1"
        }
      ],
      "method": "cash",
      "reason": "damaged",
      "restock": false
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "72bf144e-4a7b-4081-982e-1317d053dcb2",
      "status": "accepted",
      "aggregateId": "2f3dc72e-67d0-42c7-9d92-98e4dac497d0",
      "aggregateRevision": 4
    }

    List refunds

    GET /pos/v1/refunds

    Parameters

    NameInTypeRequiredMeaning
    orderId query string (uuid) Nooptional Only refunds of this order.
    limit query integer Nooptional Records per page, from 1 to 500. Default 100 Range 1 – 500
    cursor query string Nooptional The nextCursor of the previous page.

    Responses

    StatusMeaningBody
    200 A page of refunds. RefundPage
    401 The token is missing, not valid or has ended. Error
    403 The token does not give access to this data. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl "$RDC_BASE_URL/pos/v1/refunds?limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/refunds?limit=20`, {
      method: 'GET',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
      },
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'GET',
        f'{os.environ["RDC_BASE_URL"]}/pos/v1/refunds?limit=20',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/refunds?limit=20');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'GET',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        ],
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/pos/v1/refunds?limit=20");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    JSON

    {
      "items": [
        {
          "id": "d81f9090-fcf3-48c3-9b67-a1ed7ded6ec3",
          "orderId": "3178a6cd-5034-4dd9-8bc9-7e1c238068bd",
          "lines": [
            {
              "sku": "AP-0101",
              "quantity": "2"
            }
          ],
          "amount": "8.40",
          "method": "card",
          "reason": "changed_mind",
          "restock": true,
          "at": "2026-11-23T06:58:00Z"
        }
      ],
      "nextCursor": null
    }

    Get a refund

    GET /pos/v1/refunds/{refundId}

    Parameters

    NameInTypeRequiredMeaning
    refundId path string (uuid) Yesrequired The refund.

    Responses

    StatusMeaningBody
    200 The refund. Refund
    401 The token is missing, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The refund does not exist in your account. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl "$RDC_BASE_URL/pos/v1/refunds/d81f9090-fcf3-48c3-9b67-a1ed7ded6ec3" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/refunds/d81f9090-fcf3-48c3-9b67-a1ed7ded6ec3`, {
      method: 'GET',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
      },
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'GET',
        f'{os.environ["RDC_BASE_URL"]}/pos/v1/refunds/d81f9090-fcf3-48c3-9b67-a1ed7ded6ec3',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/refunds/d81f9090-fcf3-48c3-9b67-a1ed7ded6ec3');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'GET',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        ],
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/pos/v1/refunds/d81f9090-fcf3-48c3-9b67-a1ed7ded6ec3");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    JSON

    {
      "id": "d81f9090-fcf3-48c3-9b67-a1ed7ded6ec3",
      "orderId": "3178a6cd-5034-4dd9-8bc9-7e1c238068bd",
      "lines": [
        {
          "sku": "AP-0101",
          "quantity": "2"
        }
      ],
      "amount": "8.40",
      "method": "card",
      "reason": "changed_mind",
      "restock": true,
      "at": "2026-11-23T06:58:00Z"
    }