Skip to main content
The offramp widget lets you redirect users to a Partna-managed flow where they can send crypto and receive local currency. Use this flow when you want Partna to handle the payout collection interface and transaction instructions.

Base URLs

EnvironmentURL
staginghttps://staging-pay.getpartna.com/v4/pay/offramp
productionhttps://pay.getpartna.com/v4/pay/offramp

Query parameters

ParameterRequiredDescription
amountYesAmount the user wants to convert
from_currencyYesCrypto the user is sending, such as USDT, USDC, BTC, or ETH
from_networkYesNetwork the user is sending from, such as tron, celo, or ethereum
to_currencyYesLocal payout currency, such as NGN, KES, or GHS
merchantYesYour Partna merchant username
addressNoWallet address the crypto will be sent from
referenceNoA hex string transaction reference

Registration modes

The widget supports two merchant-controlled registration modes:
ModeBehavior
openUsers can begin registration through the widget flow and complete onboarding later
closedOnly users you have already created can continue in the widget flow
You can manage this setting through Update Settings and inspect the current value with Get Settings. If your registration mode is open, you can use Register Account to create a pending registration. If your registration mode is closed, create the user up front with Create Account. The hosted flow collects the user’s payout details before finalizing the transaction.

How it works

1

Generate the redirect URL

Build a URL using the correct environment URL and the required query parameters.
2

Redirect the user

Send the user to the hosted Partna offramp flow from your app or website.
3

User submits payout details and sends crypto

The user enters the required payout details in the hosted flow and transfers the specified crypto amount.
4

Receive webhook updates

Partna sends Offramp webhook events as the transaction progresses. See Webhooks for verification details.
5

Handle completion

Once the transaction reaches completed, the local currency payout has been sent.

Build the redirect URL

const redirectURL =
  environment === "staging"
    ? "https://staging-pay.getpartna.com/v4/pay/offramp"
    : "https://pay.getpartna.com/v4/pay/offramp";

const params = new URLSearchParams();
params.append("from_currency", fromCurrency);
params.append("to_currency", toCurrency);
params.append("from_network", fromNetwork);
params.append("amount", amount);
if (address) {
  params.append("address", address);
}
params.append("merchant", merchant);

if (reference) {
  params.append("reference", reference);
}

const url = `${redirectURL}?${params.toString()}`;
window.location.href = url;

Example redirect URL

https://pay.getpartna.com/v4/pay/offramp?amount=0.11&from_currency=CUSD&from_network=celo&to_currency=KES&address=0x00B6845c6F47C770cE630B96df9BD4A6dA91C65d&merchant=your-merchant-username&reference=a13953b727b9f20ab1ab76dfd9abe4ca
For staging, use https://staging-pay.getpartna.com/v4/pay/offramp instead.

Transaction lifecycle

Partna emits Offramp webhooks with these statuses:
StatusMeaning
pendingThe offramp request has been created and is awaiting crypto payment
receivedPartna has received the user’s crypto transfer
processingConversion or payout is currently being processed
completedThe local currency payout is complete

Sample webhook payloads

pending

{
  "event": "Offramp",
  "data": {
    "transactionReference": "a13953b727b9f20ab1ab76dfd9abe4ca",
    "status": "pending",
    "timestamp": 1773706850,
    "fromAmount": 0.11,
    "toAmount": 12.93,
    "fromCurrency": "CUSD",
    "toCurrency": "KES",
    "fromNetwork": "celo",
    "toNetwork": "kenyanshilling",
    "totalFeesInFromCurrency": 0.0089,
    "totalFeesInToCurrency": 1.14,
    "sendingAddress": "0x00B6845c6F47C770cE630B96df9BD4A6dA91C65d",
    "paymentAddress": "0xc89f5afe4d5c13daeef96164abc8001c1e320718",
    "expireAt": 1773710450,
    "toExternalAccount": "Safaricom::0726140198::::MOBILE"
  },
  "signature": "BASE64_SIGNATURE"
}

received

{
  "event": "Offramp",
  "data": {
    "transactionReference": "a13953b727b9f20ab1ab76dfd9abe4ca",
    "status": "received",
    "timestamp": 1773706902,
    "transactionHash": "0xeefee6c33e572458e6aef553b1572c58084ad59d7f3bcec9654d60810def6d2b",
    "fromAmount": 0.11,
    "fromCurrency": "CUSD",
    "toCurrency": "KES",
    "sendingAddress": "0x00B6845c6F47C770cE630B96df9BD4A6dA91C65d"
  },
  "signature": "BASE64_SIGNATURE"
}

processing

{
  "event": "Offramp",
  "data": {
    "transactionReference": "a13953b727b9f20ab1ab76dfd9abe4ca",
    "status": "processing",
    "timestamp": 1773706921,
    "fromAmount": 0.11,
    "toAmount": 12.9392,
    "fromCurrency": "CUSD",
    "toCurrency": "KES",
    "fromNetwork": "celo",
    "toNetwork": "kenyanshilling",
    "sendingAddress": "0x00B6845c6F47C770cE630B96df9BD4A6dA91C65d",
    "expireAt": 1773710450,
    "toExternalAccount": "Safaricom::0726140198::::MOBILE"
  },
  "signature": "BASE64_SIGNATURE"
}

completed

{
  "event": "Offramp",
  "data": {
    "transactionReference": "a13953b727b9f20ab1ab76dfd9abe4ca",
    "status": "completed",
    "timestamp": 1773706921,
    "sessionId": "DFE48F597F",
    "fromAmount": 0.11,
    "toAmount": 12.9392,
    "fromCurrency": "CUSD",
    "toCurrency": "KES",
    "fromNetwork": "celo",
    "toNetwork": "kenyanshilling",
    "sendingAddress": "0x00B6845c6F47C770cE630B96df9BD4A6dA91C65d",
    "toExternalAccount": "Safaricom::0726140198::::MOBILE"
  },
  "signature": "BASE64_SIGNATURE"
}

When to use the hosted widget

Use the hosted widget when you want:
  • A redirect-based offramp experience with less frontend work
  • Partna to collect payout details inside the hosted flow
  • A fast way to launch crypto-to-fiat payouts
Use the API-based Offramp Guide when you need to manage account resolution, payout details, and user experience yourself.