View as Markdown

Authorize · API reference

Store integrations

Your shops on hosted store platforms (Shopify first): connect a shop, and its orders run through your checkout rules; an order a rule names is held until the buyer approves.

Related guide: Hold Shopify orders

The store order object

Attributes

idstringRequired
Unique identifier for the object (sto_).
objectenumRequired
The type of object. One of store_order.
store_connection_idstringRequired
The shop the order came from.
platform_order_idstringRequired
The platform's order ID.
order_namestring | null
The platform's name for the order, for example #1002.
stateenumRequired
not_challenged: no rule challenged it, and the order goes on as the platform handles it. challenged: held while the buyer decides. held: held for you (a Hold for review rule, a decline, an expiry, or no contact). released: the hold was lifted. cancelled: cancelled and refunded. One of checked, challenged, held, released, cancelled, not_challenged.
reasonstring | null
Why the order is in its state, from the reason codes: for example store_no_rule, policy_rule, store_buyer_approved, store_buyer_declined, store_hold_rule.
rule_idstring | null
The checkout rule that asked or held.
checkout_approval_idstring | null
The cart approval sent to the buyer.
approval_statusstring | null
The cart approval's status as last heard: pending, approved, denied, expired or in_review.
heldbooleanRequired
Whether Provenance's fulfillment hold is on the order now.
riskenum
The risk level last written to the platform's order page. One of pending, low, high.
payment_signalsobject | any | null
The payment signals the order carried; null until a platform carries an agent credential we can read (Shopify carries none yet).
Show child attributes
shared_payment_tokenboolean
You named a shared payment token (payment.shared_payment_token), checked or not.
checkedboolean
The token was read on your Stripe account and matched its mode.
unchecked_reasonenum
Why a named token wasn't checked: no active Stripe connection, the key lacks the shared payment token read, Stripe doesn't know the token, a token of the other mode, or Stripe didn't answer in time. One of no_connection, permission_missing, not_found, mode_mismatch, unavailable.
agent_profilestring | null
The agent's Stripe profile (network_business_profile), when the token was checked.
usage_limitobject | null
The token's usage limit, when the token was checked.
Show child attributes
max_amountinteger
The most it can pay, in minor units.
currencystring
Lowercase ISO 4217.
credential_typeenum
The credential type you reported from your own token resolve. One of agentic_token, dpan, fpan.
network_tokenboolean | null
Whether the PaymentIntent's latest charge used a network token (null when not read). A network token alone never makes an agent order.
riskobject
Stripe's risk scores for the token, when it was checked, on the scale Stripe's shared payment token reference gives.
Show child attributes
botnumber
Stripe bot score.
card_testingnumber
Stripe card testing score.
stolen_cardnumber
Stripe stolen card score.
fraudulent_disputenumber
Stripe fraud dispute score.
card_issuer_declinenumber
Stripe bank decline score.
created_attimestampRequired
When the order arrived.
updated_attimestampRequired
When the order's state last changed.
endingobject | any | null
How the order ended, worked out. On GET and the list; null while nothing is known yet.
Show child attributes
outcomeenum
chargeback: a dispute matched to the order. fraud: a fraud report on the order's token or agent. refund_abuse: refunds repeat for the same shopper or agent. refunded: a refund that does not repeat. customer_denied: the shopper declined. store_rejected: your review or your staff refused it. legitimate: reported so, or 14 days passed with no dispute or refund. One of chargeback, fraud, refund_abuse, refunded, customer_denied, store_rejected, legitimate.
sourceenum
Where it came from: reported is an outcome you reported; quiet_period is an order that went ahead on a connection that reports disputes and heard nothing for 14 days. One of reported, chargeback, network_report, approval_denied, staff_cancel, refund, quiet_period.
attimestamp
When it ended this way: the report, the dispute, the refund, the decline, or the end of the 14 days.

The store order object

{
  "object": "store_order",
  "id": "sto_01M7V7QYS7FQ9HETWF1HF5SM2H",
  "store_connection_id": "stc_01M7V7QYRYH5TA9E3H2GV0VT1Y",
  "platform_order_id": "5512345678901",
  "order_name": "#1002",
  "state": "challenged",
  "reason": "policy_rule",
  "rule_id": "rul_01M7V7QYS373XHYJSGGCQ4M2RJ",
  "checkout_approval_id": "coap_01M7V7QYS8H2SM4X31ME688ZWN",
  "approval_status": "pending",
  "held": true,
  "risk": "pending",
  "created_at": "2026-11-19T16:24:42.791Z",
  "updated_at": "2026-11-19T16:24:42.794Z"
}

