techrar docs
Home
Solutions
Solutions
  • eCommerce SaaS
  • Meals SaaS
  • Meals Marketplaces
API
API
  • Merchant APIs
  • Customer App APIs
  • Meals APIs
Techrar Connect
Home
Solutions
Solutions
  • eCommerce SaaS
  • Meals SaaS
  • Meals Marketplaces
API
API
  • Merchant APIs
  • Customer App APIs
  • Meals APIs
Techrar Connect
  1. Invoices
  • Getting Started
  • Merchant Account
    • Merchant Wallet
      • Wallet Details
      • Charge Wallet
    • Merchant Settings
    • List Bank Accounts
    • Update Merchant Settings
    • Organization Config
  • Customers
    • Locations
      • List Customer Locations
      • Customer Location Details
      • Create Customer Location
    • Memberships
      • List Customer Memberships
    • Customer Order Statistics
    • List Customers
    • Customer Details
    • Create Customer
    • Update Customer
  • Wallets
    • Customer Wallet Details
    • Deposit Points
    • Deposit Cashback
    • Redeem from Wallet
  • Vouchers
    • Get Voucher Discount
    • Update Voucher Usage
  • Items
    • Item Config Details
    • Update Item Config
    • List Items
    • Item Details
    • Create Item
    • Update Item
    • Delete Item
    • Reserve an item
    • Record Item Purchase
    • Bulk Update Items
    • Bulk Update Item Prices
  • Item Categories
    • List Item Categories
    • Item Category Details
    • Create Category
    • Update Category
    • Delete Category
  • Item Tags
    • List Item Tags
    • Create Tag
    • Update Tag
    • Delete Tag
  • Item Images
    • Create Item Image
    • Upadte Item Image
    • Delete Item Image
  • Item Discounts
    • Create Item Discount
    • Upadte Item Discount
    • Delete Item Discount
  • Item Bundles
    • List Bundle Categories
    • Bundle Category Details
    • Create Bundle Category
    • Update Bundle Category
    • Delete Bundle Category
  • Item Modifiers
    • List Modifier Categories
    • Modifier Category Details
    • Create Modifier Category
    • Update Modifier Category
    • Delete Modifier Category
  • Carts
    • List Carts
    • Cart Details
  • Orders
    • Checkout Config Details
    • Update Checkout Config
    • List Orders
    • Order Details
    • List Recurring Purchases
    • Recurring Purchase Details
    • Recurring Purchase Details
  • Invoices
    • Invoice Config Details
      GET
    • Update Invoice Config
      POST
    • List Invoices
      GET
    • Invoice Details
      GET
    • Refund Invoice
      POST
  • Transactions
    • List Transactions
    • Transaction Details
    • Capture Bank Transfer Transaction
    • Decline Bank Transfer Transaction
  • Subscriptions
    • List Subscriptions
    • Subscription Details
    • Subscriptions Statistics
    • Cancel Subscription Auto Renewal
    • Cancel Subscription
    • Increment Subscription Usage
    • Decrement Subscription Usage
    • Bulk Pause Subscriptions
    • Bulk Resume Subscriptions
    • Create Subscription Update
    • Cancel Subscription Update
  • Fulfillments
    • Fulfillment Overview
    • List Fulfillments
    • Fulfillment Details
    • Update Fulfillment Details
  • Tickets
    • List Tickets
    • Bulk Update Tickets
    • Validate Token and Check in Ticket
  • Shipments
    • Shipping Config Details
    • Update Shipping Config
    • Shipping Labels Details
    • Purchase Shipment Labels
    • Create Shipment
    • Cancel Shipment
    • Create Return Shipment
  • Pickup Locations
    • List Pickup Locations
    • Pickup Location Details
    • Create Pickup Location
    • Update Pickup Location Details
    • Delete Pickup Location
  • Couriers
    • List Couriers
    • Get Active Couriers
    • Get Couriers Prices
    • Courier Details
    • Create Custom Courier
    • Update Custom Courier Details
    • Delete Custom Courier
  • Geo & Places
    • List Countires
    • List Regions
    • List Cities
    • List Districts
  • Webhooks
    • List Webhooks
    • Create Webhook
    • Update Webhook Details
    • Delete Webhook
    • List Webhook Logs
    • Test Webhook
    • Delete Webhook By URL
  • Sales Channels
    • Meals
      • List Provider Meal Plans
      • Update Meals Plans Listings
      • List Provider Meals Orders
      • Provider Meals Order Details
      • List Provider Meals Subscriptions
      • Provider Meals Subscription Details
    • Sales Channel Profile Details
    • List Sales Channel Connections
    • Accept Sales Channel Connection Request
    • Reject Sales Channel Connection Request
    • Activate Sales Channel Connection
    • Deactivate Sales Channel Connection
    • Delete Sales Channel Connection Request
  • Notifications
    • Send Notification
  • Meals Plans
    • List Plan Tags
    • List Plans
    • Plan Details
    • Menu Details
  • Meals Logistics
    • City Details
    • Captain Details
    • Branch Details
    • List Supported Windows
    • List Captains
    • Bulk Update SubOrders
  1. Invoices

