curl --request POST \
--url https://dev.sbx.imprint.co/v2/transaction_intents \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF",
"amount": 10000,
"currency": "USD",
"payment_method_id": "<string>",
"network_transaction_id": "<string>",
"merchant_name": "walmart",
"merchant_address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
},
"merchant_id": "<string>",
"merchant_code": "<string>",
"expected_date": "2025-02-13T19:08:07.000Z",
"metadata": {
"platform_version": "2.1.0"
}
}
'import requests
url = "https://dev.sbx.imprint.co/v2/transaction_intents"
payload = {
"customer_id": "F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF",
"amount": 10000,
"currency": "USD",
"payment_method_id": "<string>",
"network_transaction_id": "<string>",
"merchant_name": "walmart",
"merchant_address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
},
"merchant_id": "<string>",
"merchant_code": "<string>",
"expected_date": "2025-02-13T19:08:07.000Z",
"metadata": { "platform_version": "2.1.0" }
}
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({
customer_id: 'F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF',
amount: 10000,
currency: 'USD',
payment_method_id: '<string>',
network_transaction_id: '<string>',
merchant_name: 'walmart',
merchant_address: {
street_line1: '123 Main St',
street_line2: 'Apt 4B',
city: 'San Francisco',
state: 'CA',
postal_code: '94105',
country: 'USA'
},
merchant_id: '<string>',
merchant_code: '<string>',
expected_date: '2025-02-13T19:08:07.000Z',
metadata: {platform_version: '2.1.0'}
})
};
fetch('https://dev.sbx.imprint.co/v2/transaction_intents', 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/transaction_intents",
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([
'customer_id' => 'F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF',
'amount' => 10000,
'currency' => 'USD',
'payment_method_id' => '<string>',
'network_transaction_id' => '<string>',
'merchant_name' => 'walmart',
'merchant_address' => [
'street_line1' => '123 Main St',
'street_line2' => 'Apt 4B',
'city' => 'San Francisco',
'state' => 'CA',
'postal_code' => '94105',
'country' => 'USA'
],
'merchant_id' => '<string>',
'merchant_code' => '<string>',
'expected_date' => '2025-02-13T19:08:07.000Z',
'metadata' => [
'platform_version' => '2.1.0'
]
]),
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/transaction_intents"
payload := strings.NewReader("{\n \"customer_id\": \"F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF\",\n \"amount\": 10000,\n \"currency\": \"USD\",\n \"payment_method_id\": \"<string>\",\n \"network_transaction_id\": \"<string>\",\n \"merchant_name\": \"walmart\",\n \"merchant_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 \"merchant_id\": \"<string>\",\n \"merchant_code\": \"<string>\",\n \"expected_date\": \"2025-02-13T19:08:07.000Z\",\n \"metadata\": {\n \"platform_version\": \"2.1.0\"\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/transaction_intents")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF\",\n \"amount\": 10000,\n \"currency\": \"USD\",\n \"payment_method_id\": \"<string>\",\n \"network_transaction_id\": \"<string>\",\n \"merchant_name\": \"walmart\",\n \"merchant_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 \"merchant_id\": \"<string>\",\n \"merchant_code\": \"<string>\",\n \"expected_date\": \"2025-02-13T19:08:07.000Z\",\n \"metadata\": {\n \"platform_version\": \"2.1.0\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/transaction_intents")
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 \"customer_id\": \"F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF\",\n \"amount\": 10000,\n \"currency\": \"USD\",\n \"payment_method_id\": \"<string>\",\n \"network_transaction_id\": \"<string>\",\n \"merchant_name\": \"walmart\",\n \"merchant_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 \"merchant_id\": \"<string>\",\n \"merchant_code\": \"<string>\",\n \"expected_date\": \"2025-02-13T19:08:07.000Z\",\n \"metadata\": {\n \"platform_version\": \"2.1.0\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "5B30532B-5B5B-4826-8DE2-429C57B705FD",
"customer_id": "9B5E1EE0-2E1C-46E7-81B9-3C3917204BE4",
"amount": 10000,
"currency": "USD",
"status": "CONFIRMED",
"created_at": "2025-02-13T19:08:07.000Z",
"payment_method_id": "DCBFC736-2286-42DD-897D-160DCA80AED2",
"network_transaction_id": "<string>",
"partner_transaction_id": "<string>",
"updated_at": "2025-02-13T19:08:07.000Z",
"metadata": {
"platform_version": "2.1.0"
}
}{
"path": "/v2/customers",
"details": [
"email: must be a well-formed email address"
],
"error": "Bad Request",
"status": 400,
"timestamp": "2025-01-20T18:18:22.923+00:00"
}{
"error": {
"type": "BAD_REQUEST_ERROR",
"message": "unsupported reward_type: INVALID, must be STATEMENT or DELAYED"
}
}Create a transaction intent
Creates a transaction intent object that represents a pending financial transaction. Transaction intents are used to initiate, validate, and track the lifecycle of a transaction before it is finalized.
Required scope: TRANSACTION_INTENT_WRITE
curl --request POST \
--url https://dev.sbx.imprint.co/v2/transaction_intents \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF",
"amount": 10000,
"currency": "USD",
"payment_method_id": "<string>",
"network_transaction_id": "<string>",
"merchant_name": "walmart",
"merchant_address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
},
"merchant_id": "<string>",
"merchant_code": "<string>",
"expected_date": "2025-02-13T19:08:07.000Z",
"metadata": {
"platform_version": "2.1.0"
}
}
'import requests
url = "https://dev.sbx.imprint.co/v2/transaction_intents"
payload = {
"customer_id": "F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF",
"amount": 10000,
"currency": "USD",
"payment_method_id": "<string>",
"network_transaction_id": "<string>",
"merchant_name": "walmart",
"merchant_address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
},
"merchant_id": "<string>",
"merchant_code": "<string>",
"expected_date": "2025-02-13T19:08:07.000Z",
"metadata": { "platform_version": "2.1.0" }
}
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({
customer_id: 'F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF',
amount: 10000,
currency: 'USD',
payment_method_id: '<string>',
network_transaction_id: '<string>',
merchant_name: 'walmart',
merchant_address: {
street_line1: '123 Main St',
street_line2: 'Apt 4B',
city: 'San Francisco',
state: 'CA',
postal_code: '94105',
country: 'USA'
},
merchant_id: '<string>',
merchant_code: '<string>',
expected_date: '2025-02-13T19:08:07.000Z',
metadata: {platform_version: '2.1.0'}
})
};
fetch('https://dev.sbx.imprint.co/v2/transaction_intents', 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/transaction_intents",
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([
'customer_id' => 'F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF',
'amount' => 10000,
'currency' => 'USD',
'payment_method_id' => '<string>',
'network_transaction_id' => '<string>',
'merchant_name' => 'walmart',
'merchant_address' => [
'street_line1' => '123 Main St',
'street_line2' => 'Apt 4B',
'city' => 'San Francisco',
'state' => 'CA',
'postal_code' => '94105',
'country' => 'USA'
],
'merchant_id' => '<string>',
'merchant_code' => '<string>',
'expected_date' => '2025-02-13T19:08:07.000Z',
'metadata' => [
'platform_version' => '2.1.0'
]
]),
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/transaction_intents"
payload := strings.NewReader("{\n \"customer_id\": \"F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF\",\n \"amount\": 10000,\n \"currency\": \"USD\",\n \"payment_method_id\": \"<string>\",\n \"network_transaction_id\": \"<string>\",\n \"merchant_name\": \"walmart\",\n \"merchant_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 \"merchant_id\": \"<string>\",\n \"merchant_code\": \"<string>\",\n \"expected_date\": \"2025-02-13T19:08:07.000Z\",\n \"metadata\": {\n \"platform_version\": \"2.1.0\"\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/transaction_intents")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF\",\n \"amount\": 10000,\n \"currency\": \"USD\",\n \"payment_method_id\": \"<string>\",\n \"network_transaction_id\": \"<string>\",\n \"merchant_name\": \"walmart\",\n \"merchant_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 \"merchant_id\": \"<string>\",\n \"merchant_code\": \"<string>\",\n \"expected_date\": \"2025-02-13T19:08:07.000Z\",\n \"metadata\": {\n \"platform_version\": \"2.1.0\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/transaction_intents")
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 \"customer_id\": \"F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF\",\n \"amount\": 10000,\n \"currency\": \"USD\",\n \"payment_method_id\": \"<string>\",\n \"network_transaction_id\": \"<string>\",\n \"merchant_name\": \"walmart\",\n \"merchant_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 \"merchant_id\": \"<string>\",\n \"merchant_code\": \"<string>\",\n \"expected_date\": \"2025-02-13T19:08:07.000Z\",\n \"metadata\": {\n \"platform_version\": \"2.1.0\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "5B30532B-5B5B-4826-8DE2-429C57B705FD",
"customer_id": "9B5E1EE0-2E1C-46E7-81B9-3C3917204BE4",
"amount": 10000,
"currency": "USD",
"status": "CONFIRMED",
"created_at": "2025-02-13T19:08:07.000Z",
"payment_method_id": "DCBFC736-2286-42DD-897D-160DCA80AED2",
"network_transaction_id": "<string>",
"partner_transaction_id": "<string>",
"updated_at": "2025-02-13T19:08:07.000Z",
"metadata": {
"platform_version": "2.1.0"
}
}{
"path": "/v2/customers",
"details": [
"email: must be a well-formed email address"
],
"error": "Bad Request",
"status": 400,
"timestamp": "2025-01-20T18:18:22.923+00:00"
}{
"error": {
"type": "BAD_REQUEST_ERROR",
"message": "unsupported reward_type: INVALID, must be STATEMENT or DELAYED"
}
}Authorizations
Basic HTTP authentication. Allowed headers-- Authorization: Basic <base64(api_key_id:api_key_secret)>
Body
The Imprint Customer ID of the customer making the transaction intent
"F9B5A5E8-C8B0-4B7A-8E6B-0C8EE90A62CF"
Amount in min units.
10000
The 3-character currency code of the amount in ISO 4217 format (e.g., "USD")
"USD"
The network's unique identifier for the transaction. Examples include Visa Transaction ID, Mastercard Trace ID, and American Express Network Reference ID
The name of the merchant this transaction intent will be
"walmart"
Mailing address information
Show child attributes
Show child attributes
the RFC-3339 date when the transaction is expected to process. This does not have to be exact but it will be used as a data point to help link a transaction with a transaction intent. This example includes date and time to be explict, any RFC3339 date or date+time will be accepted
"2025-02-13T19:08:07.000Z"
{ "platform_version": "2.1.0" }
Response
Transaction intent created successfully
"5B30532B-5B5B-4826-8DE2-429C57B705FD"
"9B5E1EE0-2E1C-46E7-81B9-3C3917204BE4"
Currency amount
10000
The 3-character currency code of the amount in ISO 4217 format (e.g., "USD")
"USD"
CONFIRMED, CANCELED "CONFIRMED"
the RFC-3339 timestamp when the transaction intent was created
"2025-02-13T19:08:07.000Z"
The payment_method_id that this transaction_intent was executed with.
"DCBFC736-2286-42DD-897D-160DCA80AED2"
The network's unique identifier for the transaction. Examples include Visa Transaction ID, Mastercard Trace ID, and American Express Network Reference ID
The partner's unique transaction id
the RFC-3339 timestamp when the transaction intent was last updated
"2025-02-13T19:08:07.000Z"
Additional transaction intent data
{ "platform_version": "2.1.0" }