Add the store default rule

POST/v1/authorize/store_connections/{id}/default_rule

Adds Orders from AI agents (store.agent_order is true → ask the buyer) at the top of your checkout rules, as a new version; the previous version stays in the history. Nothing changes when a rule on store.agent_order is already there. Needs Manage policies.

Parameters

idstringpathRequired
The connection's ID (stc_).

Returns

What happened.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -X POST "$PROVENANCE_API/v1/authorize/store_connections/stc_01M7V7QYRYH5TA9E3H2GV0VT1Y/default_rule" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "store_default_rule",
  "result": "published",
  "rule_id": "rul_01M7V7QYS373XHYJSGGCQ4M2RJ",
  "policy_version": 4
}

Retrieve a store connection

GET/v1/authorize/store_connections/{id}

Returns one shop, with whether your checkout rules have a rule on store.agent_order (default_rule).

Parameters

idstringpathRequired
The connection's ID (stc_).

Returns

The connection.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl "$PROVENANCE_API/v1/authorize/store_connections/stc_01M7V7QYRYH5TA9E3H2GV0VT1Y" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "store_connection",
  "id": "stc_01M7V7QYRYH5TA9E3H2GV0VT1Y",
  "platform": "shopify",
  "shop_domain": "saltmarsh-goods.myshopify.com",
  "shop_name": null,
  "status": "active",
  "scopes": [
    "read_orders",
    "write_orders",
    "write_merchant_managed_fulfillment_orders"
  ],
  "billing_source": "shopify",
  "settings": {
    "auto_cancel_on_decline": false,
    "agent_channels": [
      "8765309"
    ],
    "storefront_check": true,
    "storefront_category": "security",
    "field_timing": false
  },
  "installed_at": "2026-11-19T16:02:11.204Z",
  "uninstalled_at": null,
  "created_at": "2026-11-19T16:01:40.118Z",
  "updated_at": "2026-11-19T16:20:03.552Z",
  "default_rule": "present",
  "storefront": {
    "script_url": "https://api.provenanceauth.com/v1/identify/storefront.js?shop=saltmarsh-goods.myshopify.com",
    "theme_editor_url": "https://saltmarsh-goods.myshopify.com/admin/themes/current/editor?context=apps&activateAppId=4c2d9a7e4b1f3a5c6e8d0b2f4a6c8e1d%2Fstorefront-check",
    "traffic": {
      "window": "7d",
      "humans": 412,
      "signed_agents": 9,
      "unsigned_agents": 31,
      "automated_browsers": 17,
      "unknown": 6
    }
  }
}

Retrieve a store order

GET/v1/authorize/store_orders/{id}

Returns one order from a connected shop: its state, why, and the cart approval sent to the buyer.

Parameters

idstringpathRequired
The store order's ID (sto_).

Returns

The order. See the store order object.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl "$PROVENANCE_API/v1/authorize/store_orders/sto_01M7V7QYS7FQ9HETWF1HF5SM2H" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "store_order",
  "id": "sto_01M7V7QYS7FQ9HETWF1HF5SM2H",
  "store_connection_id": "stc_01M7V7QYRYH5TA9E3H2GV0VT1Y",
  "platform_order_id": "5512345678901",
  "order_name": "#1002",
  "state": "challenged",
  "reason": "policy_rule",
  "rule_id": "rul_01M7V7QYS373XHYJSGGCQ4M2RJ",
  "checkout_approval_id": "coap_01M7V7QYS8H2SM4X31ME688ZWN",
  "approval_status": "pending",
  "held": true,
  "risk": "pending",
  "created_at": "2026-11-19T16:24:42.791Z",
  "updated_at": "2026-11-19T16:24:42.794Z"
}

Update a store connection

PATCH/v1/authorize/store_connections/{id}

Changes a shop's settings: Cancel automatically on decline, your own agent sales channels, and the storefront check (on or off, its consent category, and field timing). Needs Manage policies and a fresh second-factor check from the console, or an authorize key.

Parameters

idstringpathRequired
The connection's ID (stc_).
auto_cancel_on_declineboolean
Cancel and refund an order at once when the buyer declines.
agent_channelsarray of strings
Your agent sales channels (a Shopify app ID, publication ID or source name). Replaces the list.
storefront_checkboolean
Run the storefront check on the shop's pages.
storefront_categoryenum
The consent category the check declares (analytics waits for the visitor's consent). One of security, analytics.
field_timingboolean
Field timing on the cart page (always declared as analytics).
chargeback_responseobject
Chargeback responses on Shopify Payments.
Show child attributes
modeenum
auto (default) or review. One of auto, review.
reasonsenum
fraud (default) or fraud_and_consumer. One of fraud, fraud_and_consumer.

Returns

The connection.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -X PATCH "$PROVENANCE_API/v1/authorize/store_connections/stc_01M7V7QYRYH5TA9E3H2GV0VT1Y" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "agent_channels": ["8765309"], "field_timing": true }'