Refund Invoice

POST
https://api.techrar.com/order/v1/merchant/invoices/{invoice_id}/refund/
This endpoint allows you to issue a refund transaction on the passed invoice
Permission
can_write_order - orders write only

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.techrar.com/order/v1/merchant/invoices//refund/' \
--header 'app-id: 4' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "comments": "string",
    "refunded_items": [
        {
            "id": 0,
            "qty": 0,
            "amount": 0
        }
    ]
}'
Response Response Example
{
    "id": 608,
    "custom_fields": null,
    "items": [
        {
            "id": 651,
            "custom_fields": null,
            "item": {
                "id": 132,
                "custom_fields": null,
                "images": [],
                "discount": {
                    "is_applied": false,
                    "is_trial_applied": false,
                    "is_usage_price": false,
                    "price_after_discount_no_trial": 10.33,
                    "price_after_discount": 10.33,
                    "payment_method_offers": [
                        {
                            "method": "mada",
                            "amount": 10.433300000000001
                        },
                        {
                            "method": "visa_master",
                            "amount": 10.33
                        },
                        {
                            "method": "apple_pay",
                            "amount": 10.33
                        },
                        {
                            "method": "tabby_installments",
                            "amount": 10.33
                        },
                        {
                            "method": "tamara_installments",
                            "amount": 10.33
                        }
                    ]
                },
                "stock": {
                    "in_stock": true,
                    "qty": 100
                },
                "modifiers": [],
                "variants": [],
                "varies_on": null,
                "bundle_categories": [],
                "plan_config": null,
                "off_days": [],
                "off_dates": [],
                "tags": [],
                "app_id": 86,
                "ordering": 0,
                "type": "product",
                "service_type": "delivery",
                "sku": "17556771634411092",
                "price": 10.33,
                "is_taxable": true,
                "name_en": "Refundable",
                "name_ar": "Refundable",
                "description_en": "",
                "description_ar": "",
                "is_plan_only": false,
                "is_plan_enabled": false,
                "served_from_date": null,
                "served_to_date": null,
                "served_from_time": null,
                "served_to_time": null,
                "weight": 0.0,
                "categories": [
                    12
                ]
            },
            "app_id": 86,
            "created_at": "2025-08-20T12:49:31.599947+03:00",
            "item_id": 132,
            "name_en": "Refundable",
            "name_ar": "Refundable",
            "refund_reason": "first refund",
            "refunded_qty": 0,
            "amount": 10.33,
            "qty": 1,
            "net_amount": 10.33,
            "voucher_discounts_amount": 0.0,
            "total_amount_excluding_tax": 8.98,
            "tax_percentage": 15.0,
            "tax_amount": 1.35,
            "total_amount": 10.33,
            "auto_renew": false,
            "date": null,
            "time": null,
            "order_item": 491,
            "parent_invoice_item": null
        }
    ],
    "transactions": [
        {
            "id": 168,
            "custom_fields": null,
            "invoice_id": 608,
            "provider_details": {
                "RefundId": 213652,
                "RefundReference": "2025000042",
                "CreatedDate": "20082025124932",
                "RefundStatus": "REFUNDED",
                "Amount": "0.84",
                "Comments": null,
                "InvoiceId": "6057151",
                "GatewayReference": {
                    "PaymentId": "6057151-23074",
                    "AuthorizationId": null,
                    "ReferenceId": "523209298603",
                    "TransactionId": "05O99T",
                    "RefundAmount": "0.045",
                    "Currency": "KWD",
                    "PaymentMethod": "VISA/MASTER"
                }
            },
            "app_id": 86,
            "created_at": "2025-08-20T12:49:32.147866+03:00",
            "type": "refund",
            "reason": "first refund",
            "currency": "SAR",
            "received_amount": 10.33,
            "quoted_amount": 10.33,
            "status": "captured",
            "method": "visa_master",
            "provider": "myfatoorah",
            "provider_auth_code": null,
            "provider_status": "REFUNDED",
            "provider_method": "VISA/MASTER",
            "provider_transaction_id": "213652",
            "provider_invoice_id": "6057151",
            "provider_order_id": null,
            "fraud_detected": false,
            "fraud_reason": null,
            "attachment": null
        }
    ],
    "order_id": 410,
    "customer": {
        "id": 35265,
        "country_code": "966",
        "username": "0535501059",
        "mobile_number": "966535501059",
        "email": "[email protected]",
        "name": "Ozel",
        "lang": "ar",
        "current_city_id": null,
        "is_email_verified": false,
        "is_mobile_verified": true,
        "is_blocked": false,
        "is_deleted": false,
        "is_verified": true,
        "joined_at": "2025-06-02 12:10:54.881137+00:00",
        "national_id": null,
        "secondary_mobile_number": null,
        "date_of_birth": null,
        "avatar": null,
        "custom_fields": null
    },
    "invoice_pdf_en": null,
    "invoice_pdf_ar": null,
    "serial": "INV-202500375",
    "refunds": null,
    "refunded_invoice": {
        "id": 603,
        "serial": "INV-202500374",
        "issued_at": "2025-08-20T08:08:02.156583Z",
        "total_amount": 327.32,
        "currency": "SAR",
        "status": "paid",
        "invoice_pdf_en": null,
        "invoice_pdf_ar": null,
        "custom_fields": null
    },
    "app_id": 86,
    "created_at": "2025-08-20T12:49:31.588396+03:00",
    "invoice_reference_id": null,
    "invoice_reference_serial": null,
    "type": "refund",
    "status": "paid",
    "refund_reason": "first refund",
    "issued_at": "2025-08-20T12:49:31+03:00",
    "due_at": "2025-08-20T12:49:31+03:00",
    "sub_total_amount": 10.33,
    "shipping_amount": 0.0,
    "setup_amount": 0.0,
    "net_amount": 10.33,
    "sub_total_discounts_amount": 0.0,
    "shipping_discounts_amount": 0.0,
    "total_discounts_amount": 0.0,
    "total_amount_excluding_tax": 8.98,
    "tax_percentage": 15.0,
    "tax_amount": 1.35,
    "total_amount": 10.33,
    "wallet_redeem_amount": 0.0,
    "total_amount_with_redeem": 0.0,
    "currency": "SAR",
    "payment_method": "visa_master",
    "payment_provider": "myfatoorah",
    "is_auto_renewal": false,
    "invoice_provider": "fai",
    "zatca_status": "aborted",
    "invoice_error": "Parent invoice must be successfully published before creating a return invoice."
}
Modified at 2025-08-20 10:39:43
Previous
Invoice Details
Next
Transactions
Built with