Get on-ramp status
curl --request GET \
--url https://api.zet.money/v1/onramp/{transactionId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.zet.money/v1/onramp/{transactionId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.zet.money/v1/onramp/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zet.money/v1/onramp/{transactionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zet.money/v1/onramp/{transactionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zet.money/v1/onramp/{transactionId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zet.money/v1/onramp/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "txn_01H8X3...",
"type": "onramp",
"status": "pending",
"chain": "base",
"amount": "100",
"tokenSymbol": "USDC",
"transactionHash": "0xabc...",
"reference": "order_12345",
"walletId": "wal_01H8X3...",
"fees": {
"platformFee": "<string>",
"providerFee": "<string>",
"totalFee": "<string>"
},
"ramp": {
"fiatAmount": "150000",
"fiatCurrency": "NGN",
"bankAccount": {
"bankName": "<string>",
"accountNumber": "<string>",
"accountName": "<string>"
}
},
"swap": {
"fromToken": "USDC",
"toToken": "ETH",
"fromAmount": "100",
"toAmount": "0.0285"
},
"transfer": {
"fromChain": "base",
"toChain": "ethereum",
"destinationAddress": "0xdef..."
},
"errorMessage": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key."
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Transaction not found."
}
}On-Ramp
Get On-Ramp Status
Poll the status of an on-ramp transaction. Prefer using webhooks for production integrations.
GET
/
onramp
/
{transactionId}
Get on-ramp status
curl --request GET \
--url https://api.zet.money/v1/onramp/{transactionId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.zet.money/v1/onramp/{transactionId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.zet.money/v1/onramp/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zet.money/v1/onramp/{transactionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zet.money/v1/onramp/{transactionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zet.money/v1/onramp/{transactionId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zet.money/v1/onramp/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "txn_01H8X3...",
"type": "onramp",
"status": "pending",
"chain": "base",
"amount": "100",
"tokenSymbol": "USDC",
"transactionHash": "0xabc...",
"reference": "order_12345",
"walletId": "wal_01H8X3...",
"fees": {
"platformFee": "<string>",
"providerFee": "<string>",
"totalFee": "<string>"
},
"ramp": {
"fiatAmount": "150000",
"fiatCurrency": "NGN",
"bankAccount": {
"bankName": "<string>",
"accountNumber": "<string>",
"accountName": "<string>"
}
},
"swap": {
"fromToken": "USDC",
"toToken": "ETH",
"fromAmount": "100",
"toAmount": "0.0285"
},
"transfer": {
"fromChain": "base",
"toChain": "ethereum",
"destinationAddress": "0xdef..."
},
"errorMessage": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key."
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Transaction not found."
}
}Authorizations
Your Zet API key. Contact zetdotmoney@gmail.com to obtain your keys.
