Development and QA

Receiving SMS through an API for authorized testing

Connect catalog lookup, current quotes, order creation and SMS polling. Handle retries safely and keep the API key on your server.

Four connected nodes represent the catalog, a quote, an order and a received message.

An API can make an authorized test process reproducible: your system selects an offer and tracks the order. Start with one permitted action. API access does not authorize bulk registration of other people's accounts or evasion of platform rules.

Prepare the key and budget

Create a key in your account and keep the complete secret on the server. Send it over HTTPS in the Authorization: Bearer header. Do not place it in browser JavaScript, a repository or a task screenshot. Catalog access and purchases can require different key permissions.

Set a total test budget and a permitted number of orders. max_price caps a single order; it does not limit total spending across the integration.

Follow the catalog-to-order sequence

The base path is /api/v1/. Read GET /services, then GET /prices with the service parameter. Preserve the selected offer's price_id, price_version and availability. An identifier copied from an old screenshot is not a permanent price.

POST /orders accepts price_id, price_version and an optional decimal string max_price. Supply a UUID in Idempotency-Key for a new order. Consult the current documentation for examples and limits; use actual response values rather than demonstration numbers from an article.

Retry the same operation safely

A connection failure after submission leaves the outcome uncertain. Retry the same body with the same UUID. A fresh UUID represents a new purchase and can create an extra order. Reusing the original UUID with different parameters returns a 409 conflict.

Save the returned order ID before polling. HTTP 202 means the request was accepted, not that a number or code has arrived. Wait for the relevant state and check approximately every five seconds as described in the documentation.

Handle limits and completion

  • On 429, wait for the interval in Retry-After.
  • If the price changed, obtain a new quote and reassess the purchase.
  • Stop polling when the order reaches a terminal state.
  • Cancellation is conditional; do not assume it remains available after a supplier attempt starts.

Log identifiers and states without the API key or SMS code. Use integer *_units fields for exact monetary accounting and rounded strings for display. Add the data-masking rules and the application test plan to your integration checklist.

Sources and further reading

← All articles