Offramps

On this page, we’ll dive into the different offramp transaction endpoints you can use to manage offramp transaction programmatically. You can use these endpoints to retrieve an list of offramp transactions, create an new offramp transaction, update an offramp transaction, and delete a offramp transaction. You can also use these endpoints to retrieve a list of offramp transactions for a specific organization.

The offramp model

The offramp model is the data structure that represents a offramp transaction in Rampable. The following attributes are associated with the offramp model:

Properties

  • Name
    id
    Type
    string
    Description

    24 alphanumeric, unique identifier for the offramp transaction.

  • Name
    offrampId
    Type
    string
    Description

    UUID version 4, unique identifier for the offramp transaction.

  • Name
    sender.id
    Type
    string
    Description

    Unique identifier for the sender, consist of 24 charachter of alphanumeric.

  • Name
    sender.name
    Type
    string
    Description

    The name of the sender.

  • Name
    sender.email
    Type
    string
    Description

    The email address of the sender.

  • Name
    sender.walletAddress
    Type
    string
    Description

    The wallet address of the sender.

  • Name
    receiver.id
    Type
    string
    Description

    Unique identifier for the receiver, consist of 24 charachter of alphanumeric.

  • Name
    receiver.name
    Type
    string
    Description

    The name of the receiver.

  • Name
    receiver.email
    Type
    string
    Description

    The email address of the receiver.

  • Name
    receiver.accountNumber
    Type
    string
    Description

    The account number of the receiver.

  • Name
    receiver.bankName
    Type
    string
    Description

    The bank name of the receiver.

  • Name
    receiver.ifsc
    Type
    string
    Description

    The IFSC (Indian Financial System Code) of the receiver.

  • Name
    receiver.achNumber
    Type
    string
    Description

    The ACH (Automated Clearing House) number of the receiver.

  • Name
    receiver.fedwireNumber
    Type
    string
    Description

    The fedwire number of the receiver.

  • Name
    receiver.ibanNumber
    Type
    string
    Description

    The IBAN (International Bank Account Number) of the receiver.

  • Name
    feeDetail.rate_amount
    Type
    string
    Description

    The exchange rate between fiat currency and given crypto currency.

  • Name
    feeDetail.total_fee_amount
    Type
    number
    Description

    The amount of fee in crypto currency.

  • Name
    feeDetail.total_fee_amount_in_currency
    Type
    string
    Description

    The amount of fee in fiat currency.

  • Name
    inputAmount
    Type
    number
    Description

    The amount of the offramp in the input currency. This value will have the same value as inputAmountExact

  • Name
    inputAmountExact
    Type
    number
    Description

    The exact amount of the offramp in the input currency. This value will have the same value as inputAmount

  • Name
    outputAmount
    Type
    number
    Description

    The amount of the offramp in the output currency. This value is the transaction amount before calculating the fee.

  • Name
    outputAmountExact
    Type
    number
    Description

    The exact amount of the offramp in the output currency. This value is the transaction amount before calculating the fee.

  • Name
    inputCurrency
    Type
    string
    Description

    The input currency (crypto) of the offramp transaction.

  • Name
    outputCurrency
    Type
    string
    Description

    The output currency (fiat) of the offramp transaction.

  • Name
    reason
    Type
    string
    Description

    The reason for the offramp transaction.

  • Name
    description
    Type
    string
    Description

    The description for the offramp transaction.

  • Name
    status
    Type
    string
    Description

    The status of the offramp transaction. This can be either pending, processing, completed, or failed.

  • Name
    organizationId
    Type
    string
    Description

    Unique identifier for the organization associated with the offramp transaction.

  • Name
    organizationName
    Type
    string
    Description

    The name of the organization associated with the offramp transaction.

  • Name
    transactionHash
    Type
    string
    Description

    The transaction hash of the offramp transaction, this would be available after the transaction is paid.

  • Name
    blockchain
    Type
    string
    Description

    The blockchain of the offramp transaction. (e.g. Ethereum)

  • Name
    blockchainType
    Type
    string
    Description

    The blockchain type of the offramp transaction.(e.g. EVM)

  • Name
    memo
    Type
    string
    Description

    The offramp transaction's memo, this might be required on some blockchain (e.g. Stellar).

  • Name
    payOutWallet
    Type
    string
    Description

    The wallet address of the offramp transaction that the sender would have to pay.

  • Name
    cryptoId
    Type
    string
    Description

    The crypto currency and the blockchain of the offramp transaction. (e.g. usdt-polygon). See Reference

  • Name
    expiredDate
    Type
    string
    Description

    The expired date of the offramp transaction. Using ISO 8601 format.

  • Name
    createdAt
    Type
    string
    Description

    The date the offramp transaction was created. Using ISO 8601 format.

  • Name
    updatedAt
    Type
    string
    Description

    The date the offramp transaction was last updated. Using ISO 8601 format.


