Skip to content
OnCharge.io
View as Markdown
Developer docs

Shipments & payouts

OnCharge pays you for an order once the shopper has received it. For goods you ship, that means the carrier has confirmed delivery to the address the shopper gave at checkout. Your part is to send that address when the session is created and to report the tracking number when the order ships.

When orders are paid out#

What the order containsPayout released
Physical goods (shipped)1 day after the carrier confirms delivery of every package to the order's shipping address.
Digital goods or services (nothing shipped)7 days after payment.

Your account is set up as shipping physical goods, digital goods and services, or both, during onboarding. On an account that sells both, an order with a shipping address is treated as physical and one without as digital. Research-use-only (RUO) stores always ship physical goods.

Refunds reduce the amount paid out for the order. A dispute (chargeback) or a fraud warning from the shopper's bank holds the order's payout until it is resolved. Every account has a reserve: 2.5% of each order's amount, less refunds, is held back and released automatically 180 days after the payout clock starts (confirmed delivery, or payment for orders with nothing to ship).

OnCharge's card fee is set by your monthly card volume: 6.9% under $10,000, 5.9% from $10,000, 4.9% from $100,000 and 3.9% from $250,000 a month, each plus $0.30 per transaction (on US dollar charges; a charge in another currency pays the percentage only). The percentage is on the amount before sales tax. Your rate starts from the monthly volume in your application and is reviewed on the 1st of each month from the live US dollar payments you processed the month before (counted in the month they were captured), less refunds; the new rate applies to payments started from then on, and you are emailed when it changes. Refunds return the fee in proportion.

1. Send the shipping address#

Include shipping when you create the checkout session:

JSON
"shipping": {
  "name": "Alex Rivera",
  "line1": "500 Market St",
  "line2": "Suite 200",
  "city": "San Francisco",
  "state": "CA",
  "postal_code": "94105",
  "country": "US"
}

OnCharge compares the carrier's delivery location with this address: for US addresses the first five digits of the ZIP code, otherwise the city and state. Send at least postal_code or city. If the order is saved after the session is created, send the address with POST /api/v1/checkout/sessions/{id}/order instead. The address is fixed once recorded.

2. Report the tracking number#

When the order ships, call POST /api/v1/shipments. Identify the order by session_id, or by your order_id (the most recent paid session with that order ID).

Request
{
  "session_id": "8b0f6f2e-4d1a-4c4e-9a52-6f3e1d2c7b11",
  "shipments": [
    { "carrier": "UPS", "tracking_number": "1Z999AA10123456784" },
    { "carrier": "USPS", "tracking_number": "9400 1000 0000 0000 0000 00" }
  ]
}
Response
{
  "session_id": "8b0f6f2e-4d1a-4c4e-9a52-6f3e1d2c7b11",
  "shipments": [
    { "tracking_number": "1Z999AA10123456784", "carrier": "ups", "status": "accepted" },
    { "tracking_number": "9400100000000000000000", "carrier": "usps", "status": "accepted" }
  ],
  "delivery": { "state": "in_transit", "hold_reason": null }
}
  • Carriers: USPS, UPS, FedEx and DHL Express. Common spellings are accepted (USPS, United States Postal Service, FedEx Ground, DHL, …). carrier may be left out when the number's format identifies the carrier (UPS numbers starting 1Z, USPS IMpb and …US numbers).
  • Tracking numbers: spaces and dashes are ignored; 8 to 40 letters and digits.
  • Several packages: send every tracking number, in one call or several (up to 10 per order). The order is delivered when all of them are.
  • Repeats are safe: a number already on the order is accepted again without change.
  • The order must be paid (captured) first, otherwise the call fails with 409 order_not_paid.

Each number is accepted or rejected on its own:

errorMeaning
carrier_not_supportedThe carrier is not USPS, UPS, FedEx or DHL Express, or could not be worked out.
tracking_number_invalidNot a valid tracking number.
carrier_mismatchThe number belongs to a different carrier than the one given.
tracking_number_in_useThe number is already used for another order.
too_many_shipmentsThe order already has 10 tracking numbers.

With the Node SDK:

