(Refunds)
Refunds are reimbursements for successfully created but unused shipping labels or other charges.
- Create - Create a refund
- List - List all refunds
- Get - Retrieve a refund
Creates a new refund object.
using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.Refunds.CreateAsync(
refundRequestBody: new RefundRequestBody() {
Async = false,
Transaction = "915d94940ea54c3a80cbfa328722f5a1",
},
shippoApiVersion: "2018-02-08"
);
// handle response
Parameter |
Type |
Required |
Description |
Example |
RefundRequestBody |
RefundRequestBody |
✔️ |
Refund details |
|
ShippoApiVersion |
string |
➖ |
Optional string used to pick a non-default API version to use. See our API version guide. |
2018-02-08 |
Refund
Error Type |
Status Code |
Content Type |
Shippo.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Returns a list all refund objects.
using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.Refunds.ListAsync(shippoApiVersion: "2018-02-08");
// handle response
Parameter |
Type |
Required |
Description |
Example |
ShippoApiVersion |
string |
➖ |
Optional string used to pick a non-default API version to use. See our API version guide. |
2018-02-08 |
RefundPaginatedList
Error Type |
Status Code |
Content Type |
Shippo.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Returns an existing rate using a rate object ID.
using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.Refunds.GetAsync(
refundId: "<id>",
shippoApiVersion: "2018-02-08"
);
// handle response
Parameter |
Type |
Required |
Description |
Example |
RefundId |
string |
✔️ |
Object ID of the refund to update |
|
ShippoApiVersion |
string |
➖ |
Optional string used to pick a non-default API version to use. See our API version guide. |
2018-02-08 |
Refund
Error Type |
Status Code |
Content Type |
Shippo.Models.Errors.SDKException |
4XX, 5XX |
*/* |