Get Transaction
Reads the current state of a transaction by user_id and ref_id.
Endpoint
http
POST /v1/get_transaction
Content-Type: application/jsonjson
{
"user_id": "user_00000001",
"ref_id": "ref_00000001"
}Parameters:
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
user_id | string | Yes | — | The user ID. |
ref_id | string | Yes | — | The transaction reference ID. |
Returns: GetTransactionResponse
Sample Request
bash
curl --location '<BASE_URL>/v1/get_transaction' \
--header 'Authorization: ATV <ACCESS_ID>:<SIGNATURE>' \
--header 'X-TV-Timestamp: <TIMESTAMP>' \
--header 'Content-Type: application/json' \
--data '{
"user_id": "user_00000001",
"ref_id": "ref_00000001"
}'Response
json
{
"data": {
"id": "69306e8a-68e3-43f6-97ae-02b8e7c356f7",
"ref_id": "ref_00000001",
"user_id": "user_00000001",
"status": "VERIFIED"
},
"errors": []
}| Field | Type | Description |
|---|---|---|
data.id | string | The transaction unique ID. |
data.ref_id | string | The transaction reference ID. |
data.user_id | string | The user ID. |
data.status | string | NOT_VERIFIED, VERIFIED or EXPIRED. |
errors | array | Detail of each failure. Empty on success. |
Errors
| Code | Description |
|---|---|
access_id_not_found | The API key is incorrect. |
transaction_invalid_request | Invalid transaction request. |
internal_server_error | Some unexpected error occurs while processing the request. |
| Code | Error code | Description |
|---|---|---|
401 | access_denied_exception | You are not authorized to perform the action. |
500 | internal_server_error | Some unexpected error occurs while processing the request. |
Next Steps
- Verify Transaction Authentication Key — move a transaction to
VERIFIED - Create Transaction — where the transaction was opened