Cash On Delivery (Ecart Pay)

Collect payment at the door and receive the money in your account, including the setup step the payout depends on.

Cash on delivery is how a large share of Latin America buys online: the buyer pays the carrier at the door. For you it means two separate things have to work — collecting the money, and getting it to you.

Requesting it

COD is an additional service on the package, with the amount to collect:

{
  "origin": { "...": "..." },
  "destination": { "...": "..." },
  "packages": [
    {
      "content": "Running shoes",
      "amount": 1,
      "type": "box",
      "weight": 1.5,
      "dimensions": { "length": 30, "width": 20, "height": 12 },
      "additionalServices": [
        {
          "service": "cash_on_delivery",
          "data": { "amount": "1250" }
        }
      ]
    }
  ],
  "shipment": { "type": 1, "carrier": "fedex", "service": "express" }
}

The amount is what the carrier collects from the buyer. Set it to the total the buyer owes — product plus whatever you are charging for shipping — not to the shipping cost.

Not every carrier offers COD, and it is parcel-only: it is not available for LTL or FTL. Check what is actually available for a route with GET /additional-services/{country_code}/{international}/{shipment_type_id} before offering it at checkout.

What it costs

Quote first. POST /ship/rate/ returns both numbers:

FieldMeaning
cashOnDeliveryAmountWhat will be collected from the buyer
cashOnDeliveryCommissionWhat the collection costs you

The commission is deducted from the payout. You receive the collected amount minus the commission.

Getting paid

When the shipment reaches Delivered, Envia pays the net amount to your Ecart Pay account automatically. Each payout references the shipment, and a shipment is paid exactly once.

Link Ecart Pay before the first delivery

Your company must have an Ecart Pay account linked before the shipment is delivered.

Without it, the shipment ships, the carrier collects the money from the buyer and the delivery succeeds, but no automatic payout is made, and the API response does not warn you.

If you are launching COD, link the account first and confirm the payout on a single real shipment before you turn it on across your catalog.

Shipments sent on your own carrier account (customKey) are settled by that carrier directly and are not paid out through Ecart Pay.

Checking a payout

GET /shipments/cod is the reconciliation endpoint:

FieldMeaning
cash_on_delivery_amountWhat the carrier was asked to collect
cash_on_delivery_costThe commission
payed_amountWhat was actually paid to you
payed_atWhen
payment_referenceThe payout transaction id, for matching against your Ecart Pay statement

payed_amount is null on a delivered shipment means the payout has not happened — start with whether the account is linked.

GET /shipments/cod/count gives the same population as totals, which is what you want on a dashboard rather than paging through the list.

Building on it

Reconcile on payment_reference, not on amounts. Amounts repeat across orders; the reference does not.

Treat delivered-and-unpaid as an alert. A shipment delivered several days ago with no payed_at is money that has been collected from your buyer and has not reached you. It will not resolve itself.

Do not promise the buyer a refund timeline based on delivery. The collection and the payout are separate events, and returns complicate both — see Return to Sender.

Related pages


Next steps


Did this page help you?