Skip to main content
POST
/
v1
/
ramp
/
order
Create Transaction
const form = new FormData();
form.append('transaction', '{"recipient":{"name":"Pastor Bright","type":"BUSINESS","account":{"accountNumber":"0867543789","sortCode":"044"}},"quoteId":"3f41daaa-029c-44a2-b7c6-ed922a68177b","reason":"Gift","remark":"thanks"}');
form.append('invoice', '<string>');

const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};

options.body = form;

fetch('https://sandboxapi.me-cash.com/v1/ramp/order', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "status": "success",
  "message": "order successfully created",
  "data": {
    "id": "80709a38-1e22-40f2-ad05-ac181f611531",
    "type": "SEND",
    "category": "OFF_RAMP",
    "state": "PENDING",
    "referenceNumber": "XXEYBAHUJORQB",
    "quote": {
      "id": "54728dcf-650d-4eb5-994f-95a060677487",
      "source": {
        "currency": "USDC",
        "symbol": "USDC",
        "type": "CRYPTOCURRENCY",
        "amount": 5,
        "network": {
          "id": "f8fc48ff-81e6-4b5f-9a70-44fb744e3572",
          "name": "Polygon Amoy",
          "blockchain": "MATIC-AMOY"
        }
      },
      "target": {
        "currency": "NGN",
        "country": "NG",
        "type": "FIAT",
        "paymentChannel": "BANK_TRANSFER",
        "amount": 5537.1
      },
      "rate": 0.000903,
      "fees": [
        {
          "amount": 0.025,
          "gas": {
            "type": "MEDIUM",
            "total": 0.29237925
          }
        }
      ],
      "summary": {
        "total": 5.31737925
      }
    },
    "recipient": {
      "id": "95475698-61d2-46ee-b148-b882956a0eff",
      "name": "Pastor Bright",
      "type": "BUSINESS",
      "account": {
        "sortCode": "044",
        "accountNumber": "0867543789"
      }
    },
    "created": "2025-06-03T22:56:20.748484620"
  }
}

Create Transaction

This endpoint executes a transaction (either off-ramp to fiat or crypto-to-crypto transfer) using a previously generated quoteId.

Endpoint

POST {{baseURL}}/v1/ramp/order

Headers

HeaderValueRequiredDescription
Content-Typeapplication/jsonYesSpecifies that the request body is JSON.
x-api-keyYOUR_API_KEYYesAPI key for authentication.

Request Examples

1. Off-Ramp (Crypto-to-Fiat) Payout

This request sends cryptocurrency out of the wallet and initiates a bank payout to a fiat recipient.
curl --location '{{baseURL}}/v1/ramp/order' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "recipient": {
        "name": "Pastor Bright",
        "type": "BUSINESS",
        "account": {
            "accountNumber": "0867543789",
            "sortCode": "044"
        }
    },
    "quoteId": "3f41daaa-029c-44a2-b7c6-ed922a68177b",
    "reason": "Gift",
    "remark": "thanks"
}'

2. Crypto-to-Crypto Transfer

This request converts or transfers assets directly to an external blockchain wallet address.
curl --location '{{baseURL}}/v1/ramp/order' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "recipient": {
        "symbol": "USDC",
        "blockchain": "MATIC-AMOY",
        "address": "0xd62acd62fdb155afaa5d12c6caf01119d413dfd9"
    },
    "quoteId": "59628a6c-3d05-406a-ad39-77f92b09137c",
    "reason": "Test",
    "remark": "Check"
}'

Request Body Breakdown

FieldTypeRequiredDescription
quoteIdstringYesThe UUID of the quote returned from the /quote endpoint.
reasonstringYesPurpose of the transaction (e.g. "Salary", "Gift").
remarkstringNoAdditional comments/memo.
recipientobjectYesRecipient details depending on type.
recipient.namestringYes (offramp)Full name of the beneficiary.
recipient.typestringYes (offramp)Recipient type ("INDIVIDUAL", "BUSINESS").
recipient.account.accountNumberstringYes (offramp)Bank account number.
recipient.account.sortCodestringYes (offramp)Bank sort code.
recipient.addressstringYes (crypto)Wallet address.
recipient.blockchainstringYes (crypto)Target blockchain network.
recipient.symbolstringYes (crypto)Target cryptocurrency symbol.

