scriptmonitoring.comdocs

Delete payment pages

DELETE /v1/payment-pages removes up to 100 payment page selectors from a team and reports, per selector, whether it was deleted or not found.

All plansUpdated

DELETE /v1/payment-pages removes 1 to 100 payment page selectors from a team: the same as clicking a selector's x in Setup step 4 (see Payment pages). It takes the selectors as text: get them from List payment pages. Needs the payment_pages:delete scope. Organization keys must pass team_id; a team key always acts on its own team.

With an organization key:

curl -X DELETE https://data.scriptmonitoring.com/v1/payment-pages/ \
  -H "Authorization: Bearer sm_org_14829305716342_…" \
  -H "Content-Type: application/json" \
  -d '{"team_id": "YOUR_TEAM_ID", "payment_pages": ["shop.example.com/checkout"]}'

With a team key, no team_id:

curl -X DELETE https://data.scriptmonitoring.com/v1/payment-pages/ \
  -H "Authorization: Bearer sm_team_10937462815530_…" \
  -H "Content-Type: application/json" \
  -d '{"payment_pages": ["shop.example.com/checkout"]}'

Which keys work?#

KeyAccepted
Organization key (sm_org_…)Yes, with payment_pages:delete and a team_id in the body.
Team key (sm_team_…)Yes, with payment_pages:delete, on its own team. team_id is optional; if you pass it, it must be the key's own team.

A key with only payment_pages:create gets 403 insufficient_scope. A missing, mistyped or revoked key, a key whose prefix doesn't match its type, or a key created before the sm_org_ / sm_team_ format gets 401 with this body, and so does a team key whose team_id names another team:

{ "error": "unauthorized", "message": "Missing or invalid bearer token." }

Request body#

FieldTypeDescription
payment_pagesstring[]1 to 100 selectors, as List payment pages returns them. A trailing slash or query string is ignored, as when you add one.
team_idstringThe team's ID. Required with an organization key; with a team key, optional and only its own team.

Response#

{
  "data": {
    "teamId": "14827391650423",
    "results": [{ "status": "deleted", "paymentPage": "shop.example.com/checkout" }],
    "totals": { "deleted": 1, "not_found": 0 }
  }
}

status is deleted, or not_found when the team has no such selector, so calling it twice is safe. A selector named twice in one request is deleted once and not_found the second time. An empty selector refuses the whole request with 400 invalid_payment_page and nothing is removed. Errors: 400 (invalid_request, invalid_payment_page), 401, 403, 404 team_not_found, 429, 503 payment_page_unavailable. On a 503 that says the payment pages were removed but synchronization is incomplete, send the same request again: it answers not_found and finishes the update.

What happens to the page's history?#

Only the selectors go. Scripts, alerts, inventories and the PCI DSS 6.4.3 & 11.6.1 reports already generated stay as they are, because they belong to the domain and the page URL, not to the selector. From then on, pages that only a removed selector matched no longer count as payment pages: they drop out of your PCI scope and the next report. The removal is recorded in the audit log as "Payment page removed".

If Only payment pages report is on and you remove the last usable selector, it switches off, as it does in the dashboard. See What does "Only payment pages report" do?.

Questions? Ask in the chat, or in the dashboard.View as Markdown
Payment pagesDelete payment pages