Merchants
Pricing
Sign in Get Verified

Reference

WeRefund API

Verification, proof and follow-up above the merchant's existing PSP. The API lets your systems register orders, read the return window and the Policy Record of each order, follow return requests and observed refunds, and receive signed events.

Preview. The WeRefund API is not live yet: routes marked Planned are not in service. Endpoints, fields and examples may change before launch; the values shown are illustrative.

Authentication

Every merchant route takes a secret API key with the Bearer scheme: Authorization: Bearer wr_live_…, or wr_test_… for test orders. Keys are created in your WeRefund dashboard and shown once. Public routes take none.

Platforms

Orders reach WeRefund through the connection to your store platform — Shopify Coming soon, WooCommerce, Magento, PrestaShop, BigCommerce, Wix — or through POST /v1/orders for a custom or headless store.

Errors

The one error envelope of /v1. Branch on code, never on message or on the HTTP status alone. Every refusal answers this one envelope.

errorobjectRequired
codestringRequired

The machine codes of /v1. Stable, snake_case.

One of authentication_required · bearer_not_accepted · csrf_failed · session_revoked · account_disabled · invalid_credentials · password_rejected · password_blank · reset_link_invalid · reset_link_expired · reset_link_already_used · invitation_invalid · invitation_expired · invitation_already_used · display_name_too_long · totp_enrollment_required · totp_required · totp_already_enrolled · totp_enrollment_not_started · invalid_totp · totp_throttled · owner_role_required · api_key_environment_invalid · api_key_scope_invalid · api_key_label_too_long · api_key_limit_reached · api_key_not_found · api_key_prefix_exhausted · store_not_found · invitation_email_invalid · invitation_role_invalid · email_already_registered · member_not_found · last_owner · rate_limited · forbidden · internal_token_not_configured · route_not_found · method_not_allowed · internal_error · idempotency_conflict · return_items_required · draft_not_found · draft_incomplete · policy_check_not_found · policy_verify_not_found · draft_check_in_progress · terms_changed · order_not_found · buyer_email_required · delivery_already_recorded · country_not_supported · formula_not_allowed_for_country · public_slug_locked · public_slug_taken · store_closed · badge_not_found · privacy_url_required · terms_url_required · fee_schedule_missing · option_required · return_window_not_open · return_request_exists · return_item_not_returnable · return_quantity_exceeds_ordered · review_not_eligible · endpoint_url_not_public · validation_failed · idempotency_key_required · cursor_invalid · return_address_required · return_request_state_conflict · tracking_url_invalid · body_unparsable · review_already_flagged · store_required · order_reference_ambiguous · subscribed_event_unknown · connect_state_invalid · ticket_read_only · email_change_link_invalid.

messagestringRequired

For a human reader, in English. Never branch on it.

hintstringOptional

Optional advice for the developer.

Error
{
  "error": {
    "code": "order_not_found",
    "message": "No order with that reference on this tenant.",
    "hint": "Order references are case sensitive."
  }
}

Orders

List orders

Planned
GEThttps://api.werefund.com/v1/orders

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of OrderRequired
order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

storestringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

order_numberstring or nullRequired
currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

subtotal_minorintegerRequired

Product lines, WeRefund fee line, shipping and tax excluded. In minor units of currency.

shipping_minorintegerRequired

Shipping. In minor units of currency.

tax_minorintegerRequired

Tax. In minor units of currency.

total_minorintegerRequired

As paid. In minor units of currency.

placed_atstring (RFC 3339)Required
fulfilled_atstring (RFC 3339) or nullRequired
delivered_atstring (RFC 3339) or nullRequired
delivery_date_sourcestringRequired

One of platform_fulfillment · merchant_declared · unknown.

financial_statusstringRequired

One of pending · paid · partially_refunded · refunded · cancelled.

cancelled_atstring (RFC 3339) or nullRequired
werefund_optionbooleanRequired
policy_version_idstring or nullRequired

Public identifier of a policy version, pv_<n>_<version>.

certificate_idstring or nullRequired

Public identifier of a certificate, WR-<n>.

return_window_daysinteger or nullRequired
return_window_expires_atstring (RFC 3339) or nullRequired
attachment_qualitystring or nullRequired

The attachment quality of the order's Policy Record (bis); no_applicable_version when no policy version applied, so no record exists; null while the order is not paid.

One of bracketed · read_before_purchase · read_after_purchase_unverified · read_after_purchase_changed · no_applicable_version.

sourcestringRequired
is_demobooleanRequired
linesarray of OrderLineRequired
next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/orders \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Orders

Register an order

Planned

Custom / Headless. Idempotency-Key required, kept 24 h; the same key with another body answers 409. The store is the key's, or the one the body names.

POSThttps://api.werefund.com/v1/orders

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

Idempotency-Keystring · headerRequired

Required. Kept 24 hours per key; the same key with another body answers 409 idempotency_conflict.

Request body

storestring or nullOptional

The public slug of the store. Required with a key that covers every store of the tenant (400 store_required); with a key bound to one store it may be left out, and naming another store answers 404 store_not_found.

external_order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

order_numberstring or nullOptional
currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

placed_atstring (RFC 3339)Required
financial_statusstringRequired

One of pending · paid · partially_refunded · refunded · cancelled.

buyer_emailstring or nullOptional

Required when werefund_fee is present. Never logged in clear. An address WeRefund may not keep is recorded exactly like an order without one: 201, no option, no status and no code that tells why.

linesarray of OrderLineInputRequired
external_line_idstring or nullOptional
skustring or nullOptional
titlestringRequired
quantityintegerRequired
unit_price_minorintegerRequired

Unit price. In minor units of currency.

tax_minorinteger or nullOptional

Tax of the whole line, when you know it. In minor units of currency.

image_urlstring or nullOptional

As your platform gives it; never invented.

shipping_minorintegerOptional

Shipping. In minor units of currency.

tax_minorintegerOptional

Tax of the whole order. In minor units of currency.

total_minorintegerRequired

As paid, WeRefund fee line included. In minor units of currency.

werefund_feeobject or nullOptional
amount_minorintegerRequired

The WeRefund option line of this order. In minor units of currency.

Response fields · 200

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

storestringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

order_numberstring or nullRequired
currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

subtotal_minorintegerRequired

Product lines, WeRefund fee line, shipping and tax excluded. In minor units of currency.

shipping_minorintegerRequired

Shipping. In minor units of currency.

tax_minorintegerRequired

Tax. In minor units of currency.

total_minorintegerRequired

As paid. In minor units of currency.

placed_atstring (RFC 3339)Required
fulfilled_atstring (RFC 3339) or nullRequired
delivered_atstring (RFC 3339) or nullRequired
delivery_date_sourcestringRequired

One of platform_fulfillment · merchant_declared · unknown.

financial_statusstringRequired

One of pending · paid · partially_refunded · refunded · cancelled.

cancelled_atstring (RFC 3339) or nullRequired
werefund_optionbooleanRequired
policy_version_idstring or nullRequired

Public identifier of a policy version, pv_<n>_<version>.

certificate_idstring or nullRequired

Public identifier of a certificate, WR-<n>.

return_window_daysinteger or nullRequired
return_window_expires_atstring (RFC 3339) or nullRequired
attachment_qualitystring or nullRequired

The attachment quality of the order's Policy Record (bis); no_applicable_version when no policy version applied, so no record exists; null while the order is not paid.

One of bracketed · read_before_purchase · read_after_purchase_unverified · read_after_purchase_changed · no_applicable_version.

sourcestringRequired
is_demobooleanRequired
linesarray of OrderLineRequired
line_idstringRequired

Public identifier of the line. Its public form is not written yet (° 122): never the internal id.

external_line_idstring or nullRequired
skustring or nullRequired
titlestringRequired
quantityintegerRequired
unit_price_minorintegerRequired

Unit price. In minor units of currency.

tax_minorinteger or nullRequired

Tax of the whole line. In minor units of currency.

is_werefund_fee_linebooleanRequired
returnableboolean or nullRequired

Set once, at recording; never rewritten.

eligible_untilstring (RFC 3339) or nullRequired
image_urlstring or nullRequired

As the platform gave it; null when there is none.

Responses

  • 200 — The reference was already recorded in this store: the mutable fields are updated, the ones set once are untouched.
  • 201 — OK
  • 400 — Codes: idempotency_key_required, store_required, buyer_email_required, body_unparsable.
  • 401 — Codes: authentication_required.
  • 404 — Codes: store_not_found.
  • 409 — Codes: idempotency_conflict.
  • 422 — Codes: validation_failed.
  • 429 — Codes: rate_limited.
Request
curl --request POST \
  --url https://api.werefund.com/v1/orders \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"
Body
{
  "external_order_id": "V-10482",
  "order_number": "#V-10482",
  "currency": "USD",
  "placed_at": "2026-03-02T15:31:07Z",
  "financial_status": "paid",
  "buyer_email": "shopper@example.com",
  "lines": [
    {
      "external_line_id": "1",
      "sku": "VS-LIN-OS-M",
      "title": "Linen overshirt, M",
      "quantity": 1,
      "unit_price_minor": 9800,
      "tax_minor": null,
      "image_url": "https://verso.example/wp-content/uploads/linen-overshirt.webp"
    },
    {
      "external_line_id": "2",
      "sku": "VS-CNV-TT",
      "title": "Canvas tote",
      "quantity": 1,
      "unit_price_minor": 5000,
      "tax_minor": null,
      "image_url": null
    }
  ],
  "shipping_minor": 0,
  "tax_minor": 0,
  "total_minor": 14999,
  "werefund_fee": {
    "amount_minor": 199
  }
}

