Refund Method
Submit refund requests for an account.
Syntax
public boolean refund(String id, int idType);
Remarks
This method provides a way to request a refund for a shipment. The identifier specified will typically be the Tracking Number (referred to as the PIC Number). The table below lists the possible values for the IdType parameter.
Value | Description |
0 (default) | The Tracking Number (PIC Number). For Stamps.com this is the StampsTxId. |
1 | The Package Customs Id |
2 | The Package Piece Id |
The Piece Id and Tracking Number are both acceptable types of identification and can be used interchangeably.
The Customs Id type is only applicable to PriorityMailInternational and ExpressMailInternational shipments.
When refunding a shipment through Endicia, Server must be set to the URL of the ELS services, for instance:
https://elstestserver.endicia.com/ELS/ELSServices.cfcOther operations such as label generation use the EWS label services, however refunds use ELS by default and require a different endpoint. Alternatively, set UseEWSService to True to use EWS for refunds (recommended).