Refunds


Overview

The refunds API allows you to create, view, and delete individual refunds.


Create a order note

This API helps you to create a new refund for an order.

createRefund({})

Parameters

required String amount,
required int orderId,

API Call

// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");

// Call API
Refund refund = await WooSignal.instance.createRefund({String amount, int orderId});

Response

Refund instance

Represents the following object - WooCommerce create a refund


Retrieve a refund

This API lets you retrieve and view a specific refund from an order.

retrieveRefund({})

Parameters

required int orderId,
required int refundId,
String dp,

API Call

// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");

// Call API
Refund refund = await WooSignal.instance.retrieveRefund(orderId: "order Id", refundId: "refund Id");

Response

Refund instance

Represents the following object - WooCommerce retrieve a refund


List all refunds

This API helps you to view all the refunds from an order.

getRefunds(int orderId)

Parameters

String context,
int page,
int perPage,
String search,
String after,
String before,
List<int> exclude,
List<int> include,
int offset,
String order,
String orderby,
List<int> parent,
List<int> parentExclude,
int dp

API Call

// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");

// Call API
List<Refund> refunds = await WooSignal.instance.getRefunds(id: "order id");

Response

List<Refund> instance

Represents the following object - WooCommerce list all refunds


Delete a refund

This API helps you delete an order refund.

deleteRefund(int orderId, int refundId)

Parameters

int orderId,
int refundId

API Call

// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");

// Call API
Refund refunds = await WooSignal.instance.deleteRefund(int orderId, int refundId);

Response

Refund instance

Represents the following object - WooCommerce delete a refund