> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.clixpesa.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.clixpesa.com/_mcp/server.

# Get a transaction

GET https://ramps.clixpesa.com/transactions/{id}

Returns a transaction by its Clixpesa transaction ID, or null when it does not exist.

Reference: https://docs.clixpesa.com/api-reference/ramps-api/transactions/get-transaction

## Servers

- `https://ramps.clixpesa.com` (Production, default)
- `http://localhost:3000` (Local development and Base Sepolia mock onramp)

## Request

### Path parameters

- `id` (string, required) — Clixpesa transaction ID, with or without its 0x prefix.

## Response

### 200

Response for status 200

- `id` (string, required)
- `type` (TransactionsIdGetResponsesContentApplicationJsonSchemaType, required)
- `amount` (string, required)
- `currency` (string, required)
- `status` (TransactionsIdGetResponsesContentApplicationJsonSchemaStatus, required) — Current transaction lifecycle state.
- `createdAt` (double, required) — Unix timestamp in seconds.
- `updatedAt` (double, required) — Unix timestamp in seconds.
- `from` (string, optional, nullable)
- `to` (string, optional, nullable)
- `chain` (string, optional, nullable)
- `txHash` (string, optional, nullable)
- `paymentRail` (TransactionsIdGetResponsesContentApplicationJsonSchemaPaymentRail, optional, nullable) — Rail used to collect or deliver fiat funds.
- `metadata` (TransactionsIdGetResponsesContentApplicationJsonSchemaMetadata, optional, nullable)

## Errors

### 422 Unprocessable Entity Error

The request could not be completed.

- `error` (string, required)

### 500 Internal Server Error

The request could not be completed.

- `error` (string, required)

## Types

### TransactionsIdGetResponsesContentApplicationJsonSchemaType

- "onramp"
- "offramp"
- "transfer"
- "deposit"
- "swap"

### TransactionsIdGetResponsesContentApplicationJsonSchemaStatus

Current transaction lifecycle state.

- "pending"
- "processing"
- "complete"
- "failed"
- "cancelled"

### TransactionsIdGetResponsesContentApplicationJsonSchemaPaymentRail

Rail used to collect or deliver fiat funds.

- "momo"
- "paybill"
- "sepa"
- "ach"
- "crypto"
- "wire"
- "swift"

### TransactionsIdGetResponsesContentApplicationJsonSchemaMetadata

- `referenceId` (string, required)
- `refAmount` (string, optional, nullable)
- `refCurrency` (string, optional, nullable)
- `bankName` (string, optional, nullable)
- `accountName` (string, optional, nullable)
- `accountNumber` (string, optional, nullable)
- `provider` (string, optional, nullable)
- `refTxCode` (string, optional, nullable)

## Examples

**Response**

```json
{
  "id": "0xdocs-mock-onramp-001",
  "type": "onramp",
  "amount": "1",
  "currency": "USDC",
  "status": "pending",
  "createdAt": 1.1,
  "updatedAt": 1.1,
  "from": "string",
  "to": "string",
  "chain": "string",
  "txHash": "string",
  "paymentRail": "momo",
  "metadata": {
    "referenceId": "string",
    "refAmount": "string",
    "refCurrency": "string",
    "bankName": "string",
    "accountName": "string",
    "accountNumber": "string",
    "provider": "string",
    "refTxCode": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://ramps.clixpesa.com/transactions/0xdocs-mock-onramp-001"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://ramps.clixpesa.com/transactions/0xdocs-mock-onramp-001';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://ramps.clixpesa.com/transactions/0xdocs-mock-onramp-001"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://ramps.clixpesa.com/transactions/0xdocs-mock-onramp-001")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://ramps.clixpesa.com/transactions/0xdocs-mock-onramp-001")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://ramps.clixpesa.com/transactions/0xdocs-mock-onramp-001');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://ramps.clixpesa.com/transactions/0xdocs-mock-onramp-001");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://ramps.clixpesa.com/transactions/0xdocs-mock-onramp-001")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```