Shippo - Cancel Shipment
Description
Section titled “Description”This module requests a refund or cancellation of a shipping label in Shippo. It receives the transaction ID (obtained when creating the shipment) and makes a POST request to the /refunds/ endpoint with the associated transaction. It returns the refund ID, status, and the original transaction ID.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Shippo credential (provider: shippo) |
| transaction_id | text | Yes | Transaction ID obtained when creating the shipment |
Credentials
Section titled “Credentials”A shippo type credential is required with the following fields:
- api_token: Shippo API Token
Output
Section titled “Output”{ "success": true, "refund_id": "rfnd_abc123", "status": "QUEUED", "transaction_id": "txn_abc123", "message": "Reembolso solicitado: QUEUED"}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "credentials_id": "mi_credencial_shippo", "transaction_id": "txn_abc123"}API Used
Section titled “API Used”- Endpoint: POST
/refunds/ - Base: Shippo API (via helper
_shippoHelper) - Documentation: https://goshippo.com/docs/
- The refund can have statuses: QUEUED, PENDING, SUCCESS, ERROR
- USPS refunds are generally processed automatically
- Processing time depends on the carrier
- Only labels that have not been scanned can be refunded
- The transaction_id (not the shipment_id) is used to request the refund