IRefundsApi refundsApi = client.RefundsApi;
RefundsApi
Retrieves a list of refunds for the account making the request.
Max results per page: 100
ListPaymentRefundsAsync(
string beginTime = null,
string endTime = null,
string sortOrder = null,
string cursor = null,
string locationId = null,
string status = null,
string sourceType = null)
Parameter | Type | Tags | Description |
---|---|---|---|
beginTime |
string |
Query, Optional | Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year. |
endTime |
string |
Query, Optional | Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. |
sortOrder |
string |
Query, Optional | The order in which results are listed. - ASC - oldest to newest- DESC - newest to oldest (default). |
cursor |
string |
Query, Optional | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See Pagination for more information. |
locationId |
string |
Query, Optional | Limit results to the location supplied. By default, results are returned for all locations associated with the merchant. |
status |
string |
Query, Optional | If provided, only refunds with the given status are returned. For a list of refund status values, see PaymentRefund. Default: If omitted refunds are returned regardless of status. |
sourceType |
string |
Query, Optional | If provided, only refunds with the given source type are returned. - CARD - List refunds only for payments where card was specified as paymentsource. Default: If omitted refunds are returned regardless of source type. |
Task<Models.ListPaymentRefundsResponse>
try
{
ListPaymentRefundsResponse result = await refundsApi.ListPaymentRefundsAsync(null, null, null, null, null, null, null);
}
catch (ApiException e){};
Refunds a payment. You can refund the entire payment amount or a portion of it. For more information, see Payments and Refunds Overview.
RefundPaymentAsync(Models.RefundPaymentRequest body)
Parameter | Type | Tags | Description |
---|---|---|---|
body |
Models.RefundPaymentRequest |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
Task<Models.RefundPaymentResponse>
var bodyAmountMoney = new Money.Builder()
.Amount(100L)
.Currency("USD")
.Build();
var body = new RefundPaymentRequest.Builder(
"a7e36d40-d24b-11e8-b568-0800200c9a66",
bodyAmountMoney,
"UNOE3kv2BZwqHlJ830RCt5YCuaB")
.Build();
try
{
RefundPaymentResponse result = await refundsApi.RefundPaymentAsync(body);
}
catch (ApiException e){};
Retrieves a specific Refund
using the refund_id
.
GetPaymentRefundAsync(string refundId)
Parameter | Type | Tags | Description |
---|---|---|---|
refundId |
string |
Template, Required | Unique ID for the desired PaymentRefund . |
Task<Models.GetPaymentRefundResponse>
string refundId = "refund_id4";
try
{
GetPaymentRefundResponse result = await refundsApi.GetPaymentRefundAsync(refundId);
}
catch (ApiException e){};