Response 200

{
  "object": "store_connection",
  "id": "stc_01M7V7QYRYH5TA9E3H2GV0VT1Y",
  "platform": "shopify",
  "shop_domain": "saltmarsh-goods.myshopify.com",
  "shop_name": null,
  "status": "active",
  "scopes": [
    "read_orders",
    "write_orders",
    "write_merchant_managed_fulfillment_orders"
  ],
  "billing_source": "shopify",
  "settings": {
    "auto_cancel_on_decline": false,
    "agent_channels": [
      "8765309"
    ],
    "storefront_check": true,
    "storefront_category": "security",
    "field_timing": true
  },
  "installed_at": "2026-11-19T16:02:11.204Z",
  "uninstalled_at": null,
  "created_at": "2026-11-19T16:01:40.118Z",
  "updated_at": "2026-11-19T16:20:03.552Z"
}

List store connections

GET/v1/authorize/store_connections

Lists the shops connected to your account, oldest first. Free.

Parameters

No parameters.

Returns

The account's shops.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl "$PROVENANCE_API/v1/authorize/store_connections" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "list",
  "data": [
    {
      "object": "store_connection",
      "id": "stc_01M7V7QYRYH5TA9E3H2GV0VT1Y",
      "platform": "shopify",
      "shop_domain": "saltmarsh-goods.myshopify.com",
      "shop_name": null,
      "status": "active",
      "scopes": [
        "read_orders",
        "write_orders",
        "write_merchant_managed_fulfillment_orders"
      ],
      "billing_source": "shopify",
      "settings": {
        "auto_cancel_on_decline": false,
        "agent_channels": [
          "8765309"
        ],
        "storefront_check": true,
        "storefront_category": "security",
        "field_timing": false
      },
      "installed_at": "2026-11-19T16:02:11.204Z",
      "uninstalled_at": null,
      "created_at": "2026-11-19T16:01:40.118Z",
      "updated_at": "2026-11-19T16:20:03.552Z"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "available_platforms": [
    "shopify"
  ]
}

List store orders

GET/v1/authorize/store_orders

Lists the orders your checkout rules checked from your connected shops, newest first. Free.

Parameters

stateenumquery
Only orders in this state: challenged for orders waiting on the buyer, held for orders waiting on you. One of checked, challenged, held, released, cancelled, not_challenged.
store_connection_idstringquery
Only orders from this shop.
qstringquery
Only orders whose ID, name (#1001) or platform order ID contains this text, in any case.
created_gtetimestampquery
Only orders that arrived at or after this time.
created_ltetimestampquery
Only orders that arrived at or before this time.
sortenumquery
The order of the list: created, with - in front for descending. Newest first when omitted. A next_cursor carries its order; pass it back with the same sort. One of created, -created.
limitintegerquery
Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid.
cursorstringquery
Opaque; pass a response's next_cursor back to get the next page.

Returns

A page of orders.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl "$PROVENANCE_API/v1/authorize/store_orders?state=challenged" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "list",
  "data": [
    {
      "object": "store_order",
      "id": "sto_01M7V7QYS7FQ9HETWF1HF5SM2H",
      "store_connection_id": "stc_01M7V7QYRYH5TA9E3H2GV0VT1Y",
      "platform_order_id": "5512345678901",
      "order_name": "#1002",
      "state": "challenged",
      "reason": "policy_rule",
      "rule_id": "rul_01M7V7QYS373XHYJSGGCQ4M2RJ",
      "checkout_approval_id": "coap_01M7V7QYS8H2SM4X31ME688ZWN",
      "approval_status": "pending",
      "held": true,
      "risk": "pending",
      "created_at": "2026-11-19T16:24:42.791Z",
      "updated_at": "2026-11-19T16:24:42.794Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

List agent sales channels

GET/v1/authorize/store_agent_channels

The agent sales channels Provenance maintains: an order through one counts as sold through an agent channel (store.agent_channel). version rises with each change. With store_connection_id, also that shop's own channels (yours) and the channels its last 90 days of orders carried that neither list names (seen).

Parameters

store_connection_idstringquery
One of your shops (stc_), to add its own channels and the channels its orders carried.

Returns

The list, and the shop's channels when asked.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl "$PROVENANCE_API/v1/authorize/store_agent_channels" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "store_agent_channels",
  "version": 0,
  "data": []
}

Disconnect a store

DELETE/v1/authorize/store_connections/{id}

Disconnects a shop: its access and order records are deleted, and its webhooks change nothing from then on. Holds already on its orders stay in Shopify for you to release there. To remove the app from the shop, uninstall it in Shopify.

Parameters

idstringpathRequired
The connection's ID (stc_).

Returns

Deleted.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -X DELETE "$PROVENANCE_API/v1/authorize/store_connections/stc_01M7V7QYRYH5TA9E3H2GV0VT1Y" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "stc_01M7V7QYRYH5TA9E3H2GV0VT1Y",
  "object": "store_connection",
  "deleted": true
}

Release a held order

POST/v1/authorize/store_orders/{id}/release

Lifts Provenance's fulfillment hold on an order (held for review, declined, expired or waiting on the buyer), so it ships as usual. The same as releasing it in the Shopify admin.

Parameters

idstringpathRequired
The store order's ID (sto_).

Returns

The order, released. See the store order object.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -X POST "$PROVENANCE_API/v1/authorize/store_orders/sto_01M7V7QYS7FQ9HETWF1HF5SM2H/release" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "store_order",
  "id": "sto_01M7V7QYS7FQ9HETWF1HF5SM2H",
  "store_connection_id": "stc_01M7V7QYRYH5TA9E3H2GV0VT1Y",
  "platform_order_id": "5512345678901",
  "order_name": "#1002",
  "state": "released",
  "reason": "store_released_by_staff",
  "rule_id": "rul_01M7V7QYS373XHYJSGGCQ4M2RJ",
  "checkout_approval_id": "coap_01M7V7QYS8H2SM4X31ME688ZWN",
  "approval_status": "pending",
  "held": false,
  "risk": "pending",
  "created_at": "2026-11-19T16:24:42.791Z",
  "updated_at": "2026-11-19T16:24:42.794Z"
}

Report a store order's outcome

POST/v1/authorize/store_orders/{id}/outcome

Records what happened to a store order after its decision: a chargeback, fraud, refund abuse, or that it was legitimate. Rule suggestions learn from these labels. The latest report wins; every report is kept. Free. Needs the authorize scope or Manage policies; another account's order is 404. See rule suggestions.

Parameters

idstringpathRequired
The store order's ID (sto_).
outcomeenumRequired
What happened to the order. One of chargeback, fraud, refund_abuse, legitimate.
notestring
A note for your team. Leave out customer details.

Returns

The recorded outcome.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -X POST "$PROVENANCE_API/v1/authorize/store_orders/sto_01M7V7QYS7FQ9HETWF1HF5SM2H/outcome" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "outcome": "legitimate",
    "note": "Customer confirmed the order by phone"
  }'