Orders

Retrieve an order

Planned
GEThttps://api.werefund.com/v1/orders/{order_id}

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

order_idstring · pathRequired

Your own order reference, exactly as supplied when the order was registered. Case sensitive.

Response fields · 200

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

storestringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

order_numberstring or nullRequired
currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

subtotal_minorintegerRequired

Product lines, WeRefund fee line, shipping and tax excluded. In minor units of currency.

shipping_minorintegerRequired

Shipping. In minor units of currency.

tax_minorintegerRequired

Tax. In minor units of currency.

total_minorintegerRequired

As paid. In minor units of currency.

placed_atstring (RFC 3339)Required
fulfilled_atstring (RFC 3339) or nullRequired
delivered_atstring (RFC 3339) or nullRequired
delivery_date_sourcestringRequired

One of platform_fulfillment · merchant_declared · unknown.

financial_statusstringRequired

One of pending · paid · partially_refunded · refunded · cancelled.

cancelled_atstring (RFC 3339) or nullRequired
werefund_optionbooleanRequired
policy_version_idstring or nullRequired

Public identifier of a policy version, pv_<n>_<version>.

certificate_idstring or nullRequired

Public identifier of a certificate, WR-<n>.

return_window_daysinteger or nullRequired
return_window_expires_atstring (RFC 3339) or nullRequired
attachment_qualitystring or nullRequired

The attachment quality of the order's Policy Record (bis); no_applicable_version when no policy version applied, so no record exists; null while the order is not paid.

One of bracketed · read_before_purchase · read_after_purchase_unverified · read_after_purchase_changed · no_applicable_version.

sourcestringRequired
is_demobooleanRequired
linesarray of OrderLineRequired
line_idstringRequired

Public identifier of the line. Its public form is not written yet (° 122): never the internal id.

external_line_idstring or nullRequired
skustring or nullRequired
titlestringRequired
quantityintegerRequired
unit_price_minorintegerRequired

Unit price. In minor units of currency.

tax_minorinteger or nullRequired

Tax of the whole line. In minor units of currency.

is_werefund_fee_linebooleanRequired
returnableboolean or nullRequired

Set once, at recording; never rewritten.

eligible_untilstring (RFC 3339) or nullRequired
image_urlstring or nullRequired

As the platform gave it; null when there is none.

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 404 — Codes: order_not_found.
  • 409 — Codes: order_reference_ambiguous.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/orders/{order_id} \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Orders

Mark delivered

Planned
PATCHhttps://api.werefund.com/v1/orders/{order_id}

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

order_idstring · pathRequired

Your own order reference, exactly as supplied when the order was registered. Case sensitive.

Request body

delivered_atstring (RFC 3339)Required

Mark delivered. Source merchant_declared; the first source wins.

Response fields · 200

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

storestringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

order_numberstring or nullRequired
currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

subtotal_minorintegerRequired

Product lines, WeRefund fee line, shipping and tax excluded. In minor units of currency.

shipping_minorintegerRequired

Shipping. In minor units of currency.

tax_minorintegerRequired

Tax. In minor units of currency.

total_minorintegerRequired

As paid. In minor units of currency.

placed_atstring (RFC 3339)Required
fulfilled_atstring (RFC 3339) or nullRequired
delivered_atstring (RFC 3339) or nullRequired
delivery_date_sourcestringRequired

One of platform_fulfillment · merchant_declared · unknown.

financial_statusstringRequired

One of pending · paid · partially_refunded · refunded · cancelled.

cancelled_atstring (RFC 3339) or nullRequired
werefund_optionbooleanRequired
policy_version_idstring or nullRequired

Public identifier of a policy version, pv_<n>_<version>.

certificate_idstring or nullRequired

Public identifier of a certificate, WR-<n>.

return_window_daysinteger or nullRequired
return_window_expires_atstring (RFC 3339) or nullRequired
attachment_qualitystring or nullRequired

The attachment quality of the order's Policy Record (bis); no_applicable_version when no policy version applied, so no record exists; null while the order is not paid.

One of bracketed · read_before_purchase · read_after_purchase_unverified · read_after_purchase_changed · no_applicable_version.

sourcestringRequired
is_demobooleanRequired
linesarray of OrderLineRequired
line_idstringRequired

Public identifier of the line. Its public form is not written yet (° 122): never the internal id.

external_line_idstring or nullRequired
skustring or nullRequired
titlestringRequired
quantityintegerRequired
unit_price_minorintegerRequired

Unit price. In minor units of currency.

tax_minorinteger or nullRequired

Tax of the whole line. In minor units of currency.

is_werefund_fee_linebooleanRequired
returnableboolean or nullRequired

Set once, at recording; never rewritten.

eligible_untilstring (RFC 3339) or nullRequired
image_urlstring or nullRequired

As the platform gave it; null when there is none.

Responses

  • 200 — OK
  • 400 — Codes: body_unparsable.
  • 401 — Codes: authentication_required.
  • 404 — Codes: order_not_found.
  • 409 — Codes: order_reference_ambiguous, delivery_already_recorded.
  • 422 — Codes: validation_failed.
  • 429 — Codes: rate_limited.
Request
curl --request PATCH \
  --url https://api.werefund.com/v1/orders/{order_id} \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Orders

Retrieve return window

Planned

Return the remaining return window for an order, per line, as computed at delivery. The window is computed once, at delivery, and stored. This endpoint reads that stored value — it never recomputes it.

GEThttps://api.werefund.com/v1/orders/{order_id}/window

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

order_idstring · pathRequired

Your own order reference, exactly as supplied when the order was registered. Case sensitive.

include_linesboolean · queryOptional

Return the per-line breakdown as well as the order-level window. Defaults to true. Set it to false on high-volume polling to reduce the payload.

Response fields · 200

order_idstringOptional
statestringOptional

open, or closed once the window has closed (-1 is never returned).

days_leftintegerRequired

Whole days remaining before the window closes. 0 on the final day; -1 is never returned — a closed window reports state: "closed".

eligible_untilstring (RFC 3339)Required

The return deadline, in UTC. This value never changes once written.

delivered_atstring (RFC 3339)Optional
policy_version_idstringRequired

The version of the merchant's return policy in force when the order was placed.

certificate_idstringOptional
linesarray of ReturnWindowLineOptional
skustringOptional
returnablebooleanOptional
days_leftintegerOptional

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 404 — Codes: order_not_found.
  • 409 — Codes: order_reference_ambiguous.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/orders/A-40917/window \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"
{
  "order_id": "A-40917",
  "state": "open",
  "days_left": 21,
  "eligible_until": "2026-04-06T23:59:59Z",
  "delivered_at": "2026-03-07T09:14:02Z",
  "policy_version_id": "pv_8842_4",
  "certificate_id": "WR-8842",
  "lines": [
    {
      "sku": "LMP-CER-01",
      "returnable": true,
      "days_left": 21
    }
  ]
}

Orders

Quote the option fee

Planned
GEThttps://api.werefund.com/v1/fee-quote

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

basis_amount_minorinteger · queryRequired

Product subtotal, in minor units.

currencystring · queryRequired

Response fields · 200

basis_amount_minorintegerRequired

Product subtotal. In minor units of currency.

currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

tier_codestringRequired
fee_amount_minorintegerRequired

The WeRefund option fee for that basis. In minor units of currency.

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 409 — Codes: fee_schedule_missing.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/fee-quote \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Policy Records

Retrieve the Policy Record

Planned
GEThttps://api.werefund.com/v1/orders/{order_id}/policy-record

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

order_idstring · pathRequired

Your own order reference, exactly as supplied when the order was registered. Case sensitive.

Response fields · 200

verify_tokenstringRequired

Public identifier of a Policy Record, its verify_token (22 base62 characters).

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

certificate_idstringRequired

Public identifier of a certificate, WR-<n>.

policy_version_idstringRequired

Public identifier of a policy version, pv_<n>_<version>.

storestringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

policy_urlstringRequired
purchased_atstring (RFC 3339)Required
captured_atstring (RFC 3339)Required
return_window_daysintegerRequired
window_starts_fromstringRequired

One of delivery.

return_deadlinestring (RFC 3339) or nullRequired

Joined from the order at delivery; not signed.

transaction_idstring or nullRequired

Joined from the PSP attribution; not signed.

sha256stringRequired
canonical_bodyCanonicalBodyRequired

Exactly what is signed. The deadline and the attachment quality are outside it.

certificate_public_idstringRequired

Public identifier of a certificate, WR-<n>.

store_public_slugstringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

policy_urlstringRequired
policy_version_public_idstringRequired

Public identifier of a policy version, pv_<n>_<version>.

policy_version_sha256stringRequired
external_order_idstringRequired
purchased_atstring (RFC 3339)Required
captured_atstring (RFC 3339)Required
return_window_daysintegerRequired
window_starts_fromstringRequired

One of delivery.

signaturestringRequired

Ed25519, base64, over canonical_body.

kidstringRequired

The signing key.

attachment_qualitystringRequired

One of bracketed · read_before_purchase · read_after_purchase_unverified · read_after_purchase_changed.

attachment_offset_secondsintegerRequired

Capture time minus purchase time, signed.

pdf_urlstringRequired

The PDF route of the surface that serves the record: GET /v1/policy-records/{verify_token}/pdf with an API key, GET /v1/shopper/orders/{purchase_id}/policy-record/pdf in the shopper session. Never a public route.

