Record offline sales and refunds

Enter owner-confirmed offline payments using stable receipt references, or review and confirm a CSV import.

Last updated November 29, 2026

Availability and payment records

This guide describes the current source implementation. It does not establish deployment, provider approval or a successful live delivery. Verify that your deployment includes the offline-sales routes, UI and action-source migration before using it.

Open Attribution → Record sales, or /app/attribution?view=sales. Only the selected brand’s owner can enter sales using an authenticated session. Enabled, entitled Site Tracking is required. No new secret is needed. A separate scoped automation credential is not part of this workflow; do not reuse the Site Tracking identity secret.

Use this workflow for completed payments received outside connected payment providers, such as cash, bank transfer or phone orders paid outside those processors. It records attribution; it does not collect money, contact buyers or verify a bank transfer. CRM “won” remains an opportunity rather than a paid purchase.

Entries have source=offline_import and are owner attested, not provider verified. Do not copy Stripe, Shopify or WooCommerce payments here: use their native connection to reconcile them. A different manual receipt ID cannot automatically deduplicate a transaction already recorded by another source. Common provider payment ID prefixes are rejected, but that cannot identify every duplicate.

Record one sale

The main form contains the receipt, outcome, payment channel, amount and currency. Expand Receipt source, date and visitor matching to change the prefilled receipt source or UTC date, or to link an observed visitor. Check the date in the preview even when using the defaults.

  1. Enter a Stable receipt reference. Open the details above to change Merchant namespace from its default offline when needed. Use non-personal identifiers, such as sandbox-desk and sandbox-receipt-001. Never use names, phone numbers, email addresses or provider payment IDs. Keep the same namespace and reference across retries and imports.
  2. Choose Paid purchase, enter a positive amount with at most two decimal places, and select EUR or USD. Currencies remain separate; no currency conversion is performed.
  3. Choose Where the payment or refund happened: physical store, phone call, email, chat or other offline channel. Select where it actually happened. This is separate from the payment processor and must not be set to website activity.
  4. In the details, check Occurred at (ISO with UTC offset) and IANA time zone. Keep the defaults only when they match the sale. For example, 2026-11-29T10:15:00+01:00 matches Europe/Madrid. The offset must match that zone at that instant, including daylight-saving time. Occurrences must be within the past 400 days and cannot be in the future.
  5. Optionally provide an observed visitor ID and normalized email/phone SHA-256 hashes. Never supply raw contact details. A visitor ID must have a retained, consented observation on this brand before the sale. Without an eligible visitor, revenue stays unattributed; hashes alone do not invent a visitor journey.
  6. Choose Review offline entry, review the preview, and confirm completed payment/refund, consent for attribution and enabled ad sharing, and that the sale is outside connected providers and not already recorded by them. Choose Confirm and record offline sales.

References are hashed in the ledger’s brand-scoped idempotency key. Raw namespace/receipt references are not retained there. Keep your own non-personal reference register so you can repeat exactly the same entry after an ambiguous response. An exact retry is unchanged; changing its amount, event kind, action source, currency, occurrence, identity or Sandbox setting conflicts. The preview and form clear after success or a brand switch.

Sandbox entries for controlled tests

Sandbox entry is off by default. Select it before reviewing a QA purchase or refund. The preview labels each row Sandbox or Standard, and recent ledger history identifies sandbox rows. Sandbox rows are retained for inspection but excluded from primary sales reports by default and blocked from all Meta and Google ad exports, even when ad sharing and provider connections are enabled. They still use the existing event quota, retention and erasure rules.

The API accepts optional is_test as a strict JSON boolean, defaulting to false. It does not accept strings, numbers or null. In CSV, optional is_test accepts exact lowercase true or false; an omitted column or blank cell defaults to false. Existing CSV headers without this column remain accepted. A public browser conversion cannot set this flag; the sandbox control belongs to the authenticated owner workflow.

Use the same Sandbox setting for a refund as for its original purchase. A mismatch rejects the entire import. Retrying a receipt with a different flag also conflicts, so a sandbox receipt cannot silently become a standard sale. Do not change receipt references to work around that protection.

Partial refunds

Choose Completed refund, use a new stable receipt reference and enter the Original purchase reference in the same merchant namespace. The original must be an offline purchase on the same brand. Use its currency and an occurrence no earlier than that purchase. Refunds inherit its visitor and match hashes; supplied conflicting identities are rejected.

Multiple partial refunds can be recorded, but their total cannot exceed the original paid amount. The brand lock serializes concurrent imports. Purchase and refund may appear in one CSV in either order. If the original or receipt was suppressed by erasure, the retry stays suppressed instead of recreating it. Offline entries participate in the existing ledger and erasure workflow.

Preview and confirm a CSV

Expand Import offline sales CSV, then download the template. Upload UTF-8 CSV of at most 200,000 bytes with 1-500 entries. Supported columns are:

merchant,receipt_ref,event,original_receipt_ref,amount,currency,occurred_at,timezone,action_source,visitor_id,email_hash,phone_hash,is_test

Required columns: merchant, receipt_ref, event, amount, currency, occurred_at, timezone, action_source. Use purchase or refund for event; use phone_call, physical_store, email, chat or other for action_source. The is_test column is optional; use lowercase true for sandbox rows. Optional blank cells may be omitted. Unknown or duplicate headers, repeated merchant receipt references, malformed rows and invalid values are rejected. Decimal amounts use a period without currency symbols or thousands separators.

Preview validates all rows without saving. It displays the first ten; review the full source CSV before confirming. The same validation runs at confirmation. A conflict, quota failure or malformed final row rejects the entire batch, including its quota changes. There is no partial successful import. Exact retries and suppressed erased entries do not consume quota. New entries count toward the existing site’s per-UTC-day event cap.

If recording times out, check Recent offline ledger entries, then retry identical entries with the same references. Do not generate replacement references: that would create new sales. History shows the latest 100 entries and receipt digests, not the original references.

Ad delivery is conditional

A recorded sale is not evidence that an ad provider accepted or matched it. Eligible recent offline purchases use the existing durable Meta delivery outbox, carrying the selected offline action source. Ad sharing, an active per-brand Meta connection, a consented match key, supported event mapping and the delivery window are required. The existing retry/retention rules still apply; no provider request is made from the offline HTTP import itself. Refunds are not relabeled as purchases for Meta.

Meta’s server event specification supports the listed offline action sources and requires events within seven days for this API. Older offline sales may be recorded for reporting but are skipped for Meta delivery. Events recorded with ad sharing disabled or no match key are skipped rather than silently sent after a later configuration change.

Google feed inclusion requires the existing enabled ad-sharing configuration, authenticated feed credentials, eligible retained click observations and applicable consent/time-window rules. A manual entry alone does not create a Google click or prove provider acceptance. First-party reporting can include a sale even when no ad export is eligible.

Controlled verification

Use a dedicated AEO sandbox brand and non-personal sandbox receipt references. Select Sandbox entry for every test sale and its refund, or set CSV is_test=true. Confirm that these rows are labeled Sandbox, absent from primary sales reports and never exported to Meta or Google. Preview one sale, confirm it once, retry the identical entry, and verify one ledger sale with an unchanged retry. Add two partial refunds within the original amount; an over-refund must fail. Try a CSV with an invalid final row and verify that none of that batch was written. Test a brand switch and ensure the old preview and attestations clear.

Use provider test controls and approved sandbox credentials separately for delivery proof. Do not send real contact messages, make real payments or create artificial production revenue to test this workflow. Local tests and browser fixtures do not establish live provider permissions, delivery or matching.