Get Reward Transaction
curl --request GET \
--url https://api-staging.withbenji.com/transactions/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api-staging.withbenji.com/transactions/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-staging.withbenji.com/transactions/{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://api-staging.withbenji.com/transactions/{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-api-key: <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://api-staging.withbenji.com/transactions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://api-staging.withbenji.com/transactions/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.withbenji.com/transactions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "ok",
"data": {
"reward_transaction": {
"campaign_id": "675976-khkgyt7-9876-khfiy",
"created_date": "2025-08-18T20:45:01.186277+00:00",
"external_id": null,
"external_order_id": null,
"external_partner_transaction_id": null,
"id": 5924,
"merchant_id": 41,
"partner_id": 5,
"partnership_uuid": "partnership-uuid",
"trigger_event_uuid_id": "trigger-event-uuid",
"trigger_event_id": 12345,
"reward_amount": 600,
"transaction_amount": 0.0,
"transaction_status": 4,
"transaction_type": 1,
"user_uuid": "user-uuid"
}
}
}
{
"code": "invalid_token",
"message": "Invalid token"
}
{
"code": "unauthorized_request",
"message": "Token is not authorized to make this request"
}
{
"code": "transaction_does_not_exist",
"message": "The transaction does not exist"
}
Reward API
Get Reward Transaction
Endpoint to retrieve information regarding a reward transaction
GET
/
transactions
/
{id}
Get Reward Transaction
curl --request GET \
--url https://api-staging.withbenji.com/transactions/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api-staging.withbenji.com/transactions/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-staging.withbenji.com/transactions/{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://api-staging.withbenji.com/transactions/{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-api-key: <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://api-staging.withbenji.com/transactions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://api-staging.withbenji.com/transactions/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.withbenji.com/transactions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "ok",
"data": {
"reward_transaction": {
"campaign_id": "675976-khkgyt7-9876-khfiy",
"created_date": "2025-08-18T20:45:01.186277+00:00",
"external_id": null,
"external_order_id": null,
"external_partner_transaction_id": null,
"id": 5924,
"merchant_id": 41,
"partner_id": 5,
"partnership_uuid": "partnership-uuid",
"trigger_event_uuid_id": "trigger-event-uuid",
"trigger_event_id": 12345,
"reward_amount": 600,
"transaction_amount": 0.0,
"transaction_status": 4,
"transaction_type": 1,
"user_uuid": "user-uuid"
}
}
}
{
"code": "invalid_token",
"message": "Invalid token"
}
{
"code": "unauthorized_request",
"message": "Token is not authorized to make this request"
}
{
"code": "transaction_does_not_exist",
"message": "The transaction does not exist"
}
The
x-api-key header value to be used on this API is your partner API key, which can be generated through the dashboard.string
required
Unique identifier of the reward transaction to retrieve (UUID)
Return values
object
A reward_transaction object property
Hide properties
Hide properties
integer
Benji Platform reward transaction identifier
integer
The ID of the partner associated with this transaction in the Benji Platform
string
The UUID of the partnership associated with this transaction in the Benji Platform
integer
The ID of the campaign triggered for this transaction in the Benji Platform
string
The UUID of the user associated with the transaction in the Benji Platform
string
The UUID of the trigger event associated with the transaction in the Benji Platform
integer
The ID of the trigger event associated with the transaction in the Benji Platform
integer
The ID of the merchant partner associated with this campaign in the Benji Platform
integer
The total dollar amount of the transaction
integer
The total amount of rewards earned or redeemed on this transaction
string
The external reference of the order on the merchant partner system
integer
Integer representing an enum of one of the following transaction type values:
Show possible transaction type values
Show possible transaction type values
- EARN (1) : Indicating an earn transaction type
- REDEEM (2) : Indicating a redeem transaction type
integer
Integer representing an enum of one of the following transaction status values:
Show possible transaction status values
Show possible transaction status values
- INITIATED (1) : Transaction has been initiated
- PENDING (2) : Transaction is pending and has not been confirmed by the partner yet
- COMPLETED (3) : Transaction has been completed successfully
- ERROR (4) : An error occurred during processing
- REVERSED (5) : Transaction was reversed
- FAILED (6) : Transaction was rejected by the partner
- CANCELLED (7) : Transaction was cancelled
datetime
The transaction date
{
"code": "ok",
"data": {
"reward_transaction": {
"campaign_id": "675976-khkgyt7-9876-khfiy",
"created_date": "2025-08-18T20:45:01.186277+00:00",
"external_id": null,
"external_order_id": null,
"external_partner_transaction_id": null,
"id": 5924,
"merchant_id": 41,
"partner_id": 5,
"partnership_uuid": "partnership-uuid",
"trigger_event_uuid_id": "trigger-event-uuid",
"trigger_event_id": 12345,
"reward_amount": 600,
"transaction_amount": 0.0,
"transaction_status": 4,
"transaction_type": 1,
"user_uuid": "user-uuid"
}
}
}
{
"code": "invalid_token",
"message": "Invalid token"
}
{
"code": "unauthorized_request",
"message": "Token is not authorized to make this request"
}
{
"code": "transaction_does_not_exist",
"message": "The transaction does not exist"
}
Note that you will only receive data that you as a loyalty partner or merchant partner are allowed to see based on the permissions in the access token you provide to the API.
Was this page helpful?
⌘I