Take a Switcloud payment and reconcile it
A 5-step recipe with Switstack. We can help you get access.
Recipe · 5 steps
Take a Switcloud payment and reconcile it
with Switstack
Create a Payment, poll to COMPLETED, then retrieve the transaction and its diagnostics.
- client_credentials grant for a machine user. The docs also allow the password grant; either yields a bearer token valid for 3600 seconds.
- poi_id and poi_config_id are both required. NOT IDEMPOTENT — no Idempotency-Key parameter exists on this API, so a lost response must be reconciled with list_payments rather than retried.
- Poll until state is COMPLETED. There is no webhook, callback or event surface on this API, so polling is the only option — back off, because no rate limits are published. The device application should also notify your backend directly, whic
- Check BOTH state and outcome_status. A declined transaction arrives as HTTP 200 with outcome_status DECLINED; TRY_ANOTHER_INTERFACE and TRY_AGAIN are re-present instructions, not errors. trd, authorization and completion are EMV TLV blobs f
- The transaction-level diagnostic surface: meta_data, telemetry, config, trd, all_tags, apdus, trace and signals. This is where an EMV failure is actually explained. Swittest's parse_tlv / parse_tag will name the tags.
What you'll need to have ready
- client_id: Machine-user client id (client_credentials grant).
- client_secret
- poi_id: POI uuid — from the onboard-a-terminal workflow.
- poi_config_id: POIConfig uuid — from the onboard-a-terminal workflow.
For your developer
Arazzo workflow switstack:take-a-payment, 5 operations: token → create_payment → get_payment → get_payment → get_log_data_set. Specs on APIs.io.