html_urlstring or nullRequired

Short-lived link to the captured HTML.

screenshot_urlstring or nullRequired

Short-lived link to the capture.

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 404 — Codes: order_not_found.
  • 409 — Codes: order_reference_ambiguous.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/orders/{order_id}/policy-record \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"
{
  "verify_token": "fqqEKTNe4PMieB1EpMkeX1",
  "order_id": "V-10482",
  "certificate_id": "WR-8842",
  "policy_version_id": "pv_8842_4",
  "store": "verso",
  "policy_url": "https://verso.example/returns",
  "purchased_at": "2026-03-02T15:31:07Z",
  "captured_at": "2026-03-02T15:33:40Z",
  "return_window_days": 30,
  "window_starts_from": "delivery",
  "return_deadline": "2026-04-04T23:59:59Z",
  "transaction_id": "pi_3Qa1b2C3d4E5f6G7h8I9j0K1",
  "sha256": "8945e06946f858f9f2f0ce9893a32cf7946f89450f1e12e94a74eea6ddef30bf",
  "canonical_body": {
    "certificate_public_id": "WR-8842",
    "store_public_slug": "verso",
    "policy_url": "https://verso.example/returns",
    "policy_version_public_id": "pv_8842_4",
    "policy_version_sha256": "8945e06946f858f9f2f0ce9893a32cf7946f89450f1e12e94a74eea6ddef30bf",
    "external_order_id": "V-10482",
    "purchased_at": "2026-03-02T15:31:07Z",
    "captured_at": "2026-03-02T15:33:40Z",
    "return_window_days": 30,
    "window_starts_from": "delivery"
  },
  "signature": "bJQXIxsajtSO3Gq2GdkDvrTSEGo5jdvWolzOr7OYjnlTJVCgqkV8znmxyPNbXIU2fMR7fJlEulNxOb7sP2IkDg==",
  "kid": "wr-2026-01",
  "attachment_quality": "read_after_purchase_unverified",
  "attachment_offset_seconds": 153,
  "pdf_url": "https://api.werefund.com/v1/policy-records/fqqEKTNe4PMieB1EpMkeX1/pdf",
  "html_url": null,
  "screenshot_url": null
}

Policy Records

List Policy Records

Planned
GEThttps://api.werefund.com/v1/policy-records

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

attachment_qualitystring · queryOptional

Keep the records of one attachment quality (bis).

One of bracketed · read_before_purchase · read_after_purchase_unverified · read_after_purchase_changed.

cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of PolicyRecordSummaryRequired
verify_tokenstringRequired

Public identifier of a Policy Record, its verify_token (22 base62 characters).

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

storestringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

order_numberstring or nullRequired
certificate_idstringRequired

Public identifier of a certificate, WR-<n>.

policy_version_idstringRequired

Public identifier of a policy version, pv_<n>_<version>.

purchased_atstring (RFC 3339)Required
captured_atstring (RFC 3339)Required
attachment_qualitystringRequired

One of bracketed · read_before_purchase · read_after_purchase_unverified · read_after_purchase_changed.

return_deadlinestring (RFC 3339) or nullRequired
next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/policy-records \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Policy Records

Count Policy Records

Planned

The count by attachment quality, read_after_purchase_changed included (index (store_id, attachment_quality)).

GEThttps://api.werefund.com/v1/policy-records/summary

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Response fields · 200

totalintegerRequired
by_attachment_qualityobjectRequired
bracketedintegerRequired
read_before_purchaseintegerRequired
read_after_purchase_unverifiedintegerRequired
read_after_purchase_changedintegerRequired

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/policy-records/summary \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Policy Records

Policy Record PDF

Planned

The record is designated by its verify_token. The merchant's copy; no public route serves the PDF.

GEThttps://api.werefund.com/v1/policy-records/{verify_token}/pdf

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

verify_tokenstring · pathRequired

The record's verify_token.

Responses

  • 200 — The PDF
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/policy-records/{verify_token}/pdf \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Verification

List certificates

Planned
GEThttps://api.werefund.com/v1/certificates

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Response fields · 200

Responses

  • 200 — The list
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/certificates \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Verification

Retrieve a certificate

Planned
GEThttps://api.werefund.com/v1/certificates/{certificate_id}

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

certificate_idstring · pathRequired

WR-<n>.

Response fields · 200

certificate_idstringRequired

Public identifier of a certificate, WR-<n>.

storestringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

verification_statestringRequired

The only verification state served on any surface. Internal states never leave the server.

One of verified · reviewing_changes · verification_unavailable.

state_sincestring (RFC 3339)Required
reason_codestring or nullRequired

verification_reason_code.

verified_sincestring (RFC 3339) or nullRequired
last_verified_atstring (RFC 3339) or nullRequired
policy_version_idstring or nullRequired

Public identifier of a policy version, pv_<n>_<version>.

standard_versionstringRequired
blocking_itemsarray of BlockingItemRequired
codestringRequired

A checklist item of the standard.

observedstring or nullRequired

The merchant's own text, quoted literally, never paraphrased, summarised or cut. null when the item has no passage to quote, or when a passage found by the injection check cannot be read back from the stored text with the same SHA-256.

startinteger or nullRequired

Start of the passage in the normalised text of the policy, in characters.

endinteger or nullRequired

End of the passage in the normalised text of the policy, in characters, excluded.

hidden_char_countinteger or nullRequired

Invisible characters removed from the page, on the points of no_model_directed_instructions when there is at least one — they have no position to quote, and a page can fail on them alone. null on every other point.

historyarray of objectRequired

The state changes, projected to the three served values. Merchant only.

verification_statestringRequired

The only verification state served on any surface. Internal states never leave the server.

One of verified · reviewing_changes · verification_unavailable.

reason_codestringRequired
occurred_atstring (RFC 3339)Required

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/certificates/{certificate_id} \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Verification

Request verification

Planned
POSThttps://api.werefund.com/v1/certificates/{certificate_id}/verify

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

certificate_idstring · pathRequired

WR-<n>.

Response fields · 202

certificate_idstringRequired

Public identifier of a certificate, WR-<n>.

requested_atstring (RFC 3339)Required

Responses

  • 202 — OK
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request POST \
  --url https://api.werefund.com/v1/certificates/{certificate_id}/verify \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Verification

List policy versions

Planned
GEThttps://api.werefund.com/v1/policy-versions

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of PolicyVersionRequired
policy_version_idstringRequired

Public identifier of a policy version, pv_<n>_<version>.

version_numberintegerRequired
policy_urlstringRequired
fetched_atstring (RFC 3339)Required
sha256stringRequired
text_sha256stringRequired
superseded_bystring or nullRequired

Public identifier of a policy version, pv_<n>_<version>.

next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/policy-versions \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Verification

Retrieve a policy version

Planned
GEThttps://api.werefund.com/v1/policy-versions/{policy_version_id}

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

policy_version_idstring · pathRequired

pv_<n>_<version>.

Response fields · 200

policy_version_idstringRequired

Public identifier of a policy version, pv_<n>_<version>.

version_numberintegerRequired
policy_urlstringRequired
fetched_atstring (RFC 3339)Required
sha256stringRequired
text_sha256stringRequired
superseded_bystring or nullRequired

Public identifier of a policy version, pv_<n>_<version>.

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/policy-versions/{policy_version_id} \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Verification

Read the standard in force

Planned
GEThttps://api.werefund.com/v1/standard/current

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Response fields · 200

versionstringRequired
effective_fromstring (RFC 3339)Required
body_markdownstringRequired
checklist_sha256stringRequired

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/standard/current \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Return requests

List return requests

Planned
GEThttps://api.werefund.com/v1/returns

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

statestring · queryOptional

One of sent · awaiting_store_response · accepted · in_transit · closed.

turnstring · queryOptional

Whose turn it is in the conversation, derived from its last message.

One of merchant · shopper.

cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of ReturnRequestRequired
return_request_idstringRequired

Public identifier of a return request, rr_<10 Crockford base32>.

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

order_numberstring or nullRequired
statestringRequired

One of sent · awaiting_store_response · accepted · in_transit · closed.

reasonstringRequired

Why the item goes back.

One of changed_my_mind · not_as_expected · arrived_damaged.

reason_textstring or nullRequired
already_contacted_merchantbooleanRequired
shopper_display_namestring or nullRequired

The display name the shopper chose, or null: the screen then says "Shopper". Served in return requests and their conversation only; orders and Policy Records carry no name.

currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

requested_amount_minorintegerRequired
requested_amount_includes_taxbooleanRequired
itemsarray of ReturnRequestItemRequired
requested_atstring (RFC 3339)Required
merchant_notified_atstring (RFC 3339) or nullRequired
window_expires_atstring (RFC 3339)Required
return_addressReturnAddress or value or nullRequired
shipmentShipment or value or nullRequired
refundsarray of RefundObservedRequired
outcomestring or nullRequired

How a closed return request ended. no_response is set by the server: 30 days after merchant_notified_at while the request awaits the store; once in transit, 30 days after the reception set by the carrier API (UPS, FedEx, DHL, Royal Mail) or after the tracking was submitted (USPS, Others); never while accepted, and never for a parcel read by API that is not delivered. Its public label is Rico's to write.

One of refund_issued · exchange · refused · no_response.

outcome_messagestring or nullRequired
decided_bystring or nullRequired

One of merchant · system.

decided_atstring (RFC 3339) or nullRequired
closed_atstring (RFC 3339) or nullRequired
ticket_idstringRequired

