Get a Transaction
GEThttps://api.tripleup.dev/partner/transactions/:id
Get a Transaction
Request
Path Parameters
Possible values: non-empty
and <= 100 characters
Responses
- 200
- 400
- 403
- 404
- 409
- 415
- 422
- 500
- 501
- 503
Transaction
- application/json
- Schema
- Example (auto)
Schema
HISTORIC_TRANSACTION
- The Transaction was more than 3 days old when it was submitted to triple. It is not eligible for a Reward.NOT_APPLICABLE
- The Transaction is not a Purchase or Return, or is otherwise not eligible for a Reward.NOT_ENROLLED
- The Card Account was not enrolled for Rewards at the time of the Transaction.QUEUED
- The Transaction is waiting for Offer matching.NO_ACTIVE_OFFER
- The Transaction did not match any active Offer or meet Offer terms.MATCHED
- The Transaction was matched to offers and is potentially eligible for a reward. Seereward_details
for more information.
The amount of the transaction. An error will be returned if the field contains fractional amounts smaller than those allowed by the transaction's currency code.
Possible values: > 0
12
The triple-defined ID for the entity.
Possible values: non-empty
and <= 100 characters
triple-abc-123
Partner-provided, external ID for a Card Account.
External IDs should be stable and never sensitive.
External IDs do not need to be globally unique, but we encourage the use of UUIDs. They must be unique for the Card Account within the scope of its parent Card Program.
To protect against accidental inclusion of sensitive personal information, external IDs may not be 9-digit numbers or use the US Tax ID format (###-##-####).
Possible values: non-empty
and <= 255 characters
, Value must match regular expression ^(?!\d{3}-\d\d-\d{4}$)
id-for-entity
The Bank Identification Number (BIN) of a payment card.
Possible values: >= 6 characters
and <= 6 characters
, Value must match regular expression ^\d{6}$
444789
The last four digits of the Primary Account Number (PAN) of a card.
Possible values: >= 4 characters
and <= 4 characters
, Value must match regular expression ^\d{4}$
0001
RFC 3339 date time used for creation and mod times
2021-12-01T01:59:59.000Z
3-character ISO-4217 currency code. Only USD is currently supported.
Contact your Triple representative for support with additional currencies. Note that some values are not supported, particularly test and fund codes.
Possible values: >= 3 characters
and <= 3 characters
, Value must match regular expression ^[A-Z]{3}$
USD
USD
Whether this is a debit or credit
The transaction description, usually the merchant name
Possible values: non-empty
and <= 256 characters
Pittsburgh Zoo
Partner-provided, external ID.
External IDs should be stable and never sensitive.
External IDs do not need to be globally unique, but we encourage the use of UUIDs. They must be unique for Transactions within the scope of the associated Card Account.
Possible values: non-empty
and <= 255 characters
, Value must match regular expression ^[a-z0-9]([-_\.a-z0-9]{0,48}[a-z0-9])?$
The triple-defined ID for the entity.
Possible values: non-empty
and <= 100 characters
triple-abc-123
The status of triple matching the Transaction to Offers.
Possible values: [HISTORIC_TRANSACTION
, QUEUED
, NOT_APPLICABLE
, NOT_ENROLLED
, NO_ACTIVE_OFFER
, MATCHED
]
merchant_address objectrequired
merchant_category object
The Merchant ID (MID) value
Possible values: non-empty
and <= 50 characters
9000012345
The type of Merchant ID
Possible values: [AMEX_SE_NUMBER
, DISCOVER_MID
, MC_AUTH_LOC_ID
, MC_AUTH_ACQ_ID
, MC_AUTH_ICA
, MC_CLEARING_LOC_ID
, MC_CLEARING_ACQ_ID
, MC_CLEARING_ICA
, MERCHANT_PROCESSOR
, NCR
, VISA_VMID
, VISA_VSID
]
VISA_VMID
The Token Requestor ID (TRID)
Possible values: >= 11 characters
and <= 11 characters
, Value must match regular expression ^[0-9]{11}$
40012345678
reward_details object[]
RFC 3339 date time used for creation and mod times
2021-12-01T01:59:59.000Z
The type of transaction. triple will only calculate offers based on a history of Purchases and Refunds.
Possible values: [CHECK
, DEPOSIT
, FEE
, PAYMENT
, PURCHASE
, REFUND
, TRANSFER
, WITHDRAWAL
]
PURCHASE
RFC 3339 date time used for creation and mod times
2021-12-01T01:59:59.000Z
{
"amount": 12,
"card_account_id": "triple-abc-123",
"card_account_external_id": "id-for-entity",
"card_bin": "444789",
"card_last_4": "0001",
"created_at": "2021-12-01T01:59:59.000Z",
"currency_code": "USD",
"debit": true,
"description": "Pittsburgh Zoo",
"external_id": "string",
"id": "triple-abc-123",
"matching_status": "HISTORIC_TRANSACTION",
"merchant_address": {
"city": "PITTSBURGH",
"complete": "7370 BAKER ST, STE 100\nPITTSBURGH, PA 15206",
"country_code": "US",
"country_subdivision_code": "PA",
"latitude": "40.440624",
"longitude": "-79.995888",
"postal_code": "15206",
"street_address": "7370 BAKER ST, STE 100\n"
},
"merchant_category": {
"code": "7998"
},
"processor_mid": "9000012345",
"processor_mid_type": "VISA_VMID",
"processor_trid": "40012345678",
"reward_details": [
{
"merchant_logo_url": "https://merchant-website.com/merchant-logo.png",
"offer_title": "string",
"offer_reward_rate": "string",
"offer_reward_type": "FIXED",
"offer_reward_value": "string",
"amount": "string",
"currency_code": "USD",
"notes": "string",
"offer_id": "triple-abc-123",
"rejection": "PURCHASE_AMOUNT_TOO_LOW",
"reward_id": "triple-abc-123",
"status": "REJECTED"
}
],
"timestamp": "2021-12-01T01:59:59.000Z",
"transaction_type": "PURCHASE",
"updated_at": "2021-12-01T01:59:59.000Z"
}
TripleBadRequestError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [400
]
content required
{
"status_code": 400,
"content": {
"details": [
null
],
"error_message": "The request is malformed.",
"exception": "TripleBadRequestError"
}
}
TripleNotAuthenticatedError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [401
]
content required
{
"status_code": 401,
"content": {
"details": [
null
],
"error_message": "Client authentication failed.",
"exception": "TripleNotAuthenticatedError"
}
}
TripleInvalidPathError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [404
]
content required
{
"status_code": 404,
"content": {
"details": [
null
],
"error_message": "The url path or path parameter is invalid.",
"exception": "TripleInvalidPathError"
}
}
TripleIntegrityError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [409
]
content required
{
"status_code": 409,
"content": {
"details": [
null
],
"error_message": "The request was well-formed but violated entity integrity constraints.",
"exception": "TripleIntegrityError"
}
}
TripleUnsupportedMediaType
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [415
]
content required
{
"status_code": 415,
"content": {
"details": [
null
],
"error_message": "The request defined an unsupported media type.",
"exception": "TripleUnsupportedMediaType"
}
}
TripleUnprocessableEntity
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [422
]
content required
{
"status_code": 422,
"content": {
"details": [
null
],
"error_message": "The request was well-formed but could not be processed.",
"exception": "TripleUnprocessableEntity"
}
}
TripleInternalServerError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [500
]
content required
{
"status_code": 500,
"content": {
"details": [
null
],
"error_message": "Triple was unable to process the request due to an internal error.",
"exception": "TripleInternalServerError"
}
}
TripleNotImplementedError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [501
]
content required
{
"status_code": 501,
"content": {
"details": [
null
],
"error_message": "The request failed because it requires a feature that is not yet implemented.",
"exception": "TripleNotImplementedError"
}
}
TripleServiceUnavailable
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [503
]
content required
{
"status_code": 503,
"content": {
"details": [
null
],
"error_message": "The request failed due to a triple service interruption.",
"exception": "TripleServiceUnavailable"
}
}
Authorization: oauth2
name: triple_authtype: oauth2scopes:api.tripleup.com/partner.publishers
description: The triple API uses OAuth2 with a client id and client secret. The URL to get an OAuth2 token is here: https://auth.tripleup.dev/oauth2/token This is an example of how to call the API from the command line. Code will need to be developed by the partner in their servers. ```bash # Fetch an access token TOKEN_URL=https://auth.tripleup.dev/oauth2/token CLIENT_ID=fake CLIENT_SECRET=another-fake # Fetch a space-separated list of scopes # If not provided, will return an access token # with all scopes to which the client has access SCOPE=api.tripleup.com/partner.publishers TOKEN_RESPONSE=$(curl -s -X POST $TOKEN_URL \ --user $CLIENT_ID:$CLIENT_SECRET \ --data grant_type=client_credentials \ --data-urlencode "scope=$SCOPE") # Use an access token ACCESS_TOKEN=$(echo $TOKEN_RESPONSE | jq -r '.access_token') TOKEN_TYPE=$(echo $TOKEN_RESPONSE | jq -r '.token_type') API_URL=https://api.tripleup.dev curl -X GET "$API_URL/partner/publishers" \ --header "Authorization: $TOKEN_TYPE $ACCESS_TOKEN" ``` See the _Client credentials grant_ section at the bottom of this [AWS blog post](https://aws.amazon.com/blogs/mobile/understanding-amazon-cognito-user-pool-oauth-2-0-grants/) for more information.flows: { "clientCredentials": { "tokenUrl": "https://auth.tripleup.dev/oauth2/token", "scopes": { "api.tripleup.com/partner.portfolios": "Manage Portfolio Manager details and portfolios of Publishers\n", "api.tripleup.com/partner.publishers": "Manage Publisher details, Card Programs, Consumers, Card Accounts,\nand Transactions\n", "api.tripleup.com/partner.view_offers": "View recommended Offers, search Offers, and view Offer details\n", "api.tripleup.com/partner.content_providers": "Manage Content Provider details, Merchants, Merchant Locations,\nand Offers\n" } } }
- python
- curl
- csharp
- go
- nodejs
- ruby
- php
- java
- powershell
- dart
- javascript
- c
- objective-c
- ocaml
- r
- swift
- kotlin
- rust
- HTTP.CLIENT
- REQUESTS
import http.client
conn = http.client.HTTPSConnection("api.tripleup.dev")
payload = ''
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer <token>'
}
conn.request("GET", "/partner/transactions/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))