Refund
The Refund
object represents a refunded shipment, and includes details about the related Shipment
and tracking code.
USPS shipping labels can be refunded if requested within 30 days of generation. The processing time is at least 15 days, after which the funds will return to your EasyPost balance. EasyPost fees will also be refunded. To qualify, a shipment must not have been scanned by the USPS.
UPS and FedEx shipping labels may be refunded within 90 days of creation.
Shipment
The status of the refund request, reported by the carrier. Possibe values:
- "submitted"
- "refunded"
- "rejected"
Shipment
being refundedRefund
was createdRefund
was last updated{
"id": "rfnd_f85f150c71c748649ec06d319a26e54c",
"object": "Refund",
"created_at": "2024-01-24T00:07:22Z",
"updated_at": "2024-01-24T00:07:22Z",
"tracking_code": "9405500207552011812764",
"confirmation_number": null,
"status": "submitted",
"carrier": "USPS",
"shipment_id": "shp_c3b0a61f204b4593a1ed98a3026dc4dc"
}
This endpoint is intended to be used to bulk-process multiple refunds; as a result, this endpoint will return a list of Refund
objects.
To refund a single shipment, use the Refund a Shipment endpoint instead.
A Refund object is immutable once created. All information must be provided during creation; it cannot be modified later.
Request Parameters
1curl -X POST https://api.easypost.com/v2/refunds \
2 -u "EASYPOST_API_KEY": \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "refund": {
6 "carrier": "USPS",
7 "tracking_codes": [
8 "EZ1000000001"
9 ]
10 }
11 }'
1[
2 {
3 "id": "rfnd_f85f150c71c748649ec06d319a26e54c",
4 "object": "Refund",
5 "created_at": "2024-01-24T00:07:22Z",
6 "updated_at": "2024-01-24T00:07:22Z",
7 "tracking_code": "9405500207552011812764",
8 "confirmation_number": null,
9 "status": "submitted",
10 "carrier": "USPS",
11 "shipment_id": "shp_c3b0a61f204b4593a1ed98a3026dc4dc"
12 }
13]
A list of all Refund
objects associated with the given API Key
can also be retrieved.
See the Pagination section of our docs for more details on retrieving all records when multiple pages are available.
Request Parameters
after_id
.before_id
.end_datetime
.start_datetime
.1curl -X GET "https://api.easypost.com/v2/refunds?page_size=5" \
2 -u "EASYPOST_API_KEY":
1{
2 "refunds": [
3 {
4 "id": "rfnd_f85f150c71c748649ec06d319a26e54c",
5 "object": "Refund",
6 "created_at": "2024-01-24T00:07:22Z",
7 "updated_at": "2024-01-24T00:07:22Z",
8 "tracking_code": "9405500207552011812764",
9 "confirmation_number": null,
10 "status": "submitted",
11 "carrier": "USPS",
12 "shipment_id": "shp_c3b0a61f204b4593a1ed98a3026dc4dc"
13 }
14 ],
15 "has_more": true
16}
Retrieve a Refund
by its id
.
1curl -X GET https://api.easypost.com/v2/refunds/rfnd_... \
2 -u "EASYPOST_API_KEY":
1{
2 "id": "rfnd_f85f150c71c748649ec06d319a26e54c",
3 "object": "Refund",
4 "created_at": "2024-01-24T00:07:22Z",
5 "updated_at": "2024-01-24T00:07:22Z",
6 "tracking_code": "9405500207552011812764",
7 "confirmation_number": null,
8 "status": "submitted",
9 "carrier": "USPS",
10 "shipment_id": "shp_c3b0a61f204b4593a1ed98a3026dc4dc"
11}