Skip to main content
Version: 3.0.0

get_transaction

SEP-6SEP-24SEP-31

Retrieve a transaction by its ID.

Params

(1)

Please note that parameter structure within the request must contain named parameters as a by-name object, and not as positional arguments in a by-position array

1. id (required)

The unique identifier of this transaction.

string

A unique transaction identifier.

Result

(get_transactionResponse)

A platform transaction object

id
string

A unique transaction identifier.

sep
integer

Protocol of the transaction.

Allowed values:
62431
kind
string

The kind of transaction that is desired.

Allowed values:
undefinedreceivedepositdeposit-exchangewithdrawalwithdrawal-exchange
status
string

Processing status of the transaction.

Allowed values:
pending_anchorpending_trustpending_userpending_user_transfer_startpending_user_transfer_completeincompleteno_markettoo_smalltoo_largepending_senderpending_receiverpending_transaction_info_updatepending_customer_info_updatecompletedrefundedexpirederrorpending_externalpending_stellar
funding_method
string

Funding method used for transferring or settling assets.

type
string

DEPRECATED in favor of funding_method. Type of deposit, withdrawal or receive.

amount_expected
amount_expected

The amount expected in the payment.

amount
string

A stringified amount of an asset.

asset
string

An asset.

amount_in
amount_in

Amount expected/received by anchor.

amount
string

A stringified amount of an asset.

asset
string

An asset.

amount_out
amount_out

The amount expected to be sent by anchor to user at end of transaction.

amount
string

A stringified amount of an asset.

asset
string

An asset.

fee_details
fee_details

Description of fee charged by the anchor.

total
number
required
asset
string
required
details
array[object]

Details about fee charged.

quote_id
string

The id returned from a SEP-38 POST /quote response

started_at
string

Start date and time of transaction.

updated_at
string

The date and time of transaction reaching the current status.

completed_at
string

The date and time of transaction reaching completed or refunded status.

transfer_received_at
string

The date and time of receiving transfer.

user_action_required_by
string

Time and date by which user action is required.

message
string

Human readable explanation of transaction status

refunds
refunds

An object describing any on or offchain refund associated with this transaction.

amount_refunded
object

The total amount refunded in units of amount_in_asset.

amount_fee
object

The total amount charged in fees for processing all refund payments, in units of amount_in_asset.

payments
array[object]

A list of objects containing information on the individual payments made back as refunds.

stellar_transactions
array[stellar_transaction]
id
string
required

The Stellar transaction hash.

memo
string
memo_type
string

The memo type of the transaction in the Stellar network. Should be present if memo is not null.

Allowed values:
idhashtext
created_at
string
required

The date and time when the transaction is created.

envelop
string

The transaction envelope, containing all the transaction information.

payments
array[object]
required
source_account
string

The account being debited in the Stellar Network.

destination_account
string

The account being credited in the Stellar Network.

external_transaction_id
string

A unique transaction identifier.

memo
string
memo_type
string

The memo type of the transaction in the Stellar network. Should be present if memo is not null.

Allowed values:
idhashtext
refund_memo
string
refund_memo_type
string

The memo type of the transaction in the Stellar network. Should be present if memo is not null.

Allowed values:
idhashtext
client_domain
string

The domain of the client.

client_name
string

The domain of the client.

customers
object

The Identification info of the sending and receiving customers. If they were created through SEP-12, this object should contain the SEP-12 customer id. Otherwise, the account address of the customer.

sender
object

A object that identify end-user. For a SEP-12 customer, the id field should be sufficient to fully identify the customer in the business' Backend. For a SEP-31 Sending Anchor, the account and memo fields should be used. For a SEP-6 or SEP-24 Anchor, the account and memo fields should be used.

receiver
object

A object that identify end-user. For a SEP-12 customer, the id field should be sufficient to fully identify the customer in the business' Backend. For a SEP-31 Sending Anchor, the account and memo fields should be used. For a SEP-6 or SEP-24 Anchor, the account and memo fields should be used.

creator
object

A object that identify end-user. For a SEP-12 customer, the id field should be sufficient to fully identify the customer in the business' Backend. For a SEP-31 Sending Anchor, the account and memo fields should be used. For a SEP-6 or SEP-24 Anchor, the account and memo fields should be used.

id
string

The id of the customer registered through SEP-12.

account
string

Either the Stellar account or Muxed account address of the on-chain entity.

memo
string

The memo value identifying a customer with a shared account, where the shared account is account.

Example

Example request to the get_transaction method.

Request

curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 8675309,
"method": "get_transaction",
"params": {
"id": "1c186184-09ee-486c-82a7-aa7a0ab1119d"
}
}' \
https://platform-server.exampleanchor.com | jq

Result

{
"jsonrpc": "2.0",
"id": 8675309,
"result": {
"id": "1c186184-09ee-486c-82a7-aa7a0ab1119d",
"sep": "31",
"kind": "receive",
"status": "completed",
"funding_method": "SWIFT",
"amount_expected": {
"amount": "100",
"asset": "iso4217:USD"
},
"amount_in": {
"amount": "100.0000",
"asset": "iso4217:USD"
},
"amount_out": {
"amount": "98.0000000",
"asset": "stellar:USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5"
},
"fee_details": {
"total": "2.0000",
"asset": "iso4217:USD"
},
"quote_id": "quote-id",
"message": "Please don't forget to foo bar",
"refunds": {
"amount_refunded": {
"amount": "90.0000",
"asset": "iso4217:USD"
},
"amount_fee": {
"amount": "8.0000",
"asset": "iso4217:USD"
},
"payments": [
{
"id": "1111",
"id_type": "stellar",
"amount": {
"amount": "50.0000",
"asset": "iso4217:USD"
},
"fee": {
"amount": "4.0000",
"asset": "iso4217:USD"
}
},
{
"id": "2222",
"id_type": "stellar",
"amount": {
"amount": "40.0000",
"asset": "iso4217:USD"
},
"fee": {
"amount": "4.0000",
"asset": "iso4217:USD"
}
}
]
},
"stellar_transactions": [
{
"id": "stellar-tx-id",
"memo": "my-memo",
"memo_type": "text",
"envelope": "here_comes_the_envelope",
"payments": [
{
"id": "payment-id",
"amount": {
"amount": "100.0000",
"asset": "iso4217:USD"
},
"payment_type": "payment",
"source_account": "GB4GJAV4Q7DPGU7WI3H5TMVKEYZJ4JFLFEF3O3TRJKDPXK7NAMRBXWFL",
"destination_account": "GDIN5ZULIOT5YPBIXJXFGNH4TCNTDKIA4ZF6QQE3S2P5P44BHCQQJNDC"
}
]
}
],
"external_transaction_id": "external-tx-id",
"customers": {
"sender": {
"id": "sender-id"
},
"receiver": {
"id": "receiver-id"
}
},
"creator": {
"id": "creator-id"
}
}
}