Public identifier of a ticket (the conversation of a return request), tk_<10 Crockford base32>.

next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/returns \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Return requests

Retrieve a return request

Planned
GEThttps://api.werefund.com/v1/returns/{return_request_id}

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

return_request_idstring · pathRequired

rr_….

Response fields · 200

return_request_idstringRequired

Public identifier of a return request, rr_<10 Crockford base32>.

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

order_numberstring or nullRequired
statestringRequired

One of sent · awaiting_store_response · accepted · in_transit · closed.

reasonstringRequired

Why the item goes back.

One of changed_my_mind · not_as_expected · arrived_damaged.

reason_textstring or nullRequired
already_contacted_merchantbooleanRequired
shopper_display_namestring or nullRequired

The display name the shopper chose, or null: the screen then says "Shopper". Served in return requests and their conversation only; orders and Policy Records carry no name.

currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

requested_amount_minorintegerRequired
requested_amount_includes_taxbooleanRequired
itemsarray of ReturnRequestItemRequired
line_idstringRequired
skustring or nullRequired
titlestringRequired
quantityintegerRequired
unit_price_minorintegerRequired
line_tax_minorinteger or nullRequired
line_amount_minorintegerRequired
image_urlstring or nullRequired
requested_atstring (RFC 3339)Required
merchant_notified_atstring (RFC 3339) or nullRequired
window_expires_atstring (RFC 3339)Required
return_addressReturnAddress or value or nullRequired
shipmentShipment or value or nullRequired
refundsarray of RefundObservedRequired
refund_event_idstringRequired

Its public form is not written yet (° 122): never the internal id.

amount_minorintegerRequired
currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

statusstringRequired

One of pending · issued · failed · reversed.

occurred_atstring (RFC 3339)Required
outcomestring or nullRequired

How a closed return request ended. no_response is set by the server: 30 days after merchant_notified_at while the request awaits the store; once in transit, 30 days after the reception set by the carrier API (UPS, FedEx, DHL, Royal Mail) or after the tracking was submitted (USPS, Others); never while accepted, and never for a parcel read by API that is not delivered. Its public label is Rico's to write.

One of refund_issued · exchange · refused · no_response.

outcome_messagestring or nullRequired
decided_bystring or nullRequired

One of merchant · system.

decided_atstring (RFC 3339) or nullRequired
closed_atstring (RFC 3339) or nullRequired
ticket_idstringRequired

Public identifier of a ticket (the conversation of a return request), tk_<10 Crockford base32>.

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/returns/{return_request_id} \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Return requests

Accept a return and give the return address

Planned
POSThttps://api.werefund.com/v1/returns/{return_request_id}/accept

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

return_request_idstring · pathRequired

rr_….

Request body

return_addressReturnAddress or value or nullOptional

Response fields · 200

return_request_idstringRequired

Public identifier of a return request, rr_<10 Crockford base32>.

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

order_numberstring or nullRequired
statestringRequired

One of sent · awaiting_store_response · accepted · in_transit · closed.

reasonstringRequired

Why the item goes back.

One of changed_my_mind · not_as_expected · arrived_damaged.

reason_textstring or nullRequired
already_contacted_merchantbooleanRequired
shopper_display_namestring or nullRequired

The display name the shopper chose, or null: the screen then says "Shopper". Served in return requests and their conversation only; orders and Policy Records carry no name.

currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

requested_amount_minorintegerRequired
requested_amount_includes_taxbooleanRequired
itemsarray of ReturnRequestItemRequired
line_idstringRequired
skustring or nullRequired
titlestringRequired
quantityintegerRequired
unit_price_minorintegerRequired
line_tax_minorinteger or nullRequired
line_amount_minorintegerRequired
image_urlstring or nullRequired
requested_atstring (RFC 3339)Required
merchant_notified_atstring (RFC 3339) or nullRequired
window_expires_atstring (RFC 3339)Required
return_addressReturnAddress or value or nullRequired
shipmentShipment or value or nullRequired
refundsarray of RefundObservedRequired
refund_event_idstringRequired

Its public form is not written yet (° 122): never the internal id.

amount_minorintegerRequired
currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

statusstringRequired

One of pending · issued · failed · reversed.

occurred_atstring (RFC 3339)Required
outcomestring or nullRequired

How a closed return request ended. no_response is set by the server: 30 days after merchant_notified_at while the request awaits the store; once in transit, 30 days after the reception set by the carrier API (UPS, FedEx, DHL, Royal Mail) or after the tracking was submitted (USPS, Others); never while accepted, and never for a parcel read by API that is not delivered. Its public label is Rico's to write.

One of refund_issued · exchange · refused · no_response.

outcome_messagestring or nullRequired
decided_bystring or nullRequired

One of merchant · system.

decided_atstring (RFC 3339) or nullRequired
closed_atstring (RFC 3339) or nullRequired
ticket_idstringRequired

Public identifier of a ticket (the conversation of a return request), tk_<10 Crockford base32>.

Responses

  • 200 — OK
  • 400 — Codes: body_unparsable.
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 409 — Codes: return_address_required, return_request_state_conflict.
  • 422 — Codes: validation_failed.
  • 429 — Codes: rate_limited.
Request
curl --request POST \
  --url https://api.werefund.com/v1/returns/{return_request_id}/accept \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"
Body
{
  "return_address": null
}
{
  "return_request_id": "rr_9ZB4K7M2QX",
  "order_id": "V-10482",
  "order_number": "#V-10482",
  "state": "accepted",
  "reason": "not_as_expected",
  "reason_text": "The fabric is heavier than on the product page.",
  "already_contacted_merchant": false,
  "currency": "USD",
  "requested_amount_minor": 9800,
  "requested_amount_includes_tax": false,
  "items": [
    {
      "line_id": "li_7K2M9Q4XRD",
      "sku": "VS-LIN-OS-M",
      "title": "Linen overshirt, M",
      "quantity": 1,
      "unit_price_minor": 9800,
      "line_tax_minor": null,
      "line_amount_minor": 9800,
      "image_url": "https://verso.example/wp-content/uploads/linen-overshirt.webp"
    }
  ],
  "requested_at": "2026-03-12T18:20:05Z",
  "merchant_notified_at": "2026-03-12T18:20:05Z",
  "window_expires_at": "2026-04-04T23:59:59Z",
  "return_address": {
    "company_name": "Verso Studio LLC",
    "address_line1": "1200 Harbor Way",
    "address_line2": "Suite 4",
    "city": "Oakland",
    "region": "CA",
    "postal_code": "94607",
    "country_code": "US"
  },
  "shipment": null,
  "refunds": [],
  "outcome": null,
  "outcome_message": null,
  "decided_by": null,
  "decided_at": null,
  "closed_at": null,
  "ticket_id": "tk_3HW8N6RJ2P"
}

Return requests

Declare the parcel received (USPS, Others)

Planned

Only for usps and other: for the four carriers read by API, Delivered sets the reception. Closes nothing.

POSThttps://api.werefund.com/v1/returns/{return_request_id}/mark-received

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

return_request_idstring · pathRequired

rr_….

Request body

received_atstring (RFC 3339) or nullOptional

Defaults to now.

Response fields · 200

return_request_idstringRequired

Public identifier of a return request, rr_<10 Crockford base32>.

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

order_numberstring or nullRequired
statestringRequired

One of sent · awaiting_store_response · accepted · in_transit · closed.

reasonstringRequired

Why the item goes back.

One of changed_my_mind · not_as_expected · arrived_damaged.

reason_textstring or nullRequired
already_contacted_merchantbooleanRequired
shopper_display_namestring or nullRequired

The display name the shopper chose, or null: the screen then says "Shopper". Served in return requests and their conversation only; orders and Policy Records carry no name.

currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

requested_amount_minorintegerRequired
requested_amount_includes_taxbooleanRequired
itemsarray of ReturnRequestItemRequired
line_idstringRequired
skustring or nullRequired
titlestringRequired
quantityintegerRequired
unit_price_minorintegerRequired
line_tax_minorinteger or nullRequired
line_amount_minorintegerRequired
image_urlstring or nullRequired
requested_atstring (RFC 3339)Required
merchant_notified_atstring (RFC 3339) or nullRequired
window_expires_atstring (RFC 3339)Required
return_addressReturnAddress or value or nullRequired
shipmentShipment or value or nullRequired
refundsarray of RefundObservedRequired
refund_event_idstringRequired

Its public form is not written yet (° 122): never the internal id.

amount_minorintegerRequired
currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

statusstringRequired

One of pending · issued · failed · reversed.

occurred_atstring (RFC 3339)Required
outcomestring or nullRequired

How a closed return request ended. no_response is set by the server: 30 days after merchant_notified_at while the request awaits the store; once in transit, 30 days after the reception set by the carrier API (UPS, FedEx, DHL, Royal Mail) or after the tracking was submitted (USPS, Others); never while accepted, and never for a parcel read by API that is not delivered. Its public label is Rico's to write.

One of refund_issued · exchange · refused · no_response.

outcome_messagestring or nullRequired
decided_bystring or nullRequired

One of merchant · system.

decided_atstring (RFC 3339) or nullRequired
closed_atstring (RFC 3339) or nullRequired
ticket_idstringRequired

Public identifier of a ticket (the conversation of a return request), tk_<10 Crockford base32>.

Responses

  • 200 — OK
  • 400 — Codes: body_unparsable.
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 409 — Codes: return_request_state_conflict.
  • 422 — Codes: validation_failed.
  • 429 — Codes: rate_limited.