GET/v1/offramp/quote

Quote

This endpoint allows you to get quote price for offramp transaction. To get quote price, you must provide amount, inputCurrency, outputCurrency.

Required attributes

  • Name
    amount
    Type
    number
    Description

    The amount of the offramp transaction in the input currency.

  • Name
    inputCurrency
    Type
    string
    Description

    The crypto id of the offramp transaction (e.g. "usdc-polygon"). See Reference

  • Name
    outputCurrency
    Type
    string
    Description

    The currency of the offramp transaction (e.g. "IDR"). See Reference

Optional attributes

  • Name
    withLimit
    Type
    boolean
    Description

    Using the withLimit means you can get the quote using only the client secret without having to include your user access token in request headers as well, which is useful for client-side applications.

    It means there is no daily limit calculation applied for the quote based on the user's limits when you use withLimit equal to false (pure quote only).

Request

GET
/v1/offramp/quote
curl --location 'https://sandbox.rampable.co/v1/offramp/quote?amount=10&inputCurrency=usdc-polygon&outputCurrency=SGD&withLimit=true' \

--header 'x-client-secret: d9659c0857a91ae28a59ce9f9a8155f1b37ba1df91d4b4a50b3ecbb9ecdc2667' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Response

{
    "statusCode": 200,
    "message": "getQuotePriceHandler successfully",
    "data": {
        "status": true,
        "coin": "usdc",
        "currency": "IDR",
        "amount": 10,
        "rate_amount": 15539.445,
        "amount_in_currency": 155394.45,
        "total_fee_percentage": 3.867141758923822,
        "total_fee_amount": 0.3867141758923822,
        "total_fee_amount_in_currency": 6009.323667,
        "total_received_amount": 9.613285824107617,
        "total_received_amount_in_currency": 149385.126333,
        "payout_wallet": "0x03XXXXXXX4",
        "expiry_time": 15
    }
}

GET/v1/offramp

List all offramp transactions

This endpoint allows you to retrieve a paginated list of all your offramp transactions. By default, a maximum of ten offramp transactions are shown per page.

Query Params attributes

  • Name
    limit
    Type
    integer
    Description

    Limit the number of offramp transactions returned.

  • Name
    page
    Type
    integer
    Description

    Specify the page number of the offramp transactions to retrieve.

  • Name
    sort
    Type
    string
    Description

    Sort the offramp transactions by a specific field. You can sort by createdAt or updatedAt. By default, offramp transactions are sorted by createdAt. You can also sort in reverse order by adding a hyphen (-) before the field you want to sort by.

  • Name
    search
    Type
    string
    Description

    Search for a offramp transaction by name or email.

  • Name
    status
    Type
    string
    Description

    Filter offramp transactions by status. This can be either pending, processing, completed, or failed.

  • Name
    reason
    Type
    string
    Description

    Filter offramp transactions by reason.

  • Name
    minInputAmount
    Type
    number
    Description

    Filter offramp transactions by minimum input amount.

  • Name
    maxInputAmount
    Type
    number
    Description

    Filter offramp transactions by maximum input amount.

  • Name
    minOutputAmount
    Type
    number
    Description

    Filter offramp transactions by minimum output amount.

  • Name
    maxOutputAmount
    Type
    number
    Description

    Filter offramp transactions by maximum output amount.

  • Name
    organizationId
    Type
    string
    Description

    Filter offramp transactions by organization id.

  • Name
    organizationName
    Type
    string
    Description

    Filter offramp transactions by organization name.

  • Name
    blockchain
    Type
    string
    Description

    Filter offramp transactions by blockchain.

  • Name
    receiverName
    Type
    string
    Description

    Filter offramp transactions by receiver name.

Request

GET
/v1/offramp
curl -X GET "https://sandbox.rampable.co/v1/offramp?search=something&limit=10&status=success&reason=Salary%20/%20Bonus" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \

Response

