Skip to main content
POST
cURL
A sale authorizes and captures a payment in one request. Use this endpoint when you want to immediately charge the payer without a separate capture step.

Payment instrument

order.payment_instrument accepts exactly one credential source: raw card details, a SmartRetry token, or a processor provider_token (with its merchant_account, provider_key, and for Adyen provider_shopper_reference). An optional cvv can accompany any of them. See Payment methods for the full field reference. Provide either order.payer or order.payer_fingerprint — not both. payer_fingerprint is a pre-computed identifier from an earlier transaction for the same payer.
Setting payment_collection: hosted_page makes the credential optional at create time and rejects token/provider_token — the payer supplies a fresh credential later through the hosted payment page, and the transaction is persisted awaiting that submission until then.The response includes hosted_page_url. Redirect the payer to that URL instead of building it yourself.

Retry a previous sale

Use this same endpoint to create a new retry attempt. In the request body, provide retry.originating_id for a previous SmartRetry transaction. You can also import the originating attempt from a payment provider by providing retry.provider_key and either retry.provider_transaction_id or a non-empty retry.interactions history.
A retry request creates a new attempt. To safely replay the exact same request after an ambiguous failure, reuse its Idempotency-Key. See Idempotency.
accepted: true means SmartRetry has accepted the transaction for processing. To confirm whether the payment was approved by the issuer, fetch the transaction status using the returned transaction_id.

Authorizations

x-signature
string
header
required

Lowercase hex HMAC-SHA256 of {x-timestamp}.{METHOD}.{path_with_query}.{raw_body} keyed with your API secret. See https://www.smartretry.com/docs/authentication.

x-timestamp
string
header
required

Current Unix time in seconds; must be within 5 minutes of server time and match the value used in the signature.

Headers

idempotency-key
string

Optional idempotency key, scoped to terminal + matched route pattern. A replayed request returns the cached response with Idempotency-Replayed: true. Send it exactly once (a repeated header is rejected); 1-255 characters, letters, digits, _ and - only.

Required string length: 1 - 255
Pattern: ^[\w-]+$

Path Parameters

terminal_friendly_id
string
required

The unique identifier of the terminal.

Required string length: 6
Pattern: ^[\dA-Za-z]{6}$

Body

application/json

order.payment_instrument must be supplied, as a raw card, a SmartRetry token, or a provider_token, unless payment_collection is hosted_page.

merchant_transaction_id
string
required

A unique identifier for the transaction generated by the merchant.

Maximum string length: 100
amount
number
required

The amount to be charged, in major currency units (e.g. 10.00 for $10.00 USD).

Required range: 0.01 <= x <= 999999.99
currency
enum<string>
required
Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BOV,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHE,
CHF,
CHW,
CLF,
CLP,
CNY,
COP,
COU,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MXV,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
SSP,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
USN,
UYI,
UYU,
UYW,
UZS,
VED,
VES,
VND,
VUV,
WST,
XAF,
XAG,
XAU,
XBA,
XBB,
XBC,
XBD,
XCD,
XDR,
XOF,
XPD,
XPF,
XPT,
XSU,
XTS,
XUA,
XXX,
YER,
ZAR,
ZMW,
ZWL
transaction_session
object
order_id
string

A unique identifier for the order generated by SmartRetry. Additional notes internally this is friendly_id for order and not the actual order_id in the database.

Required string length: 8
Pattern: ^[\dA-Za-z]{8}$
order
object
ship_indicator
enum<string>
Available options:
01,
02,
03,
04,
05,
06,
07,
08,
09
delivery_address_usage_indicator
string

Indicates how long the shipping address has been associated with the customer.

delivery_timeframe
string

Indicates the delivery timeframe for the order.

shipping_recipient
object
description
string

A description of the transaction.

Maximum string length: 500
payment_collection
enum<string>
Available options:
hosted_page

Response

Default Response

transaction_id
string
required
Required string length: 8
Pattern: ^[\dA-Za-z]{8}$
accepted
boolean
required
order_id
string
Required string length: 8
Pattern: ^[\dA-Za-z]{8}$
merchant_transaction_id
string
merchant_order_id
string
hosted_page_url
string

Payment page link for the payer. Present only for a hosted_page transaction awaiting the payer.