Request
curl --request POST \
  --url https://api.werefund.com/v1/returns/{return_request_id}/mark-received \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Return requests

Close a return request

Planned
POSThttps://api.werefund.com/v1/returns/{return_request_id}/close

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

return_request_idstring · pathRequired

rr_….

Request body

outcomestringRequired

One of refund_issued · exchange · refused.

messagestring or nullOptional

Optional message to the shopper, kept as outcome_message.

Response fields · 200

return_request_idstringRequired

Public identifier of a return request, rr_<10 Crockford base32>.

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

order_numberstring or nullRequired
statestringRequired

One of sent · awaiting_store_response · accepted · in_transit · closed.

reasonstringRequired

Why the item goes back.

One of changed_my_mind · not_as_expected · arrived_damaged.

reason_textstring or nullRequired
already_contacted_merchantbooleanRequired
shopper_display_namestring or nullRequired

The display name the shopper chose, or null: the screen then says "Shopper". Served in return requests and their conversation only; orders and Policy Records carry no name.

currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

requested_amount_minorintegerRequired
requested_amount_includes_taxbooleanRequired
itemsarray of ReturnRequestItemRequired
line_idstringRequired
skustring or nullRequired
titlestringRequired
quantityintegerRequired
unit_price_minorintegerRequired
line_tax_minorinteger or nullRequired
line_amount_minorintegerRequired
image_urlstring or nullRequired
requested_atstring (RFC 3339)Required
merchant_notified_atstring (RFC 3339) or nullRequired
window_expires_atstring (RFC 3339)Required
return_addressReturnAddress or value or nullRequired
shipmentShipment or value or nullRequired
refundsarray of RefundObservedRequired
refund_event_idstringRequired

Its public form is not written yet (° 122): never the internal id.

amount_minorintegerRequired
currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

statusstringRequired

One of pending · issued · failed · reversed.

occurred_atstring (RFC 3339)Required
outcomestring or nullRequired

How a closed return request ended. no_response is set by the server: 30 days after merchant_notified_at while the request awaits the store; once in transit, 30 days after the reception set by the carrier API (UPS, FedEx, DHL, Royal Mail) or after the tracking was submitted (USPS, Others); never while accepted, and never for a parcel read by API that is not delivered. Its public label is Rico's to write.

One of refund_issued · exchange · refused · no_response.

outcome_messagestring or nullRequired
decided_bystring or nullRequired

One of merchant · system.

decided_atstring (RFC 3339) or nullRequired
closed_atstring (RFC 3339) or nullRequired
ticket_idstringRequired

Public identifier of a ticket (the conversation of a return request), tk_<10 Crockford base32>.

Responses

  • 200 — OK
  • 400 — Codes: body_unparsable.
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 409 — Codes: return_request_state_conflict.
  • 422 — Codes: validation_failed.
  • 429 — Codes: rate_limited.
Request
curl --request POST \
  --url https://api.werefund.com/v1/returns/{return_request_id}/close \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"
Body
{
  "outcome": "exchange",
  "message": "We have sent you the size L instead."
}
{
  "return_request_id": "rr_4MX8Q2ZB7K",
  "order_id": "V-10531",
  "order_number": "#V-10531",
  "state": "closed",
  "reason": "changed_my_mind",
  "reason_text": null,
  "already_contacted_merchant": false,
  "currency": "USD",
  "requested_amount_minor": 9800,
  "requested_amount_includes_tax": false,
  "items": [
    {
      "line_id": "li_6WQ3N8TB5J",
      "sku": "VS-LIN-OS-M",
      "title": "Linen overshirt, M",
      "quantity": 1,
      "unit_price_minor": 9800,
      "line_tax_minor": null,
      "line_amount_minor": 9800,
      "image_url": "https://verso.example/wp-content/uploads/linen-overshirt.webp"
    }
  ],
  "requested_at": "2026-03-20T08:11:42Z",
  "merchant_notified_at": "2026-03-20T08:11:42Z",
  "window_expires_at": "2026-04-16T23:59:59Z",
  "return_address": null,
  "shipment": null,
  "refunds": [],
  "outcome": "exchange",
  "outcome_message": "We have sent you the size L instead.",
  "decided_by": "merchant",
  "decided_at": "2026-03-21T14:03:09Z",
  "closed_at": "2026-03-21T14:03:09Z",
  "ticket_id": "tk_8PQ2V5XMC7"
}

Return requests

List conversations

Planned

Read only. « The merchant replies from their dashboard alone »: no route of this surface writes in a conversation.

GEThttps://api.werefund.com/v1/tickets

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

turnstring · queryOptional

Whose turn it is in the conversation, derived from its last message.

One of merchant · shopper.

cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of TicketRequired
ticket_idstringRequired

Public identifier of a ticket (the conversation of a return request), tk_<10 Crockford base32>.

return_request_idstringRequired

Public identifier of a return request, rr_<10 Crockford base32>.

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

shopper_display_namestring or nullRequired

The display name the shopper chose, or null: the screen then says "Shopper".

return_request_statestringRequired

One of sent · awaiting_store_response · accepted · in_transit · closed.

turnstring or nullRequired

Whose turn it is, derived from the last message; null once the request is closed.

One of merchant · shopper.

read_onlybooleanRequired

true once the return request is closed (° 106, default). A message changes no state.

opened_atstring (RFC 3339)Required
last_message_atstring (RFC 3339)Required
messagesarray of TicketMessage or nullRequired
next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/tickets \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Return requests

Read a conversation

Planned

The conversation of a return request, with its messages and short-lived media links. Read only.

GEThttps://api.werefund.com/v1/tickets/{ticket_id}

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

ticket_idstring · pathRequired

tk_….

Response fields · 200

ticket_idstringRequired

Public identifier of a ticket (the conversation of a return request), tk_<10 Crockford base32>.

return_request_idstringRequired

Public identifier of a return request, rr_<10 Crockford base32>.

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

shopper_display_namestring or nullRequired

The display name the shopper chose, or null: the screen then says "Shopper".

return_request_statestringRequired

One of sent · awaiting_store_response · accepted · in_transit · closed.

turnstring or nullRequired

Whose turn it is, derived from the last message; null once the request is closed.

One of merchant · shopper.

read_onlybooleanRequired

true once the return request is closed (° 106, default). A message changes no state.

opened_atstring (RFC 3339)Required
last_message_atstring (RFC 3339)Required
messagesarray of TicketMessage or nullRequired
author_typestringRequired

system is the server (the mention, a transmission). WeRefund staff can see the media but never writes in the conversation.

One of shopper · merchant · system.

bodystringRequired
attachmentsarray of AttachmentRequired
sent_atstring (RFC 3339)Required
read_atstring (RFC 3339) or nullRequired

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/tickets/{ticket_id} \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Refunds

List refund events

Planned

Read only. There is no refund declaration.

GEThttps://api.werefund.com/v1/refund-events

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

order_idstring · queryOptional

Filter by order reference.

cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of RefundEventRequired
refund_event_idstringRequired

Its public form is not written yet (° 122): never the internal id.

order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

return_request_idstring or nullRequired

Public identifier of a return request, rr_<10 Crockford base32>.

amount_minorintegerRequired
currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

statusstringRequired

One of pending · issued · failed · reversed.

evidence_strengthstringRequired

One of declared · corroborated · psp_terminal.

initiated_bystringRequired

One of merchant · psp_reversal · unknown.

occurred_atstring (RFC 3339)Required
reversed_atstring (RFC 3339) or nullRequired
next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/refund-events \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Reviews and measures

List reviews

Planned
GEThttps://api.werefund.com/v1/reviews

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

repliedboolean · queryOptional

Keep the reviews with (true) or without (false) a reply.

flaggedboolean · queryOptional

Keep the reviews you reported (true) or not (false).

cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of MerchantReviewRequired
review_idstringRequired

Public identifier of a review, its share_slug (12 base62 characters).

ratingintegerRequired
titlestring or nullRequired
bodystringRequired
outcomestringRequired

How a closed return request ended. no_response is set by the server: 30 days after merchant_notified_at while the request awaits the store; once in transit, 30 days after the reception set by the carrier API (UPS, FedEx, DHL, Royal Mail) or after the tracking was submitted (USPS, Others); never while accepted, and never for a parcel read by API that is not delivered. Its public label is Rico's to write.

One of refund_issued · exchange · refused · no_response.

outcome_daysinteger or nullRequired
returned_item_titlestring or nullRequired
reviewer_labelstringRequired

« Alison M. » or « A shopper », set at publication.

reviewer_country_codestring or nullRequired

Declared by the shopper, set at publication.

reviewer_closed_returns_countintegerRequired

« N recorded returns ».

published_atstring (RFC 3339)Required
edited_atstring (RFC 3339) or nullRequired
useful_countintegerRequired
replyReviewReply or value or nullRequired
order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

return_request_idstring or nullRequired

Public identifier of a return request, rr_<10 Crockford base32>.

flaggedbooleanRequired

You reported this review; it stays visible while WeRefund moderation examines it.

next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/reviews \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Reviews and measures

Rating summary

Planned
GEThttps://api.werefund.com/v1/reviews/summary

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

storestring · queryOptional

The store's public slug. Required with a key that covers every store of the tenant (store_required); with a key bound to one store it may be left out, and naming another store answers 404.

Response fields · 200

averagenumber or nullRequired

Simple mean, one decimal. null below RATING_MIN_REVIEWS (° 15).

