Transaction status
Retrieve the current status and details of any transaction.
curl --request GET \
--url https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id} \
--header 'x-signature: <api-key>' \
--header 'x-timestamp: <api-key>'import requests
url = "https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}"
headers = {
"x-signature": "<api-key>",
"x-timestamp": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-signature': '<api-key>', 'x-timestamp': '<api-key>'}
};
fetch('https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-signature: <api-key>",
"x-timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-signature", "<api-key>")
req.Header.Add("x-timestamp", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}")
.header("x-signature", "<api-key>")
.header("x-timestamp", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-signature"] = '<api-key>'
request["x-timestamp"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"transaction_id": "<string>",
"type": "sale",
"status": {
"reasonCode": "<string>",
"name": "<string>",
"status": "APPROVED",
"domain": "SYSTEM",
"reason": "<string>",
"description": "<string>",
"field": {
"pointer": "<string>"
}
},
"order": {
"order_id": "<string>",
"merchant_order_id": "<string>",
"provider_order_id": "<string>",
"payment_profile": {
"friendly_id": "<string>",
"merchant_payment_profile_id": "<string>",
"payer": {
"friendly_id": "<string>",
"full_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email_username": "<string>",
"email_domain": "<string>",
"phone_number": "<string>",
"national_id": "<string>"
},
"payer_address": {
"postal_code": "<string>",
"city_name": "<string>",
"state_code": "<string>",
"country": "AD"
},
"payment_instrument": {
"token": "<string>",
"payment_method": "cards",
"card_cardholder_name": "<string>",
"card_card_last_four_digit": "<string>",
"card_bin": "<string>",
"expiration_date": "<string>",
"card_profile": {
"fingerprint": "<string>",
"brand": {
"name": "<string>"
},
"issuer": {
"name": "<string>",
"description": "<string>"
},
"category": "<string>",
"cardType": "DEBIT",
"panLength": 16,
"cardUsage": "<string>"
}
}
},
"description": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>",
"authorization_code": "<string>",
"arn": "<string>",
"amount": 123,
"currency": "<string>",
"attempt_number": 123,
"risk_decision": {
"success": true,
"allowed": true,
"blockedBy": [
{
"type": "blocklist",
"policyId": 123,
"policyName": "<string>",
"details": "<string>"
}
],
"bypassedChecks": [
{
"vipMode": "payment_profile",
"bypassedChecks": [
"blocklist"
]
}
],
"evaluatedPolicies": [
{
"policyId": 123,
"policyName": "<string>",
"description": "<string>"
}
],
"error": "<string>"
},
"retry": {
"plan_id": "<string>",
"state": "PENDING",
"expires_at": "<string>"
},
"pending_payer_actions": [
{
"action": "UPDATE_CARD_NUMBER"
}
],
"hosted_page_url": "<string>",
"payer_action_url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}order_id and transaction_id. Both are returned by
Sale and Pre-authorization. The
request returns 403 if order_id doesn’t belong to the transaction.
See Transaction status for the full set of status.status
values, the status object shape, and how to interpret reasonCode and domain. See
Status reason codes for the complete reason-code catalog.
Additional response context
Beyondstatus, the response can include:
retry— present while a failed transaction has an automatic retry scheduled. Itsplan_idis the identifier you pass to Complete payer actions.pending_payer_actions— present when the payer must take an action (such as entering a security code or confirming a currency change) before the transaction can proceed. It is always present together withretry.payer_action_url— present wheneverpending_payer_actionsis present. It opens the hosted page where the payer completes the pending actions. See Complete payer actions for which actions you can complete yourself.hosted_page_url— present only while apayment_collection: hosted_pagetransaction is still waiting for the payer to supply a credential. Redirect the payer to this URL instead of building it yourself.risk_decision— present when a risk policy evaluated this transaction.allowedsays whether it passed, andblockedBylists each blocking policy with itstype(blocklist,velocity, orrisk_rules),policyId,policyName, anddetails. A blocked transaction carries the status reasonRISK/BLOCKED.
Authorizations
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.
Current Unix time in seconds; must be within 5 minutes of server time and match the value used in the signature.
Path Parameters
The unique identifier of the order the transaction belongs to.
8^[\dA-Za-z]{8}$The unique identifier of the transaction.
8^[\dA-Za-z]{8}$The unique identifier of the terminal.
6^[\dA-Za-z]{6}$Response
Default Response
8^[\dA-Za-z]{8}$sale, preauth, account_verification, recurring_init, recurring, payout, capture, refund, void Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Payment page link for the payer. Present only while the payer has not yet supplied a credential on a hosted_page transaction.
Page where the payer completes the pending payer actions.
curl --request GET \
--url https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id} \
--header 'x-signature: <api-key>' \
--header 'x-timestamp: <api-key>'import requests
url = "https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}"
headers = {
"x-signature": "<api-key>",
"x-timestamp": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-signature': '<api-key>', 'x-timestamp': '<api-key>'}
};
fetch('https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-signature: <api-key>",
"x-timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-signature", "<api-key>")
req.Header.Add("x-timestamp", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}")
.header("x-signature", "<api-key>")
.header("x-timestamp", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://terminal.smartretry.com/v1/payments/status/{terminal_friendly_id}/{order_id}/{transaction_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-signature"] = '<api-key>'
request["x-timestamp"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"transaction_id": "<string>",
"type": "sale",
"status": {
"reasonCode": "<string>",
"name": "<string>",
"status": "APPROVED",
"domain": "SYSTEM",
"reason": "<string>",
"description": "<string>",
"field": {
"pointer": "<string>"
}
},
"order": {
"order_id": "<string>",
"merchant_order_id": "<string>",
"provider_order_id": "<string>",
"payment_profile": {
"friendly_id": "<string>",
"merchant_payment_profile_id": "<string>",
"payer": {
"friendly_id": "<string>",
"full_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email_username": "<string>",
"email_domain": "<string>",
"phone_number": "<string>",
"national_id": "<string>"
},
"payer_address": {
"postal_code": "<string>",
"city_name": "<string>",
"state_code": "<string>",
"country": "AD"
},
"payment_instrument": {
"token": "<string>",
"payment_method": "cards",
"card_cardholder_name": "<string>",
"card_card_last_four_digit": "<string>",
"card_bin": "<string>",
"expiration_date": "<string>",
"card_profile": {
"fingerprint": "<string>",
"brand": {
"name": "<string>"
},
"issuer": {
"name": "<string>",
"description": "<string>"
},
"category": "<string>",
"cardType": "DEBIT",
"panLength": 16,
"cardUsage": "<string>"
}
}
},
"description": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>",
"authorization_code": "<string>",
"arn": "<string>",
"amount": 123,
"currency": "<string>",
"attempt_number": 123,
"risk_decision": {
"success": true,
"allowed": true,
"blockedBy": [
{
"type": "blocklist",
"policyId": 123,
"policyName": "<string>",
"details": "<string>"
}
],
"bypassedChecks": [
{
"vipMode": "payment_profile",
"bypassedChecks": [
"blocklist"
]
}
],
"evaluatedPolicies": [
{
"policyId": 123,
"policyName": "<string>",
"description": "<string>"
}
],
"error": "<string>"
},
"retry": {
"plan_id": "<string>",
"state": "PENDING",
"expires_at": "<string>"
},
"pending_payer_actions": [
{
"action": "UPDATE_CARD_NUMBER"
}
],
"hosted_page_url": "<string>",
"payer_action_url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}