Response 201

{
  "object": "order_outcome",
  "id": "oot_01M81CRZ6H0M71QNV04T2Z64QM",
  "assessment_id": null,
  "store_order_id": "sto_01M7V7QYS7FQ9HETWF1HF5SM2H",
  "outcome": "legitimate",
  "kind": "clean",
  "source": "api",
  "note": "Customer confirmed the order by phone",
  "reported_at": "2026-11-22T10:28:05.457Z"
}

Cancel and refund a held order

POST/v1/authorize/store_orders/{id}/cancel

Cancels a held order in the shop, refunds it, restocks its items and tells the buyer. A store that captures payment by hand voids the authorization instead. Shopify runs the cancel as a job.

Parameters

idstringpathRequired
The store order's ID (sto_).

Returns

The order, cancelled. See the store order object.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -X POST "$PROVENANCE_API/v1/authorize/store_orders/sto_01M7V7QYS7FQ9HETWF1HF5SM2H/cancel" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "store_order",
  "id": "sto_01M7V7QYS7FQ9HETWF1HF5SM2H",
  "store_connection_id": "stc_01M7V7QYRYH5TA9E3H2GV0VT1Y",
  "platform_order_id": "5512345678901",
  "order_name": "#1002",
  "state": "cancelled",
  "reason": "store_cancelled_by_staff",
  "rule_id": "rul_01M7V7QYS373XHYJSGGCQ4M2RJ",
  "checkout_approval_id": "coap_01M7V7QYS8H2SM4X31ME688ZWN",
  "approval_status": "denied",
  "held": false,
  "risk": "high",
  "created_at": "2026-11-19T16:24:42.791Z",
  "updated_at": "2026-11-19T16:24:42.794Z"
}

Was this page helpful? Send us feedback

LLM? Read llms.txt.