Success Response (Off-Ramp) 201 Created

{
    "message": "order successfully created",
    "status": "success",
    "data": {
        "id": "80709a38-1e22-40f2-ad05-ac181f611531",
        "type": "SEND",
        "category": "OFF_RAMP",
        "state": "PENDING",
        "referenceNumber": "XXEYBAHUJORQB",
        "quote": {
            "id": "54728dcf-650d-4eb5-994f-95a060677487",
            "source": {
                "currency": "USDC",
                "symbol": "USDC",
                "type": "CRYPTOCURRENCY",
                "amount": 5,
                "network": {
                    "id": "f8fc48ff-81e6-4b5f-9a70-44fb744e3572",
                    "name": "Polygon Amoy",
                    "blockchain": "MATIC-AMOY"
                }
            },
            "target": {
                "currency": "NGN",
                "country": "NG",
                "type": "FIAT",
                "paymentChannel": "BANK_TRANSFER",
                "amount": 5537.1
            },
            "rate": 0.000903,
            "fees": [
                {
                    "amount": 0.025,
                    "gas": {
                        "type": "MEDIUM",
                        "total": 0.29237925
                    }
                }
            ],
            "summary": {
                "total": 5.31737925
            }
        },
        "recipient": {
            "id": "95475698-61d2-46ee-b148-b882956a0eff",
            "name": "Pastor Bright",
            "type": "BUSINESS",
            "account": {
                "sortCode": "044",
                "accountNumber": "0867543789"
            }
        },
        "created": "2025-06-03T22:56:20.748484620"
    }
}

Success Response (Crypto-to-Crypto) 201 Created

{
    "message": "order successfully created",
    "status": "success",
    "data": {
        "id": "da0ab3cd-a608-4b0a-8de5-710112e2cb06",
        "type": "SEND",
        "category": "CRYPTOCURRENCY",
        "state": "PENDING",
        "referenceNumber": "PENUHSL7PRXEF",
        "quote": {
            "id": "6d70f89d-bc23-45c1-8504-d805ccd22235",
            "source": {
                "currency": "USDC",
                "symbol": "USDC",
                "blockchain": "MATIC-AMOY",
                "type": "CRYPTOCURRENCY",
                "amount": 2
            },
            "target": {
                "currency": "USDC",
                "symbol": "USDC",
                "blockchain": "MATIC-AMOY",
                "type": "CRYPTOCURRENCY",
                "amount": 2
            },
            "rate": 1,
            "fees": {
                "amount": 0.01,
                "gas": {
                    "type": "LOW",
                    "amount": 0.01875321
                }
            },
            "summary": {
                "total": 2.02875321
            }
        },
        "recipient": {
            "id": "962aabb8-f74e-4e1f-aab1-99467b9cf3b5",
            "address": "0xd62acd62fdb155afaa5d12c6caf01119d413dfd9",
            "network": {
                "id": "f8fc48ff-81e6-4b5f-9a70-44fb744e3572",
                "name": "USDC",
                "blockchain": "MATIC-AMOY"
            }
        },
        "created": "2025-06-04T12:04:00.817316767"
    }
}

Error Responses

HTTP StatusError CodeMessageDescription
400INVALID_INPUTInvalid request payloadRequired parameters are missing or formatted incorrectly.
401UNAUTHORIZEDMissing or invalid API keyThe x-api-key header is missing or incorrect.
422QUOTE_EXPIREDStale quoteThe quote associated with the quoteId has expired.
500SERVER_ERRORInternal server errorAn unexpected error occurred on the server.

Authorizations

x-api-key
string
header
required

Body

multipart/form-data
transaction
string
required

JSON string representing the transaction payload.

Example:

"{\"recipient\":{\"name\":\"Pastor Bright\",\"type\":\"BUSINESS\",\"account\":{\"accountNumber\":\"0867543789\",\"sortCode\":\"044\"}},\"quoteId\":\"3f41daaa-029c-44a2-b7c6-ed922a68177b\",\"reason\":\"Gift\",\"remark\":\"thanks\"}"

invoice
file

Optional invoice file (PDF).

Response

Order successfully created.

status
string
Example:

"success"

message
string
Example:

"order successfully created"

data
object