countintegerRequired
distributionobjectRequired
5integerRequired
4integerRequired
3integerRequired
2integerRequired
1integerRequired

Responses

  • 200 — OK
  • 400 — Codes: store_required.
  • 401 — Codes: authentication_required.
  • 404 — Codes: store_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/reviews/summary \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Reviews and measures

Retrieve a review

Planned
GEThttps://api.werefund.com/v1/reviews/{review_id}

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

review_idstring · pathRequired

The review's share_slug.

Response fields · 200

review_idstringRequired

Public identifier of a review, its share_slug (12 base62 characters).

ratingintegerRequired
titlestring or nullRequired
bodystringRequired
outcomestringRequired

How a closed return request ended. no_response is set by the server: 30 days after merchant_notified_at while the request awaits the store; once in transit, 30 days after the reception set by the carrier API (UPS, FedEx, DHL, Royal Mail) or after the tracking was submitted (USPS, Others); never while accepted, and never for a parcel read by API that is not delivered. Its public label is Rico's to write.

One of refund_issued · exchange · refused · no_response.

outcome_daysinteger or nullRequired
returned_item_titlestring or nullRequired
reviewer_labelstringRequired

« Alison M. » or « A shopper », set at publication.

reviewer_country_codestring or nullRequired

Declared by the shopper, set at publication.

reviewer_closed_returns_countintegerRequired

« N recorded returns ».

published_atstring (RFC 3339)Required
edited_atstring (RFC 3339) or nullRequired
useful_countintegerRequired
replyReviewReply or value or nullRequired
order_idstringRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

return_request_idstring or nullRequired

Public identifier of a return request, rr_<10 Crockford base32>.

flaggedbooleanRequired

You reported this review; it stays visible while WeRefund moderation examines it.

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/reviews/{review_id} \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Reviews and measures

Reply publicly to a review

Planned

A reply changes neither the rating nor the order of the reviews.

POSThttps://api.werefund.com/v1/reviews/{review_id}/reply

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

review_idstring · pathRequired

The review's share_slug.

Request body

bodystringRequired

Response fields · 201

bodystringRequired
published_atstring (RFC 3339)Required
edited_atstring (RFC 3339) or nullRequired

Responses

  • 201 — OK
  • 400 — Codes: body_unparsable.
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 422 — Codes: validation_failed.
  • 429 — Codes: rate_limited.
Request
curl --request POST \
  --url https://api.werefund.com/v1/reviews/{review_id}/reply \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Reviews and measures

Edit the reply

Planned
PATCHhttps://api.werefund.com/v1/reviews/{review_id}/reply

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

review_idstring · pathRequired

The review's share_slug.

Request body

bodystringRequired

Response fields · 200

bodystringRequired
published_atstring (RFC 3339)Required
edited_atstring (RFC 3339) or nullRequired

Responses

  • 200 — OK
  • 400 — Codes: body_unparsable.
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 422 — Codes: validation_failed.
  • 429 — Codes: rate_limited.
Request
curl --request PATCH \
  --url https://api.werefund.com/v1/reviews/{review_id}/reply \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Reviews and measures

Report a review of your store

Planned

The report goes to WeRefund moderation, which decides alone. The review stays visible while it is examined, and a report never removes a review by itself (16 CFR 465).

POSThttps://api.werefund.com/v1/reviews/{review_id}/flag

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

review_idstring · pathRequired

The review's share_slug.

Request body

reason_codestringRequired

One of personal_data · abusive · spam · not_about_return · other.

commentstring or nullOptional

Responses

  • 201 — Reported; the review stays visible
  • 400 — Codes: body_unparsable.
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 409 — Codes: review_already_flagged.
  • 422 — Codes: validation_failed.
  • 429 — Codes: rate_limited.
Request
curl --request POST \
  --url https://api.werefund.com/v1/reviews/{review_id}/flag \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Reviews and measures

Read conduct measures

Planned
GEThttps://api.werefund.com/v1/measures

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

storestring · queryOptional

The store's public slug. Required with a key that covers every store of the tenant (store_required); with a key bound to one store it may be left out, and naming another store answers 404.

Response fields · 200

refund_issued_ratenumber or nullRequired
refund_delay_median_daysnumber or nullRequired
first_response_median_hoursnumber or nullRequired
sample_sizeintegerRequired
window_daysintegerRequired

Responses

  • 200 — OK
  • 400 — Codes: store_required.
  • 401 — Codes: authentication_required.
  • 404 — Codes: store_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/measures \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Fees and statements

Fee journal

Planned
GEThttps://api.werefund.com/v1/fees

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

periodstring · queryOptional

A settlement period, YYYY-MM-1 or YYYY-MM-2 (1st–15th, 16th–end).

currencystring · queryOptional
cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of FeeEntryRequired
fee_entry_idstringRequired

Public identifier of a journal line. Its public form is not written yet (° 122): never the internal id.

entry_typestringRequired

One of fee_collected · fee_reversed_cancellation · partner_share · adjustment.

amount_minorintegerRequired

Signed, in minor units.

currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

order_idstring or nullRequired

The merchant's own order reference, exactly as supplied. Case sensitive.

occurred_atstring (RFC 3339)Required
statement_idstring or nullRequired

Public identifier of a fee statement, FS-<CUR>-<YYYY>-<000123>.

reasonstring or nullRequired
next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/fees \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Fees and statements

List statements

Planned
GEThttps://api.werefund.com/v1/statements

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of StatementRequired
statement_idstringRequired

Public identifier of a fee statement, FS-<CUR>-<YYYY>-<000123>.

currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

period_startstring (RFC 3339)Required
period_endstring (RFC 3339)Required
statestringRequired

One of open · issued · debit_pending · paid · debit_failed · link_sent · overdue · written_off · void.

transactions_countintegerRequired
fees_collected_minorintegerRequired
reversals_minorintegerRequired
adjustments_minorintegerRequired
partner_share_minorintegerRequired
net_due_minorintegerRequired

Negative when reversals win (then void).

issued_atstring (RFC 3339) or nullRequired
due_atstring (RFC 3339) or nullRequired
paid_atstring (RFC 3339) or nullRequired
paid_viastring or nullRequired

How it was paid (settlement_attempt.method).

One of direct_debit · payment_link · bank_transfer.

remindersarray of objectRequired
next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/statements \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Fees and statements

Retrieve a statement

Planned
GEThttps://api.werefund.com/v1/statements/{statement_id}

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

statement_idstring · pathRequired

The statement_number.

Response fields · 200

statement_idstringRequired

Public identifier of a fee statement, FS-<CUR>-<YYYY>-<000123>.

currencystringRequired

ISO 4217 code, upper case. USD, GBP or EUR for anything that carries a WeRefund fee.

period_startstring (RFC 3339)Required
period_endstring (RFC 3339)Required
statestringRequired

One of open · issued · debit_pending · paid · debit_failed · link_sent · overdue · written_off · void.

transactions_countintegerRequired
fees_collected_minorintegerRequired
reversals_minorintegerRequired
adjustments_minorintegerRequired
partner_share_minorintegerRequired
net_due_minorintegerRequired

Negative when reversals win (then void).

issued_atstring (RFC 3339) or nullRequired
due_atstring (RFC 3339) or nullRequired
paid_atstring (RFC 3339) or nullRequired
paid_viastring or nullRequired

How it was paid (settlement_attempt.method).

One of direct_debit · payment_link · bank_transfer.

remindersarray of objectRequired
stepintegerRequired
sent_atstring (RFC 3339)Required

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/statements/{statement_id} \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Fees and statements

Statement PDF

Planned
GEThttps://api.werefund.com/v1/statements/{statement_id}/pdf

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

statement_idstring · pathRequired

The statement_number.

Responses

  • 200 — The PDF
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/statements/{statement_id}/pdf \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Fees and statements

Statement CSV

Planned
GEThttps://api.werefund.com/v1/statements/{statement_id}/csv

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

statement_idstring · pathRequired

The statement_number.

Responses

  • 200 — The CSV
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/statements/{statement_id}/csv \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Connections

List connections

Planned
GEThttps://api.werefund.com/v1/connections

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Response fields · 200

Responses

  • 200 — The list
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/connections \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Connections

Recent connection events

Planned
GEThttps://api.werefund.com/v1/connections/{connection_id}/events

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

connection_idstring · pathRequired
limitinteger · queryOptional

Page size.

Response fields · 200

Responses

  • 200 — The list
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/connections/{connection_id}/events \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Alerts and events

List alerts

Planned
GEThttps://api.werefund.com/v1/alerts

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of AlertRequired
alert_idstringRequired

Its public form is not written yet (° 122): never the internal id.

rule_codestringRequired
levelstringRequired

One of info · warning · critical.

titlestringRequired
bodystringRequired
opened_atstring (RFC 3339)Required
occurrencesintegerRequired
last_occurred_atstring (RFC 3339)Required
acknowledged_atstring (RFC 3339) or nullRequired
resolved_atstring (RFC 3339) or nullRequired
auto_resolvedbooleanRequired
next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/alerts \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Alerts and events

Acknowledge an alert

Planned
POSThttps://api.werefund.com/v1/alerts/{alert_id}/acknowledge

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

alert_idstring · pathRequired

Response fields · 200

alert_idstringRequired

Its public form is not written yet (° 122): never the internal id.

rule_codestringRequired
levelstringRequired

One of info · warning · critical.

