Query a transaction

Queries a transaction with a specified ID.

The query interacts with the related gateway account to obtain the result, amount, and currency. If after analysis, the transaction must be updated, see Update a transaction status.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

Responses
201

Transaction queried.

Response Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
transactionId
string (TransactionId) <= 50 characters

ID of the transaction.

result
string

Result of the transaction.

Enum: "abandoned" "approved" "canceled" "declined" "unknown"
status
string

Status of the transaction.

Enum: "completed" "conn-error" "disputed" "never-sent" "offsite" "partially-refunded" "pending" "refunded" "sending" "suspended" "timeout" "voided" "waiting-approval" "waiting-capture" "waiting-gateway" "waiting-refund"
amount
number <double>

Amount of the transaction.

currency
string = 3 characters

Currency code in ISO 4217 format.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

post/transactions/{id}/query
Request samples
Response samples
application/json
{
  • "transactionId": "txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0",
  • "result": "abandoned",
  • "status": "completed",
  • "amount": 0,
  • "currency": "USD"
}