SMM API Refills and Cancellations: Track Requests to Outcomes

A cancellation request can be accepted while the order still needs a later status check. A refill can return its own ID while the original order keeps its original ID. If an integration collapses those steps into one “done” badge, the customer receives a conclusion the application has not established.

Use two timelines: one for the order, one for the follow-up request. This guide explains the documented AlwaysCompleted API response shapes and adds an explicit local tracking model. The model is an application design, not a new API feature. The downloadable fixtures are synthetic and make no paid requests.

Check the service and the specific order

The catalog response includes refill and cancel capability flags. Read them from the current service snapshot, then check the service description and the circumstances of the actual order. A capability flag does not establish that every request will qualify, that a particular request has been accepted, or that the requested work has finished.

Before sending a request, retain the order ID, current order status, observation time and the reason for the follow-up. Give the request a local reference and identify who authorized it. Keep any time limits or service conditions as evidence rather than assumptions. If the conditions are unclear, ask technical support before promising a result to the customer.

Avoid two workers submitting the same follow-up simultaneously. Your application can lock a request record or use a unique local intent key. Those controls prevent your own duplicate submissions; they do not create documented server-side idempotency.

A refill has a separate identifier

The reference documents action=refill with order for one order and orders for a batch. A successful single example returns a refill value. Store that value as refill_id, alongside order_id, and use it for action=refill_status.

Stage Local evidence to retain Honest customer message
Prepared Order, reason, capability and condition check Request is being reviewed
Submitted, response missing Attempt time and unresolved outcome Request outcome is being checked
Refill ID received Original order ID plus returned refill ID Refill request has been recorded
Refill status observed Returned status and observation time Report the observed request status

For a batch, parse each object independently. The documented example contains successful refill IDs and a nested refill.error for another order. An HTTP response with valid JSON does not make every item successful. Do not store an error object as though it were a refill ID, and do not mark successful neighbors as failed simply because one item was rejected.

The refill-status batch also has its own error shape: an item's status may be an object containing error. Treat a string status and an error object as different types. The reference includes Completed and Rejected examples, but it is not a license to assume an exhaustive enum of every possible future status. Preserve an unfamiliar value and route it for review.

A cancel acknowledgement is not the final order result

Cancellation uses action=cancel and the documented orders parameter, including when the list contains one order. The batch response can contain cancel: 1 or a nested error for an individual order. Record that acknowledgement in the follow-up record, then observe the original order through action=status.

Do not invent a separate cancel-status endpoint. Do not change your customer order state to Cancelled merely because cancel: 1 appeared. Your next customer-facing update should depend on the subsequent documented order observation and any necessary account confirmation.

If the order continues to show an in-progress state, keep both facts: the cancellation request was acknowledged at one time, and the latest order observation still reports in progress at another. That timeline is useful to technical support and avoids an apparent contradiction caused by overwriting the earlier record.

Handle a missing response without guessing

The MDN description of POST identifies POST as non-idempotent in general. A connection timeout after a state-changing request does not prove that the request was never processed. Avoid a blanket retry policy shared by order creation, refill creation, cancellation and status reading.

For an uncertain refill submission without a returned refill ID, retain an unresolved request state. Check the available account evidence or ask technical support. For an uncertain cancellation request, observe the original order and retain the uncertainty until evidence resolves it. Repeatedly pressing the same action is not a reconciliation method.

For status reads, use bounded retries with a delay and a defined escalation threshold chosen for your application. That is your policy, not a published fixed API request allowance. Preserve a last-known status with its timestamp when a new read fails; do not replace it with a fabricated success or a zero value.

Use the five-fixture exercise

Download the request timelines and blank record, five JSON fixtures, and offline fixture checker. Save the JSON and Python file together, then run python3 check_followup_fixtures.py refill-cancel-fixtures.json.

The exercise includes a single refill acknowledgement, a mixed refill batch, completed/rejected/error refill statuses, a mixed cancellation response and a later order observation that is still in progress. The expected outputs distinguish IDs, nested errors and acknowledgement from outcome. Numeric IDs are fictional and should never be submitted to a live account.

When adapting the examples, add fixtures for missing items and unfamiliar fields. Preserve the raw permitted response in restricted operational storage if needed, but expose only the minimal evidence required for the customer. A diagnostic attachment should exclude API keys, other customers' records and unnecessary private target URLs.

Make the next action visible

Every open follow-up needs an owner and a next observation or escalation time. A useful support timeline says what was requested, when, which ID was returned, and what the latest observation says. It does not promise a completion time unsupported by the service conditions.

The developer guide provides the connection scope. Before choosing a service in the catalog, review its current follow-up conditions. For an existing order, contact technical support with the original order ID and the relevant request evidence. Describe the actual state as “submitted”, “acknowledged” or “observed completed” so the wording matches the evidence.

Is the order ID interchangeable with the refill ID?

No. They identify different records and are used by different documented actions. Name the fields explicitly in storage and in your code.

Does a capability flag guarantee approval?

No. Check the actual service conditions and the individual response. A supported request type can still return an item-level error or a rejected refill outcome.

By AlwaysCompleted · Published