titlestringRequired
bodystringRequired
opened_atstring (RFC 3339)Required
occurrencesintegerRequired
last_occurred_atstring (RFC 3339)Required
acknowledged_atstring (RFC 3339) or nullRequired
resolved_atstring (RFC 3339) or nullRequired
auto_resolvedbooleanRequired

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request POST \
  --url https://api.werefund.com/v1/alerts/{alert_id}/acknowledge \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Alerts and events

Event journal

Planned
GEThttps://api.werefund.com/v1/events

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

since_seqinteger · queryOptional
cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of DomainEventRequired
event_idstringRequired
seqintegerRequired
typestringRequired

One of order.recorded · order.delivered · order.cancelled · policy_record.created · refund.issued_observed · refund.reversed_observed · policy.change_detected · policy.version_created · verification.state_changed · return_request.created · return_request.accepted · return_shipment.declared · return_shipment.delivered · return_request.closed · review.published · review.replied · rating.updated · measures.updated · fee.collected · fee.reversed · fee_statement.issued · fee_statement.paid · fee_statement.payment_link_issued · fee_statement.overdue · ticket.opened · ticket.message_created · alert.opened · alert.resolved · standard.version_published · dsr.received.

occurred_atstring (RFC 3339)Required
dataobjectRequired
next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/events \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Alerts and events

Replay events to an endpoint

Planned
POSThttps://api.werefund.com/v1/events/replay

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Request body

endpoint_idstringRequired
since_seqinteger or nullOptional
event_idsarray of string or nullOptional

Response fields · 202

accepted_atstring (RFC 3339)Required

Responses

  • 202 — OK
  • 400 — Codes: body_unparsable.
  • 401 — Codes: authentication_required.
  • 422 — Codes: validation_failed.
  • 429 — Codes: rate_limited.
Request
curl --request POST \
  --url https://api.werefund.com/v1/events/replay \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Webhook endpoints

List endpoints

Planned
GEThttps://api.werefund.com/v1/webhook-endpoints

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Response fields · 200

Responses

  • 200 — The list
  • 401 — Codes: authentication_required.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/webhook-endpoints \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Webhook endpoints

Remove endpoint

Planned
DELETEhttps://api.werefund.com/v1/webhook-endpoints/{endpoint_id}

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

endpoint_idstring · pathRequired

Response fields · 200

endpoint_idstringRequired

Its public form is not written yet (° 122): never the internal id.

urlstringRequired
subscribed_eventsarray of stringRequired

One of order.recorded · order.delivered · order.cancelled · policy_record.created · refund.issued_observed · refund.reversed_observed · policy.change_detected · policy.version_created · verification.state_changed · return_request.created · return_request.accepted · return_shipment.declared · return_shipment.delivered · return_request.closed · review.published · review.replied · rating.updated · measures.updated · fee.collected · fee.reversed · fee_statement.issued · fee_statement.paid · fee_statement.payment_link_issued · fee_statement.overdue · ticket.opened · ticket.message_created · alert.opened · alert.resolved · standard.version_published · dsr.received.

api_versionstringRequired
descriptionstring or nullRequired
statestringRequired

One of active · degraded · suspended.

consecutive_failuresintegerRequired
last_success_atstring (RFC 3339) or nullRequired
created_atstring (RFC 3339)Required
revoked_atstring (RFC 3339) or nullRequired

Responses

  • 200 — OK
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request DELETE \
  --url https://api.werefund.com/v1/webhook-endpoints/{endpoint_id} \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Webhook endpoints

List deliveries

Planned
GEThttps://api.werefund.com/v1/webhook-endpoints/{endpoint_id}/deliveries

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

endpoint_idstring · pathRequired
cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of WebhookDeliveryRequired
event_idstringRequired
event_typestringRequired
statestringRequired

One of pending · delivering · delivered · failed · dead.

attemptsintegerRequired
next_attempt_atstring (RFC 3339) or nullRequired
delivered_atstring (RFC 3339) or nullRequired
last_status_codeinteger or nullRequired
next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 401 — Codes: authentication_required.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/webhook-endpoints/{endpoint_id}/deliveries \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Banners and badge

Banner formats and snippet

Planned
GEThttps://api.werefund.com/v1/banners

Authorization

AuthorizationstringRequired

A secret API key passed with the Bearer scheme: Authorization: Bearer wr_live_… (wr_test_… for test orders).

Parameters

storestring · queryOptional

The store's public slug. Required with a key that covers every store of the tenant (store_required); with a key bound to one store it may be left out, and naming another store answers 404.

Response fields · 200

storestringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

formatsarray of stringRequired

One of lockup · inline · card · strip · badge · product · tile · metrics.

default_formatstringRequired

The eight banner formats. numbers is accepted by badge.js as a deprecated alias of metrics.

One of lockup · inline · card · strip · badge · product · tile · metrics.

default_themestringRequired

One of light · dark.

default_sizestringRequired

One of s · m · l.

enabledbooleanRequired
snippetstringRequired

The <script> tag to paste, with data-store.

Responses

  • 200 — OK
  • 400 — Codes: store_required.
  • 401 — Codes: authentication_required.
  • 404 — Codes: store_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/banners \
  --header "Authorization: Bearer wr_live_…" \
  --header "Accept: application/json"

Banners and badge

Badge JSON by state

Cache-Control: no-cache with a weak ETag built on badge_cache_version, W/"<public_slug>-<badge_cache_version>": every display revalidates, and a request whose If-None-Match names the current ETag (weak comparison, a list or * included) answers 304 without a body. Never verified after the certificate left it, whatever an intermediate cache holds: the version moves with every change of state. No stale-if-error, no max-age. Every response of /v1/public carries Access-Control-Allow-Origin: *, the 304 and the 404 included, without credentials: badge.js reads this body from the merchant's site. No cookie is read and no session is opened. A network error or any status other than 200: badge.js renders nothing (fail-closed).

GEThttps://api.werefund.com/v1/public/badge/{public_slug}.json

Authorization

None — this route is public.

Parameters

public_slugstring · pathRequired

The store handle (data-store).

vinteger · queryOptional

Accepted and ignored: freshness comes from the ETag alone, and every display revalidates.

Response fields · 200

Responses

  • 200 — OK
  • 304 — Not modified: the ETag sent in If-None-Match still matches. No body; the same ETag, Cache-Control: no-cache and Access-Control-Allow-Origin: * as the 200.
  • 404 — Codes: badge_not_found -- an unknown store handle, a banner kit the merchant has switched off, or a closed store. The three answer the same body, with Cache-Control: no-cache: a cached 404 would hide a kit switched back on.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/public/badge/{public_slug}.json \
  --header "Accept: application/json"
{
  "state": "verified",
  "rating": {
    "average": 4.7,
    "count": 1284
  },
  "measures": {
    "refund_issued_rate": 0.98,
    "refund_delay_median_days": 3.2,
    "first_response_median_hours": null
  },
  "cache_version": 57
}

Banners and badge

Badge or banner as SVG

The <img> variant, without script, and the image badge.js places. By state: in verified, badge and product carry the logo, « WeRefund Verified » and the ✓, never a figure; outside verified, they carry the state label (« Reviewing changes », « Verification unavailable ») without ✓. The six score formats answer an empty SVG outside verified, showing nothing rather than an outdated figure, and in verified too while the store has no rating and no measure to show: they never show an invented figure. The drawing carries no script, no style sheet, no link and no external resource. ?theme= and ?size= fall back to their default when absent or unknown. numbers is served as metrics (a deprecated alias, logged). Same cache rule as the JSON: no-cache and a weak ETag, because an <img> keeps its URL; the ETag also tells the format, the theme, the size and the drawing apart. Every response carries Access-Control-Allow-Origin: *, the 304 and the 404 included, without credentials: badge.js loads the image in anonymous CORS mode. No cookie is read and no session is opened.

GEThttps://api.werefund.com/v1/public/badge/{public_slug}/{format}.svg

Authorization

None — this route is public.

Parameters

public_slugstring · pathRequired

The store handle (data-store).

formatstring · pathRequired

The eight banner formats. numbers is accepted by badge.js and by the SVG route as a deprecated alias of metrics, and logged.

One of lockup · inline · card · strip · badge · product · tile · metrics.

themestring · queryOptional

An absent or unknown value falls back to light.

One of light · dark.

sizestring · queryOptional

An absent or unknown value falls back to m.

One of s · m · l.

vinteger · queryOptional

Accepted and ignored: freshness comes from the ETag alone, and every display revalidates.

Responses

  • 200 — The SVG
  • 304 — Not modified: the ETag sent in If-None-Match still matches. No body; the same ETag, Cache-Control: no-cache and Access-Control-Allow-Origin: * as the 200.
  • 404 — Codes: badge_not_found -- an unknown format (neither one of the eight nor numbers), an unknown store handle, a banner kit switched off, a closed store. The same body as the JSON's 404, with Cache-Control: no-cache.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/public/badge/{public_slug}/{format}.svg \
  --header "Accept: application/json"

Banners and badge

Badge impression beacon (off)

Planned

Answers 404 while BADGE_TELEMETRY_ENABLED is false, which is the launch state. Sent as text/plain, so no preflight.

POSThttps://api.werefund.com/v1/public/badge-impressions

Authorization

None — this route is public.

Responses

  • 204 — Recorded
  • 429 — Codes: rate_limited.
Request
curl --request POST \
  --url https://api.werefund.com/v1/public/badge-impressions \
  --header "Accept: application/json"

Banners and badge

The badge script

Planned

Static, on js.werefund.com. Reads no cookie and no storage; calls api.werefund.com/v1/public/badge/… only. Outside verified it shows the state label without ✓, and shows nothing rather than an outdated figure.

