curl --request POST \
--url https://staging-api.getpartna.com/v4/ramp \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-api-user: <api-key>' \
--data '
{
"accountName": "",
"accountNumber": "",
"bankCode": "",
"cancelPendingRampRequest": false,
"cryptoAddress": "",
"expireAction": "",
"fromAmount": 0,
"fromCurrency": "",
"fromNetwork": "",
"mobileNetwork": "",
"paymentNetwork": "",
"phoneID": "",
"rampExpTime": 0,
"rampReference": "",
"rateKey": "",
"sendingAddress": "",
"shortcode": "",
"toAmount": 0,
"toCurrency": "",
"toNetwork": "",
"type": ""
}
'import requests
url = "https://staging-api.getpartna.com/v4/ramp"
payload = {
"accountName": "",
"accountNumber": "",
"bankCode": "",
"cancelPendingRampRequest": False,
"cryptoAddress": "",
"expireAction": "",
"fromAmount": 0,
"fromCurrency": "",
"fromNetwork": "",
"mobileNetwork": "",
"paymentNetwork": "",
"phoneID": "",
"rampExpTime": 0,
"rampReference": "",
"rateKey": "",
"sendingAddress": "",
"shortcode": "",
"toAmount": 0,
"toCurrency": "",
"toNetwork": "",
"type": ""
}
headers = {
"x-api-key": "<api-key>",
"x-api-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-api-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accountName: '',
accountNumber: '',
bankCode: '',
cancelPendingRampRequest: false,
cryptoAddress: '',
expireAction: '',
fromAmount: 0,
fromCurrency: '',
fromNetwork: '',
mobileNetwork: '',
paymentNetwork: '',
phoneID: '',
rampExpTime: 0,
rampReference: '',
rateKey: '',
sendingAddress: '',
shortcode: '',
toAmount: 0,
toCurrency: '',
toNetwork: '',
type: ''
})
};
fetch('https://staging-api.getpartna.com/v4/ramp', 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://staging-api.getpartna.com/v4/ramp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountName' => '',
'accountNumber' => '',
'bankCode' => '',
'cancelPendingRampRequest' => false,
'cryptoAddress' => '',
'expireAction' => '',
'fromAmount' => 0,
'fromCurrency' => '',
'fromNetwork' => '',
'mobileNetwork' => '',
'paymentNetwork' => '',
'phoneID' => '',
'rampExpTime' => 0,
'rampReference' => '',
'rateKey' => '',
'sendingAddress' => '',
'shortcode' => '',
'toAmount' => 0,
'toCurrency' => '',
'toNetwork' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-api-user: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging-api.getpartna.com/v4/ramp"
payload := strings.NewReader("{\n \"accountName\": \"\",\n \"accountNumber\": \"\",\n \"bankCode\": \"\",\n \"cancelPendingRampRequest\": false,\n \"cryptoAddress\": \"\",\n \"expireAction\": \"\",\n \"fromAmount\": 0,\n \"fromCurrency\": \"\",\n \"fromNetwork\": \"\",\n \"mobileNetwork\": \"\",\n \"paymentNetwork\": \"\",\n \"phoneID\": \"\",\n \"rampExpTime\": 0,\n \"rampReference\": \"\",\n \"rateKey\": \"\",\n \"sendingAddress\": \"\",\n \"shortcode\": \"\",\n \"toAmount\": 0,\n \"toCurrency\": \"\",\n \"toNetwork\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-user", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging-api.getpartna.com/v4/ramp")
.header("x-api-key", "<api-key>")
.header("x-api-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"accountName\": \"\",\n \"accountNumber\": \"\",\n \"bankCode\": \"\",\n \"cancelPendingRampRequest\": false,\n \"cryptoAddress\": \"\",\n \"expireAction\": \"\",\n \"fromAmount\": 0,\n \"fromCurrency\": \"\",\n \"fromNetwork\": \"\",\n \"mobileNetwork\": \"\",\n \"paymentNetwork\": \"\",\n \"phoneID\": \"\",\n \"rampExpTime\": 0,\n \"rampReference\": \"\",\n \"rateKey\": \"\",\n \"sendingAddress\": \"\",\n \"shortcode\": \"\",\n \"toAmount\": 0,\n \"toCurrency\": \"\",\n \"toNetwork\": \"\",\n \"type\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.getpartna.com/v4/ramp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountName\": \"\",\n \"accountNumber\": \"\",\n \"bankCode\": \"\",\n \"cancelPendingRampRequest\": false,\n \"cryptoAddress\": \"\",\n \"expireAction\": \"\",\n \"fromAmount\": 0,\n \"fromCurrency\": \"\",\n \"fromNetwork\": \"\",\n \"mobileNetwork\": \"\",\n \"paymentNetwork\": \"\",\n \"phoneID\": \"\",\n \"rampExpTime\": 0,\n \"rampReference\": \"\",\n \"rateKey\": \"\",\n \"sendingAddress\": \"\",\n \"shortcode\": \"\",\n \"toAmount\": 0,\n \"toCurrency\": \"\",\n \"toNetwork\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"accountName": "JANE DOE",
"accountNumber": "9003001002",
"bankName": "Paystack-Titan",
"currentRate": 0.000597221725,
"discountApplied": "0",
"expiryDate": 1755873600,
"feeInFromCurrency": 16.74,
"feeInToCurrency": 0.01,
"fromAmount": 1000,
"fromCurrency": "NGN",
"fromNetwork": "naira",
"rampReference": "f32c3925063447a54905d31305a14da5",
"toAmount": 0.5872,
"toCurrency": "USDT",
"toNetwork": "tron",
"totalFeesInFromCurrency": 16.74,
"totalFeesInToCurrency": 0.01
},
"message": "request completed"
}{
"message": "ramp reference already exists"
}Onramp and Offramp
Initiates onramp and offramp requests.
curl --request POST \
--url https://staging-api.getpartna.com/v4/ramp \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-api-user: <api-key>' \
--data '
{
"accountName": "",
"accountNumber": "",
"bankCode": "",
"cancelPendingRampRequest": false,
"cryptoAddress": "",
"expireAction": "",
"fromAmount": 0,
"fromCurrency": "",
"fromNetwork": "",
"mobileNetwork": "",
"paymentNetwork": "",
"phoneID": "",
"rampExpTime": 0,
"rampReference": "",
"rateKey": "",
"sendingAddress": "",
"shortcode": "",
"toAmount": 0,
"toCurrency": "",
"toNetwork": "",
"type": ""
}
'import requests
url = "https://staging-api.getpartna.com/v4/ramp"
payload = {
"accountName": "",
"accountNumber": "",
"bankCode": "",
"cancelPendingRampRequest": False,
"cryptoAddress": "",
"expireAction": "",
"fromAmount": 0,
"fromCurrency": "",
"fromNetwork": "",
"mobileNetwork": "",
"paymentNetwork": "",
"phoneID": "",
"rampExpTime": 0,
"rampReference": "",
"rateKey": "",
"sendingAddress": "",
"shortcode": "",
"toAmount": 0,
"toCurrency": "",
"toNetwork": "",
"type": ""
}
headers = {
"x-api-key": "<api-key>",
"x-api-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-api-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accountName: '',
accountNumber: '',
bankCode: '',
cancelPendingRampRequest: false,
cryptoAddress: '',
expireAction: '',
fromAmount: 0,
fromCurrency: '',
fromNetwork: '',
mobileNetwork: '',
paymentNetwork: '',
phoneID: '',
rampExpTime: 0,
rampReference: '',
rateKey: '',
sendingAddress: '',
shortcode: '',
toAmount: 0,
toCurrency: '',
toNetwork: '',
type: ''
})
};
fetch('https://staging-api.getpartna.com/v4/ramp', 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://staging-api.getpartna.com/v4/ramp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountName' => '',
'accountNumber' => '',
'bankCode' => '',
'cancelPendingRampRequest' => false,
'cryptoAddress' => '',
'expireAction' => '',
'fromAmount' => 0,
'fromCurrency' => '',
'fromNetwork' => '',
'mobileNetwork' => '',
'paymentNetwork' => '',
'phoneID' => '',
'rampExpTime' => 0,
'rampReference' => '',
'rateKey' => '',
'sendingAddress' => '',
'shortcode' => '',
'toAmount' => 0,
'toCurrency' => '',
'toNetwork' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-api-user: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging-api.getpartna.com/v4/ramp"
payload := strings.NewReader("{\n \"accountName\": \"\",\n \"accountNumber\": \"\",\n \"bankCode\": \"\",\n \"cancelPendingRampRequest\": false,\n \"cryptoAddress\": \"\",\n \"expireAction\": \"\",\n \"fromAmount\": 0,\n \"fromCurrency\": \"\",\n \"fromNetwork\": \"\",\n \"mobileNetwork\": \"\",\n \"paymentNetwork\": \"\",\n \"phoneID\": \"\",\n \"rampExpTime\": 0,\n \"rampReference\": \"\",\n \"rateKey\": \"\",\n \"sendingAddress\": \"\",\n \"shortcode\": \"\",\n \"toAmount\": 0,\n \"toCurrency\": \"\",\n \"toNetwork\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-user", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging-api.getpartna.com/v4/ramp")
.header("x-api-key", "<api-key>")
.header("x-api-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"accountName\": \"\",\n \"accountNumber\": \"\",\n \"bankCode\": \"\",\n \"cancelPendingRampRequest\": false,\n \"cryptoAddress\": \"\",\n \"expireAction\": \"\",\n \"fromAmount\": 0,\n \"fromCurrency\": \"\",\n \"fromNetwork\": \"\",\n \"mobileNetwork\": \"\",\n \"paymentNetwork\": \"\",\n \"phoneID\": \"\",\n \"rampExpTime\": 0,\n \"rampReference\": \"\",\n \"rateKey\": \"\",\n \"sendingAddress\": \"\",\n \"shortcode\": \"\",\n \"toAmount\": 0,\n \"toCurrency\": \"\",\n \"toNetwork\": \"\",\n \"type\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.getpartna.com/v4/ramp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountName\": \"\",\n \"accountNumber\": \"\",\n \"bankCode\": \"\",\n \"cancelPendingRampRequest\": false,\n \"cryptoAddress\": \"\",\n \"expireAction\": \"\",\n \"fromAmount\": 0,\n \"fromCurrency\": \"\",\n \"fromNetwork\": \"\",\n \"mobileNetwork\": \"\",\n \"paymentNetwork\": \"\",\n \"phoneID\": \"\",\n \"rampExpTime\": 0,\n \"rampReference\": \"\",\n \"rateKey\": \"\",\n \"sendingAddress\": \"\",\n \"shortcode\": \"\",\n \"toAmount\": 0,\n \"toCurrency\": \"\",\n \"toNetwork\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"accountName": "JANE DOE",
"accountNumber": "9003001002",
"bankName": "Paystack-Titan",
"currentRate": 0.000597221725,
"discountApplied": "0",
"expiryDate": 1755873600,
"feeInFromCurrency": 16.74,
"feeInToCurrency": 0.01,
"fromAmount": 1000,
"fromCurrency": "NGN",
"fromNetwork": "naira",
"rampReference": "f32c3925063447a54905d31305a14da5",
"toAmount": 0.5872,
"toCurrency": "USDT",
"toNetwork": "tron",
"totalFeesInFromCurrency": 16.74,
"totalFeesInToCurrency": 0.01
},
"message": "request completed"
}{
"message": "ramp reference already exists"
}Authorizations
Body
BTC, ETH, USDC, USDT, CUSD, BNB, NGN, KES avalanche, base, binance, bitcoin, celo, ethereum, polygon, tron, solana, naira, mobileMoney, mpesa, kenyanshilling BTC, ETH, USDC, USDT, CUSD, BNB, NGN, KES avalanche, base, binance, bitcoin, celo, ethereum, polygon, tron, solana, naira, mobileMoney, mpesa, kenyanshilling accountname of the user (not bank account name)
users can only have one pending RampRequest at a time; if you have a pending RampRequest, set CancelPendingRampRequest as true; defaults to false
allows you to choose what should happen to your ramp request if the current rate is no longer applicable; default is useCurrentRate
useCurrentRate, deposit mobileNetwork, required if ToNetwork is kenyanshilling
Safaricom, Airtel paymentNetwork, required if ToNetwork is kenyanshilling
MOBILE, BUY_GOODS, PAYBILL allows you to set when you need the ramp to expire or cancel; default is 1 hour
Address from which the user will be sending or receiving funds
shortcode, required if ToNetwork is kenyanshilling
initiate offramp with cryptoToFiat type and onramp with fiatToCrypto type
fiatToCrypto, cryptoToFiat Was this page helpful?