The SmartRetry REST API accepts JSON over HTTPS. All requests are scoped to a terminal - a 6-character alphanumeric ID that identifies your merchant configuration.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.
Base URL
Authentication
Every request must include your API key in thex-api-key header.
Request format
SetContent-Type: application/json on all requests and send a JSON body.
Amount format
Passamount in major currency units using standard decimal notation.
| Amount value | Currency | Represents |
|---|---|---|
49.99 | USD | $49.99 |
10.00 | EUR | €10.00 |
500 | JPY | ¥500 |
merchant_transaction_id
merchant_transaction_id is your unique identifier for each transaction. Use it for reconciliation and tracing in your own system.
Idempotency
If you need safe retries for a POST request, send anIdempotency-Key header. Reusing the same key with the same POST body replays the original non-5xx response for 24 hours. Reusing the same key with a different body returns 409 Conflict.
Idempotency currently applies only to POST /v1/payments/*. GET and PUT requests ignore the header.
See Idempotency for the full contract and response headers.
Token-based payments
When SmartRetry processes a transaction, it can return atoken - an 88-character stored payment token that represents the card. On future charges for the same customer, you can pass this token instead of sending raw card data again. This simplifies repeat billing and reduces PCI scope.
Payer fingerprint
SmartRetry generates apayer_fingerprint - an 88-character identifier that represents a card profile or payer address. You can store this and include it in future requests for the same customer to help SmartRetry recognize repeat payers and apply optimized retry logic more quickly.
Making a sale
All payment endpoints include theterminal_friendly_id as a path parameter at the end of the URL. See Terminals for details.
Example request
Example response
Response format
All responses return JSON. Successful payment responses include anaccepted boolean, the transaction_id and order_id assigned by SmartRetry, and your original merchant_transaction_id for reconciliation. A 200 OK with "accepted": false means the transaction was declined - not an error. Use the status endpoint to get the full transaction outcome.
Error format
When a request fails, SmartRetry returns a JSON error object using the RFC 7807 Problem Details format.| Field | Type | Description |
|---|---|---|
type | string | URI identifying the error type |
title | string | Short, human-readable summary |
status | number | HTTP status code |
detail | string | Detailed explanation of the error |
reason_code | string | Machine-readable code for programmatic handling |
Best practices
SmartRetry applies rate limits per API key. If you receive a
429 Too Many Requests response, implement exponential backoff before retrying.- Always use a unique
merchant_transaction_idper transaction so reconciliation back to your own system stays unambiguous. - Use a new
Idempotency-Keyfor each new POST request, and reuse it only when retrying the exact same request body. - Store the
tokenandpayer_fingerprintfrom successful responses to speed up future requests for returning customers. - Validate
amountandcurrencyon your side before sending -amountmust be a positive number in major currency units. - Use the sandbox environment to test your integration before going live.