curl --request POST \
--url https://dev.sbx.imprint.co/v2/simulate_transaction_event \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"payment_method_id": "7f754378-dd84-4a9a-b1ce-0646bb769c29",
"status": "APPROVED",
"event_id": "e2806932-5f1b-4518-8b15-156d773e9496",
"transaction_id": "e2806932-5f1b-4518-8b15-156d773e9496",
"amount": 5000,
"currency": "USD",
"authorization_code": "645432",
"network_transaction_id": "txn-789456",
"purchase_method": "CHIP",
"merchant": {
"network_id": "234923454545",
"name": "Target",
"category": "Grocery Stores",
"category_code": "5411",
"address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
}
}
}
'import requests
url = "https://dev.sbx.imprint.co/v2/simulate_transaction_event"
payload = {
"payment_method_id": "7f754378-dd84-4a9a-b1ce-0646bb769c29",
"status": "APPROVED",
"event_id": "e2806932-5f1b-4518-8b15-156d773e9496",
"transaction_id": "e2806932-5f1b-4518-8b15-156d773e9496",
"amount": 5000,
"currency": "USD",
"authorization_code": "645432",
"network_transaction_id": "txn-789456",
"purchase_method": "CHIP",
"merchant": {
"network_id": "234923454545",
"name": "Target",
"category": "Grocery Stores",
"category_code": "5411",
"address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
}
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payment_method_id: '7f754378-dd84-4a9a-b1ce-0646bb769c29',
status: 'APPROVED',
event_id: 'e2806932-5f1b-4518-8b15-156d773e9496',
transaction_id: 'e2806932-5f1b-4518-8b15-156d773e9496',
amount: 5000,
currency: 'USD',
authorization_code: '645432',
network_transaction_id: 'txn-789456',
purchase_method: 'CHIP',
merchant: {
network_id: '234923454545',
name: 'Target',
category: 'Grocery Stores',
category_code: '5411',
address: {
street_line1: '123 Main St',
street_line2: 'Apt 4B',
city: 'San Francisco',
state: 'CA',
postal_code: '94105',
country: 'USA'
}
}
})
};
fetch('https://dev.sbx.imprint.co/v2/simulate_transaction_event', 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://dev.sbx.imprint.co/v2/simulate_transaction_event",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'payment_method_id' => '7f754378-dd84-4a9a-b1ce-0646bb769c29',
'status' => 'APPROVED',
'event_id' => 'e2806932-5f1b-4518-8b15-156d773e9496',
'transaction_id' => 'e2806932-5f1b-4518-8b15-156d773e9496',
'amount' => 5000,
'currency' => 'USD',
'authorization_code' => '645432',
'network_transaction_id' => 'txn-789456',
'purchase_method' => 'CHIP',
'merchant' => [
'network_id' => '234923454545',
'name' => 'Target',
'category' => 'Grocery Stores',
'category_code' => '5411',
'address' => [
'street_line1' => '123 Main St',
'street_line2' => 'Apt 4B',
'city' => 'San Francisco',
'state' => 'CA',
'postal_code' => '94105',
'country' => 'USA'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dev.sbx.imprint.co/v2/simulate_transaction_event"
payload := strings.NewReader("{\n \"payment_method_id\": \"7f754378-dd84-4a9a-b1ce-0646bb769c29\",\n \"status\": \"APPROVED\",\n \"event_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"transaction_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"authorization_code\": \"645432\",\n \"network_transaction_id\": \"txn-789456\",\n \"purchase_method\": \"CHIP\",\n \"merchant\": {\n \"network_id\": \"234923454545\",\n \"name\": \"Target\",\n \"category\": \"Grocery Stores\",\n \"category_code\": \"5411\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dev.sbx.imprint.co/v2/simulate_transaction_event")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"payment_method_id\": \"7f754378-dd84-4a9a-b1ce-0646bb769c29\",\n \"status\": \"APPROVED\",\n \"event_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"transaction_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"authorization_code\": \"645432\",\n \"network_transaction_id\": \"txn-789456\",\n \"purchase_method\": \"CHIP\",\n \"merchant\": {\n \"network_id\": \"234923454545\",\n \"name\": \"Target\",\n \"category\": \"Grocery Stores\",\n \"category_code\": \"5411\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/simulate_transaction_event")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_method_id\": \"7f754378-dd84-4a9a-b1ce-0646bb769c29\",\n \"status\": \"APPROVED\",\n \"event_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"transaction_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"authorization_code\": \"645432\",\n \"network_transaction_id\": \"txn-789456\",\n \"purchase_method\": \"CHIP\",\n \"merchant\": {\n \"network_id\": \"234923454545\",\n \"name\": \"Target\",\n \"category\": \"Grocery Stores\",\n \"category_code\": \"5411\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"transaction_id": "E777214A-2D11-4CAD-9E8F-E1BD71D9FE67",
"event_id": "E777214A-2D11-4CAD-9E8F-E1BD71D9FE67",
"status": "APPROVED"
}{
"type": "<string>",
"message": "<string>"
}Simulate transaction event in sandbox environment
curl --request POST \
--url https://dev.sbx.imprint.co/v2/simulate_transaction_event \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"payment_method_id": "7f754378-dd84-4a9a-b1ce-0646bb769c29",
"status": "APPROVED",
"event_id": "e2806932-5f1b-4518-8b15-156d773e9496",
"transaction_id": "e2806932-5f1b-4518-8b15-156d773e9496",
"amount": 5000,
"currency": "USD",
"authorization_code": "645432",
"network_transaction_id": "txn-789456",
"purchase_method": "CHIP",
"merchant": {
"network_id": "234923454545",
"name": "Target",
"category": "Grocery Stores",
"category_code": "5411",
"address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
}
}
}
'import requests
url = "https://dev.sbx.imprint.co/v2/simulate_transaction_event"
payload = {
"payment_method_id": "7f754378-dd84-4a9a-b1ce-0646bb769c29",
"status": "APPROVED",
"event_id": "e2806932-5f1b-4518-8b15-156d773e9496",
"transaction_id": "e2806932-5f1b-4518-8b15-156d773e9496",
"amount": 5000,
"currency": "USD",
"authorization_code": "645432",
"network_transaction_id": "txn-789456",
"purchase_method": "CHIP",
"merchant": {
"network_id": "234923454545",
"name": "Target",
"category": "Grocery Stores",
"category_code": "5411",
"address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
}
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payment_method_id: '7f754378-dd84-4a9a-b1ce-0646bb769c29',
status: 'APPROVED',
event_id: 'e2806932-5f1b-4518-8b15-156d773e9496',
transaction_id: 'e2806932-5f1b-4518-8b15-156d773e9496',
amount: 5000,
currency: 'USD',
authorization_code: '645432',
network_transaction_id: 'txn-789456',
purchase_method: 'CHIP',
merchant: {
network_id: '234923454545',
name: 'Target',
category: 'Grocery Stores',
category_code: '5411',
address: {
street_line1: '123 Main St',
street_line2: 'Apt 4B',
city: 'San Francisco',
state: 'CA',
postal_code: '94105',
country: 'USA'
}
}
})
};
fetch('https://dev.sbx.imprint.co/v2/simulate_transaction_event', 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://dev.sbx.imprint.co/v2/simulate_transaction_event",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'payment_method_id' => '7f754378-dd84-4a9a-b1ce-0646bb769c29',
'status' => 'APPROVED',
'event_id' => 'e2806932-5f1b-4518-8b15-156d773e9496',
'transaction_id' => 'e2806932-5f1b-4518-8b15-156d773e9496',
'amount' => 5000,
'currency' => 'USD',
'authorization_code' => '645432',
'network_transaction_id' => 'txn-789456',
'purchase_method' => 'CHIP',
'merchant' => [
'network_id' => '234923454545',
'name' => 'Target',
'category' => 'Grocery Stores',
'category_code' => '5411',
'address' => [
'street_line1' => '123 Main St',
'street_line2' => 'Apt 4B',
'city' => 'San Francisco',
'state' => 'CA',
'postal_code' => '94105',
'country' => 'USA'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dev.sbx.imprint.co/v2/simulate_transaction_event"
payload := strings.NewReader("{\n \"payment_method_id\": \"7f754378-dd84-4a9a-b1ce-0646bb769c29\",\n \"status\": \"APPROVED\",\n \"event_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"transaction_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"authorization_code\": \"645432\",\n \"network_transaction_id\": \"txn-789456\",\n \"purchase_method\": \"CHIP\",\n \"merchant\": {\n \"network_id\": \"234923454545\",\n \"name\": \"Target\",\n \"category\": \"Grocery Stores\",\n \"category_code\": \"5411\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dev.sbx.imprint.co/v2/simulate_transaction_event")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"payment_method_id\": \"7f754378-dd84-4a9a-b1ce-0646bb769c29\",\n \"status\": \"APPROVED\",\n \"event_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"transaction_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"authorization_code\": \"645432\",\n \"network_transaction_id\": \"txn-789456\",\n \"purchase_method\": \"CHIP\",\n \"merchant\": {\n \"network_id\": \"234923454545\",\n \"name\": \"Target\",\n \"category\": \"Grocery Stores\",\n \"category_code\": \"5411\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/simulate_transaction_event")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_method_id\": \"7f754378-dd84-4a9a-b1ce-0646bb769c29\",\n \"status\": \"APPROVED\",\n \"event_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"transaction_id\": \"e2806932-5f1b-4518-8b15-156d773e9496\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"authorization_code\": \"645432\",\n \"network_transaction_id\": \"txn-789456\",\n \"purchase_method\": \"CHIP\",\n \"merchant\": {\n \"network_id\": \"234923454545\",\n \"name\": \"Target\",\n \"category\": \"Grocery Stores\",\n \"category_code\": \"5411\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"transaction_id": "E777214A-2D11-4CAD-9E8F-E1BD71D9FE67",
"event_id": "E777214A-2D11-4CAD-9E8F-E1BD71D9FE67",
"status": "APPROVED"
}{
"type": "<string>",
"message": "<string>"
}Authorizations
Basic HTTP authentication. Allowed headers-- Authorization: Basic <base64(api_key_id:api_key_secret)>
Body
Unique identifier of the payment method used.
"7f754378-dd84-4a9a-b1ce-0646bb769c29"
APPROVED, UPDATED, VOIDED, CAPTURED, REFUNDED "APPROVED"
Unique identifier of the event.
"e2806932-5f1b-4518-8b15-156d773e9496"
Unique identifier of the transaction. Required to VOID, UPDATE, CAPTURE, or REFUND a transaction
"e2806932-5f1b-4518-8b15-156d773e9496"
Amount of the transaction in the smallest currency unit (e.g., cents for USD).
5000
The 3-character currency code of the amount in ISO 4217 format (e.g., "USD")
"USD"
Code used to authorize the transaction.
"645432"
Unique transaction identifier assigned by the payment network.
"txn-789456"
How the purchase was completed.
CHIP, CONTACTLESS, KEYEDIN, ONLINE, SWIPE, QRCODE, OCR, UNKNOWN "CHIP"
Show child attributes
Show child attributes
Response
Transaction event created successfully
Unique identifier of the transaction
"E777214A-2D11-4CAD-9E8F-E1BD71D9FE67"
Unique identifier of the event generated, matches the event_id in the transaction event notification
"E777214A-2D11-4CAD-9E8F-E1BD71D9FE67"
APPROVED, UPDATED, VOIDED, CAPTURED, REFUNDED "APPROVED"