TypeScript
const result = await oncharge.shipments.report({
  order_id: '1001',
  shipments: [{ carrier: 'FedEx', tracking_number: '7489 1234 5678' }],
});

The WooCommerce plugin reports tracking automatically from popular shipment-tracking plugins.

3. Follow the delivery#

GET /api/v1/shipments?session_id=… (or oncharge.shipments.get(sessionId)) returns the order's state and each package's result:

JSON
{
  "session_id": "8b0f6f2e-4d1a-4c4e-9a52-6f3e1d2c7b11",
  "delivery": {
    "state": "delivered",
    "hold_reason": null,
    "delivered_at": "2026-01-04T17:12:00.000Z",
    "shipments": [
      {
        "id": "3f2a…",
        "carrier": "ups",
        "carrier_label": "UPS",
        "tracking_number": "1Z999AA10123456784",
        "status": "delivered",
        "result": "confirmed",
        "problems": [],
        "delivered_at": "2026-01-04T17:12:00.000Z",
        "delivered_to": "San Francisco, CA, 94105",
        "note": null,
        "removable": false,
        "created_at": "2026-01-02T09:30:00.000Z"
      }
    ]
  }
}
delivery.stateMeaning
not_trackedNo delivery tracking applies (nothing to ship, or not paid yet).
awaiting_shipmentPaid; no tracking number reported yet.
in_transitAt least one package is still on its way.
deliveredEvery package was confirmed delivered to the order address. The payout is scheduled.
on_holdPayout held; hold_reason says why.
refundedThe order was refunded in full.

When every package is confirmed, OnCharge also sends a delivery.confirmed webhook.

When a delivery does not count#

A carrier "delivered" event releases the payout only if the package moved after the order was paid, was delivered after payment, was not a return, and was delivered to the order's address. Otherwise the shipment's result is problem, with plain-language reasons in problems, for example:

  • The delivery location does not match the order's shipping address.
  • This package was already in transit before the order was paid.
  • The carrier returned this package to the sender.
  • This order has no shipping address on file to compare the delivery against.

The order is then held for review. If a number was entered by mistake and the carrier has not given a final answer, you can remove it in the merchant portal (removable: true) and report the right one.

hold_reason (examples)Cause
The shopper disputed this payment with their bank.A chargeback is open.
The shopper's bank flagged this payment as possibly fraudulent.A fraud warning was received.
A delivery for this order could not be matched to the order.See the shipment's problems.
This order is under review.OnCharge is reviewing the order.

Debit card payouts in minutes#

Money a delivered order has released can reach a debit card within minutes instead of going to your bank with the next payout, for a fee. Nothing is paid earlier than it would be anyway: a debit card payout takes only what the next standard payout would pay right now (delivered, released orders and due reserves, less any refunds or chargebacks owed), and only money that has settled.

  • Add a debit card in the merchant portal under Settings → Payout account: a non-prepaid Visa, Mastercard or Discover debit card from a US bank. It needs a security code emailed to you, every owner is emailed, and no debit card payout can reach a new card for 48 hours. Your bank account stays where standard payouts go.
  • Take it from the Payouts page, or with GET and POST /api/v1/payouts/instant. The quote shows what reaches the card, the fee (1.5% of the amount, at least $0.50, taken out of it) and when it should arrive (usually within 30 minutes). Send an Idempotency-Key: the same key never pays twice.
  • Limits: $1 to $9,999 per payout, and up to $10,000 or 5 debit card payouts per store per day (the day resets at midnight US Central time).
  • Timing: with a debit card on file, money you do not take to the card goes to your bank in one standard payout each day, in the evening (from 22:00 UTC), instead of every few minutes.
  • Debit card payouts wait while payouts are paused, including the cooling-off after a bank account change.
  • If it does not arrive, the money is back in your balance and goes to your bank with your next payout, and the fee is refunded. The card is turned off: add it again or use another one. You get a payout.failed webhook with method: "instant".

Checklist#

  • Send shipping for every order you ship, at session creation or with /order.
  • Report tracking numbers as soon as the label is created.
  • Use USPS, UPS, FedEx or DHL Express for orders you want paid on delivery.
  • Watch on_hold orders in the merchant portal.