Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.smartretry.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Use our Postman collection to explore the SmartRetry API without writing code. The collection includes all endpoints with example requests and environment variables for easy configuration.

Download the collection

Postman Collection

Open in Postman workspace or download the collection JSON.

Environment Template

Pre-configured environment with sandbox and production variables.

Quick start

1

Import the collection

Click the Run in Postman button above, or download the JSON and import it via File > Import in Postman.
2

Set up your environment

Create a new environment with these variables:
VariableDescriptionExample
base_urlAPI base URLhttps://api.smartretry.com
api_keyYour API keysk_test_...
terminal_idYour terminal IDABC123
3

Send your first request

Open the Payments > Sale request, verify the environment is selected, and click Send.

Collection structure

The collection mirrors the API reference structure:
SmartRetry API
├── Payments
│   ├── Sale
│   ├── Pre-authorization
│   ├── Capture
│   ├── Refund
│   ├── Void
│   └── Transaction Status
├── Recurring
│   ├── Initialize
│   ├── Charge
│   ├── Status
│   ├── Update
│   └── Cancel
├── Future Transactions
│   ├── Charge
│   ├── Status
│   ├── Update
│   └── Cancel
└── Health
    ├── Basic Health
    ├── Readiness
    └── Liveness

Environment variables

The collection uses variables for easy switching between sandbox and production:
VariableSandboxProduction
base_urlhttps://api.smartretry.comhttps://api.smartretry.com
api_keysk_test_...sk_live_...
terminal_idYour sandbox terminalYour production terminal
Never commit your production API key to version control. Use Postman’s environment feature to keep credentials separate from the collection.

Pre-request scripts

The collection includes pre-request scripts that automatically:
  • Generate unique Idempotency-Key headers for POST requests
  • Set timestamps for request logging
  • Populate merchant_transaction_id with unique values

Test scripts

Each request includes test scripts that:
  • Validate response status codes
  • Extract and save transaction_id for use in subsequent requests
  • Check for required response fields
Example test script:
pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

pm.test("Response has transaction_id", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData).to.have.property("transaction_id");

    // Save for subsequent requests
    pm.environment.set("last_transaction_id", jsonData.transaction_id);
});

Request chaining

The collection supports request chaining for multi-step flows:

Pre-auth → Capture flow

  1. Run Pre-authorization - saves transaction_id and order_id to environment
  2. Run Capture - automatically uses saved IDs

Recurring flow

  1. Run Recurring > Initialize - saves recurring_id to environment
  2. Run Recurring > Charge - uses saved recurring_id
  3. Run Recurring > Status - checks series state

Importing via URL

Import directly from URL in Postman:
https://api.smartretry.com/postman/collection.json
Or use the Postman CLI:
postman collection run https://api.smartretry.com/postman/collection.json \
  --environment your-environment.json

Insomnia

Prefer Insomnia? Import the same collection:
  1. Open Insomnia
  2. Go to Application > Preferences > Data
  3. Click Import Data > From URL
  4. Enter: https://api.smartretry.com/postman/collection.json
The collection is regularly updated when new endpoints are added. Re-import periodically to get the latest requests.

Need help?