{
    "statusCode": 200,
    "message": "getOfframpHandler successfully",
    "data": {
        "docs": [
            {
              "feeDetail": {
                  "rate_amount": 15636.447900000001,
                  "total_fee_amount": 0.648,
                  "total_fee_amount_in_currency": 10132.4182392
              },
              "sender": {
                  "id": "65857a1XXXXXX0f4005a817a",
                  "name": "rony XXXX",
                  "email": "rony.XXXX@gmail.com",
                  "walletAddress": "-"
              },
              "receiver": {
                  "id": "64d344230277cbfe6XXXXXX2",
                  "name": "Ahmed XXXX",
                  "email": "ahmed.XXXX@gmail.com",
                  "accountNumber": "23123232123",
                  "ifsc": "1",
                  "achNumber": "1",
                  "fedwireNumber": "",
                  "ibanNumber": "1"
              },
              "offrampId": "f2672b92-XXXX-45fe-XXXX-f0c1279a3076",
              "inputAmount": 0.00358,
              "inputAmountExact": 0.00358,
              "inputCurrency": "usdc",
              "outputCurrency": "IDR",
              "outputAmount": 55.68307119,
              "outputAmountExact": 0,
              "reason": "Salary",
              "description": "Salary for January 2024",
              "status": "expired",
              "organizationId": "-",
              "organizationName": "-",
              "blockchain": "stellar",
              "routeId": "circle",
              "payOutWallet": "GAXXXXXXHMLSNV7OJTBO7BAXXXXXX6QIBV5RMZZYXK4XXXXXX2J5C3WQ",
              "memo": "263420XXXXXX8294186",
              "expiredDate": "2024-01-10T15:03:20.610Z",
              "cryptoId": "usdc-stellar",
              "useSmartContract": false,
              "blockchainType": "STELLAR",
              "createdAt": "2024-01-10T14:58:20.619Z",
              "updatedAt": "2024-01-10T15:04:00.233Z",
              "id": "659eb08cb58XXXXXX2f84e91"
            },
            ...
        ],
        "totalDocs": 1,
        "offset": 0,
        "limit": 10,
        "totalPages": 1,
        "page": 1,
        "pagingCounter": 1,
        "hasPrevPage": false,
        "hasNextPage": false,
        "prevPage": null,
        "nextPage": null
    }
}

GET/v1/offramp/detail/:offrampId

Offramp Transaction Detail

This endpoint allows you to retrieve a offramp transaction detail by offrampId.

Request

GET
/v1/:offrampId
  curl -X GET "https://sandbox.rampable.co/v1/offramp/detail/xxxxxxx" \
        -H "Authorization: Bearer YOUR_TOKEN"

Response

  {
    "statusCode": 200,
    "message": "getOfframpHandler successfully",
    "data": {
        "offrampId": "fbbe6f22-XXXX-4b9f-XXXX-dbad4515fd64",
        "feeDetail": {
            "rate_amount": 15636.447900000001,
            "total_fee_amount": 0.6,
            "total_fee_amount_in_currency": 9381.86874
        },
        "sender": {
            "id": "65857a177XXXXXX4005a817a",
            "name": "rony XXXX",
            "email": "rony.XXXX@gmail.com",
            "walletAddress": "-"
        },
        "receiver": {
            "id": "64dXXXX30277cbfXXXXXX4f2",
            "name": "Ahmed XXXX",
            "email": "ahmed.XXXX@gmail.com",
            "accountNumber": "23123232123",
            "ifsc": "1",
            "achNumber": "1",
            "fedwireNumber": "",
            "ibanNumber": "1"
        },
        "inputAmount": 0.003,
        "inputAmountExact": 0.003,
        "inputCurrency": "usdc",
        "outputCurrency": "IDR",
        "outputAmount": 46.6617915,
        "outputAmountExact": 0,
        "reason": "Salary",
        "description": "Salary for January 2024",
        "status": "expired",
        "organizationId": "-",
        "organizationName": "-",
        "blockchain": "stellar",
        "payOutWallet": "GAFXXXXXXMLSNV7OJTBO7BXXXXXXX6QIBV5RMZZYXK4Q7ZSXXXXXX3WQ",
        "memo": "2634209453108294186",
        "expiredDate": "2024-01-10T15:02:22.070Z",
        "cryptoId": "usdc-stellar",
        "useSmartContract": false,
        "blockchainType": "STELLAR",
        "activityHistory": [
            {
                "activity": "Signed by Payee",
                "status": "failed",
                "description": "No action found for signed transaction",
                "_id": "659eb052f9ed0d33d8a0b3f0",
                "updatedAt": "2024-01-10T14:57:22.074Z"
            },
            {
                "activity": "Converted to",
                "status": "failed",
                "description": "The Transaction with -- failed. Please contact Rampable support for further assistance. error message : Offramp Expired}",
                "_id": "659eb052f9ed0d33d8a0b3f1",
                "updatedAt": "2024-01-10T14:57:22.074Z"
            },
            {
                "activity": "Sent to recipient account",
                "status": "failed",
                "description": "Previous step failed",
                "_id": "659eb052f9ed0d33d8a0b3f2",
                "updatedAt": "2024-01-10T14:57:22.074Z"
            },
            {
                "activity": "Received by recipient account",
                "status": "failed",
                "description": "Previous step failed",
                "_id": "659eb052f9ed0d33d8a0b3f3",
                "updatedAt": "2024-01-10T14:57:22.074Z"
            }
        ],
        "createdAt": "2024-01-10T14:57:22.081Z",
        "updatedAt": "2024-01-10T15:03:00.110Z",
        "id": "659eb052XXXXXX33d8a0b3ef"
    }
  }