GEThttps://js.werefund.com/badge.js

Authorization

None — this route is public.

Responses

  • 200 — The script
Request
curl --request GET \
  --url https://js.werefund.com/badge.js \
  --header "Accept: application/json"

Public

Service status

GEThttps://api.werefund.com/v1/public/status

Authorization

None — this route is public.

Response fields · 200

servicestringRequired
api_versionstringRequired

Responses

  • 200 — OK
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/public/status \
  --header "Accept: application/json"

Public

Search stores by name

Planned

A plain list of stores whose name matches — no filter, no sort.

GEThttps://api.werefund.com/v1/public/stores

Authorization

None — this route is public.

Parameters

qstring · queryRequired

Store name.

cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of PublicStoreSummaryRequired
storestringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

namestringRequired
verification_statestringRequired

The only verification state served on any surface. Internal states never leave the server.

One of verified · reviewing_changes · verification_unavailable.

ratingRatingSummary or value or nullRequired
next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/public/stores \
  --header "Accept: application/json"

Public

Store public profile

Planned
GEThttps://api.werefund.com/v1/public/stores/{public_slug}

Authorization

None — this route is public.

Parameters

public_slugstring · pathRequired

The store handle (data-store).

Response fields · 200

storestringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

namestringRequired
shop_domainstring or nullRequired

Host, lower case, no scheme; null until the store platform is connected.

descriptionstring or nullRequired
support_emailstring or nullRequired

The address the store gives shoppers.

verification_statestringRequired

The only verification state served on any surface. Internal states never leave the server.

One of verified · reviewing_changes · verification_unavailable.

verified_sincestring (RFC 3339) or nullRequired
return_formula_daysinteger or nullRequired
ratingRatingSummary or value or nullRequired
measuresMeasures or value or nullRequired

Responses

  • 200 — OK
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/public/stores/{public_slug} \
  --header "Accept: application/json"

Public

Store reviews

Planned
GEThttps://api.werefund.com/v1/public/stores/{public_slug}/reviews

Authorization

None — this route is public.

Parameters

public_slugstring · pathRequired

The store handle (data-store).

ratingarray of integer · queryOptional

Repeat it to keep several ratings, as the 5 → 1 checkboxes of the profile do: ?rating=5&rating=4.

cursorstring · queryOptional

Opaque cursor from next_cursor. Keyset pagination; there is no offset.

limitinteger · queryOptional

Page size.

Response fields · 200

dataarray of ReviewRequired
review_idstringRequired

Public identifier of a review, its share_slug (12 base62 characters).

ratingintegerRequired
titlestring or nullRequired
bodystringRequired
outcomestringRequired

How a closed return request ended. no_response is set by the server: 30 days after merchant_notified_at while the request awaits the store; once in transit, 30 days after the reception set by the carrier API (UPS, FedEx, DHL, Royal Mail) or after the tracking was submitted (USPS, Others); never while accepted, and never for a parcel read by API that is not delivered. Its public label is Rico's to write.

One of refund_issued · exchange · refused · no_response.

outcome_daysinteger or nullRequired
returned_item_titlestring or nullRequired
reviewer_labelstringRequired

« Alison M. » or « A shopper », set at publication.

reviewer_country_codestring or nullRequired

Declared by the shopper, set at publication.

reviewer_closed_returns_countintegerRequired

« N recorded returns ».

published_atstring (RFC 3339)Required
edited_atstring (RFC 3339) or nullRequired
useful_countintegerRequired
replyReviewReply or value or nullRequired
next_cursorstring or nullRequired

Responses

  • 200 — One page
  • 400 — Codes: cursor_invalid.
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/public/stores/{public_slug}/reviews \
  --header "Accept: application/json"

Public

A shared review

Planned
GEThttps://api.werefund.com/v1/public/reviews/{share_slug}

Authorization

None — this route is public.

Parameters

share_slugstring · pathRequired

Response fields · 200

review_idstringRequired

Public identifier of a review, its share_slug (12 base62 characters).

ratingintegerRequired
titlestring or nullRequired
bodystringRequired
outcomestringRequired

How a closed return request ended. no_response is set by the server: 30 days after merchant_notified_at while the request awaits the store; once in transit, 30 days after the reception set by the carrier API (UPS, FedEx, DHL, Royal Mail) or after the tracking was submitted (USPS, Others); never while accepted, and never for a parcel read by API that is not delivered. Its public label is Rico's to write.

One of refund_issued · exchange · refused · no_response.

outcome_daysinteger or nullRequired
returned_item_titlestring or nullRequired
reviewer_labelstringRequired

« Alison M. » or « A shopper », set at publication.

reviewer_country_codestring or nullRequired

Declared by the shopper, set at publication.

reviewer_closed_returns_countintegerRequired

« N recorded returns ».

published_atstring (RFC 3339)Required
edited_atstring (RFC 3339) or nullRequired
useful_countintegerRequired
replyReviewReply or value or nullRequired

Responses

  • 200 — OK
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/public/reviews/{share_slug} \
  --header "Accept: application/json"

Public

Verify a Policy Record

Planned

The link the shopper can share (a bank, a dispute) proves the record without showing the text: the store, the dates, the SHA-256, the version number and the signature. Never the captured policy nor its PDF.

GEThttps://api.werefund.com/v1/public/verify/{verify_token}

Authorization

None — this route is public.

Parameters

verify_tokenstring · pathRequired

The record's verify_token.

Response fields · 200

storestringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

store_namestringRequired
canonical_bodyCanonicalBodyRequired

Exactly what is signed. The deadline and the attachment quality are outside it.

certificate_public_idstringRequired

Public identifier of a certificate, WR-<n>.

store_public_slugstringRequired

The store handle: store.public_slug, the value of data-store in the banner snippet.

policy_urlstringRequired
policy_version_public_idstringRequired

Public identifier of a policy version, pv_<n>_<version>.

policy_version_sha256stringRequired
external_order_idstringRequired
purchased_atstring (RFC 3339)Required
captured_atstring (RFC 3339)Required
return_window_daysintegerRequired
window_starts_fromstringRequired

One of delivery.

signaturestringRequired
kidstringRequired
public_keystringRequired
sha256stringRequired
attachment_qualitystringRequired
attachment_offset_secondsintegerRequired
mentionstringRequired

States that this is what was published at the URL, not what the shopper saw.

Responses

  • 200 — OK
  • 404 — Not found here. Another merchant's object answers 404, never 403. A path that no route serves answers 404 route_not_found.
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/public/verify/{verify_token} \
  --header "Accept: application/json"

Public

The standard in force

Planned
GEThttps://api.werefund.com/v1/public/standard/current

Authorization

None — this route is public.

Response fields · 200

versionstringRequired
effective_fromstring (RFC 3339)Required
body_markdownstringRequired
checklist_sha256stringRequired

Responses

  • 200 — OK
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/public/standard/current \
  --header "Accept: application/json"

Public

The option fee grids

Planned
GEThttps://api.werefund.com/v1/public/fee-schedule

Authorization

None — this route is public.

Response fields · 200

Responses

  • 200 — The list
  • 429 — Codes: rate_limited.
Request
curl --request GET \
  --url https://api.werefund.com/v1/public/fee-schedule \
  --header "Accept: application/json"

Webhooks

Outbound webhooks

Planned

WeRefund sends each event to your endpoint as a signed POST, at least once, and retries with backoff. Verify the signature before you trust the body, and use the event id to ignore a repeat.

Headers

WeRefund-Signaturestring · headerRequired

t=<unix>,v1=<hex HMAC-SHA256 (endpoint secret, t + "." + raw body)>.

WeRefund-Event-Idstring · headerRequired

Stable across retries: deduplicate on it.

WeRefund-Versionstring · headerRequired

The API version the payload is written in.

Events · 30

order.recorded

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
order.delivered

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
order.cancelled

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
policy_record.created

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
refund.issued_observed

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
refund.reversed_observed

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
policy.change_detected

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
policy.version_created

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
verification.state_changed

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
return_request.created

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
return_request.accepted

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
return_shipment.declared

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
return_shipment.delivered

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
return_request.closed

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
review.published

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
review.replied

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
rating.updated

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
measures.updated

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
fee.collected

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
fee.reversed

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
fee_statement.issued

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
fee_statement.paid

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
fee_statement.overdue

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
ticket.opened

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
ticket.message_created

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
alert.opened

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
alert.resolved

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
standard.version_published

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired
dsr.received

The envelope of every outbound webhook. Public identifiers only (° 122).

event_idstringRequired

= WeRefund-Event-Id, stable across retries.

typevalueRequired
api_versionstringRequired
occurred_atstring (RFC 3339)Required
storestring or nullRequired

The store the fact belongs to; null for a fact of the tenant: the four fee_statement.* events, standard.version_published, dsr.received, and an alert opened on no store.

dataobjectRequired

Banners

One script tag renders any of the eight formats and keeps itself current, from the store's public profile.

  • data-store — your store handle, the one on your WeRefund profile.
  • data-format — lockup · inline · card · strip · badge · product · tile · metrics. The former name numbers is still accepted for metrics.
  • data-theme — light or dark. Defaults to light.
  • data-size — s · m · l. Defaults to m.
  • While verification is unavailable, the banner renders nothing rather than a stale figure.
4.7 WeRefund
WeRefund Verified ✓
<script src="https://js.werefund.com/badge.js" data-store="your-store" data-format="lockup" async></script>

See the eight formats