Skip to main content
GET
/
v1
/
transaction
/
{transactionId}
Get Transaction
const url = 'https://sandboxapi.me-cash.com/v1/transaction/{transactionId}';
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}, body: undefined};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "message": "transaction fetched successfully",
  "status": "success",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "remark": "<string>",
    "reason": "<string>",
    "referenceNumber": "<string>",
    "type": "<string>",
    "state": "<string>",
    "quote": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "source": {
        "currency": "<string>",
        "country": "<string>",
        "amount": 123
      },
      "target": {
        "currency": "<string>",
        "country": "<string>",
        "amount": 123
      },
      "rate": 123,
      "fee": {
        "amount": 123
      }
    },
    "recipient": {
      "name": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "relationship": "<string>",
      "type": "<string>",
      "account": {
        "sortCode": "<string>",
        "accountNumber": "<string>",
        "branchCode": "<string>",
        "mobileProvider": "<string>"
      },
      "paymentChannel": "<string>",
      "currency": "<string>",
      "country": "<string>"
    },
    "created": "2023-11-07T05:31:56Z",
    "processed": "2023-11-07T05:31:56Z"
  }
}

Get Transaction

The Get Transaction API allows you to retrieve detailed information about a specific transaction using its unique transaction ID. This endpoint provides comprehensive transaction details including status, amounts, fees, and recipient information.

Transaction Details

When you retrieve a transaction, you’ll get the following information:
  • Transaction ID: Unique identifier for the transaction
  • Type: Type of transaction (payout, deposit, transfer, etc.)
  • Amount: Transaction amount in the specified currency
  • Status: Current status of the transaction
  • Reference: Your custom reference number
  • Timestamps: Creation and completion times
  • Fees: Detailed breakdown of all fees applied
  • Recipient Details: Information about the transaction recipient

Transaction Types

Outbound payments to external accounts or recipients.Common Statuses:
  • pending - Awaiting processing
  • processing - Being processed
  • completed - Successfully sent
  • failed - Processing failed
Inbound payments received into your account.Common Statuses:
  • pending - Awaiting confirmation
  • confirmed - Payment confirmed
  • completed - Successfully credited
Internal transfers between your own accounts.Common Statuses:
  • pending - Awaiting processing
  • completed - Successfully transferred

Status Meanings

Understanding transaction statuses is crucial for proper handling:
Transaction has been created but not yet processed. This is the initial state for most transactions.
Transaction is currently being processed by the payment provider or bank.
Transaction has been successfully completed and funds have been transferred.
Transaction could not be completed. Check the error details for specific failure reasons.
Transaction was cancelled either by you or the system before completion.

Fee Structure

Transactions may include various types of fees:
  • Processing Fee: Fee charged by meCash for processing the transaction
  • Network Fee: Fee charged by the payment network (bank, mobile money provider, etc.)
  • Currency Conversion Fee: Fee for currency conversion (if applicable)
  • International Transfer Fee: Additional fee for cross-border transactions

Use Cases

  • Transaction Monitoring: Track the status of your payments
  • Reconciliation: Match transactions with your internal records
  • Customer Support: Provide transaction details to customers
  • Audit Trail: Maintain records for compliance and auditing
  • Error Investigation: Debug failed transactions

Best Practices

  • Store transaction IDs for future reference
  • Implement polling or webhooks for real-time status updates
  • Handle different statuses appropriately in your application
  • Keep transaction records for accounting and compliance
  • Use the reference field to link transactions to your internal systems

Authorizations

x-api-key
string
header
required

Path Parameters

transactionId
string
required

The unique identifier of the transaction

Response

Transaction details retrieved successfully.

message
string
Example:

"transaction fetched successfully"

status
string
Example:

"success"

data
object
I