POST/v1/offramp

Create Offramp

This endpoint allows you to add a new transaction to your offramp transaction list in Rampable. To add a offramp transaction, you must provide their Rampable name and email also bank country and currency which automatically bind using recipient id.

Required attributes

  • Name
    walletAddress
    Type
    string
    Description

    The wallet address of the sender.

  • Name
    inputAmount
    Type
    number
    Description

    The amount of the offramp in the input currency.

  • Name
    senderName
    Type
    string
    Description

    The name of the sender.

  • Name
    senderEmail
    Type
    string
    Description

    The email address of the sender.

  • Name
    receiverId
    Type
    string
    Description

    Unique identifier for the receiver refer to recipient.id

  • Name
    inputCurrency
    Type
    string
    Description

    The crypto ID of the offramp. See Reference

  • Name
    outputCurrency
    Type
    string
    Description

    The output currency (fiat) of the offramp. See Reference

Optional attributes

  • Name
    reason
    Type
    string
    Description

    The reason for the offramp.

  • Name
    description
    Type
    string
    Description

    The description for the offramp.

  • Name
    usNetwork
    Type
    string
    Description

    The us network for the offramp. This can be either ach or wire.

After the create offramp process was done, the offramp will be in pending status. The offramp will be processed automatically after the requested crypto asset has been received by Rampable. If the offramp is successful, the status will be updated to processed.

Request

POST
/v1/offramp
curl -X POST "https://sandbox.rampable.co/v1/offramp" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
    "inputAmount": 0.003,
    "senderName": "rony XXXX",
    "senderEmail": "rony.XXXX@gmail.com",
    "receiverId": "64d34XXXXXXX77cbfe646664f2",
    "inputCurrency": "usdc-stellar",
    "outputCurrency": "IDR",
    "reason": "Test send",
    "description": "Test description",
    "blockchainType": "stellar"
}'

Response

{
  "statusCode": 201,
  "message": "Offramp request created successfully",
  "data": {
      "offrampId": "9fadfe62-XXXX-XXXX-XXXX-16f0a1fb711f",
      "feeDetail": {
        "rate_amount": 15636.447900000001,
        "total_fee_amount": 0.648,
        "total_fee_amount_in_currency": 10132.4182392
      },
      "sender": {
          "id": "64c422d5e78XXXXXXXXXXXXX",
          "name": "rony XXXX",
          "email": "rony.XXXX@gmail.com",
          "walletAddress": "-"
      },
      "receiver": {
          "id": "64d34423027XXXXXXX",
          "name": "Ahmed XXXX",
          "email": "ahmed.XXXXX@gmail.com",
          "accountNumber": "23123232123",
          "ifsc": "1",
          "achNumber": "1",
          "fedwireNumber": "",
          "ibanNumber": "1"
      },
      "inputAmount": 0.003,
      "inputAmountExact": 0.003,
      "inputCurrency": "usdc",
      "outputCurrency": "IDR",
      "outputAmount": 46.9255275,
      "outputAmountExact": 0,
      "reason": "Test send",
      "description": "Test description",
      "status": "pending",
      "organizationId": "-",
      "organizationName": "-",
      "blockchain": "stellar",
      "payOutWallet": "GAFK7XFZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "memo": "263420945XXXXXXXX",
      "expiredDate": "2024-02-03T20:33:38.077Z",
      "cryptoId": "usdc-stellar",
      "useSmartContract": false,
      "blockchainType": "STELLAR",
      "activityHistory": [
          {
              "activity": "Signed by Payee",
              "status": "pending",
              "description": "Waiting for signature from sender",
              "_id": "65bea1f65774dfba15f4ab0e",
              "updatedAt": "2024-02-03T20:28:38.080Z"
          },
          {
              "activity": "Converted to",
              "status": "pending",
              "description": "Waiting for crypto asset to be received by system, to be converted to fiat afterward",
              "_id": "65bea1f65774dfba15f4ab0f",
              "updatedAt": "2024-02-03T20:28:38.080Z"
          },
          {
              "activity": "Sent to recipient account",
              "status": "pending",
              "description": "Transaction is under process and will be transferred out to recipient after conversion is done",
              "_id": "65bea1f65774dfba15f4ab10",
              "updatedAt": "2024-02-03T20:28:38.080Z"
          },
          {
              "activity": "Received by recipient account",
              "status": "pending",
              "description": "Transaction is executed successfully and closed",
              "_id": "65bea1f65774dfba15f4ab11",
              "updatedAt": "2024-02-03T20:28:38.080Z"
          }
      ],
      "createdAt": "2024-02-03T20:28:38.085Z",
      "updatedAt": "2024-02-03T20:28:38.085Z",
      "id": "65bea1f6XXXXXXXXX"
  }
}

Was this page helpful?