Deposit
On this page, we’ll dive into the different deposit endpoints you can use to manage deposit transactions programmatically. You can deposit both fiat and cryptocurrency.
The deposit model
The deposit model is the data structure that represents a deposit transaction in Rampable. The following attributes are associated with the deposit model:
Properties
- Name
depositId
- Type
- string
- Description
Unique identifier for the deposit transaction.
- Name
depositType
- Type
- string
- Description
The type of deposit (e.g., fiat or crypto).
- Name
userId
- Type
- string
- Description
Unique identifier for the user making the deposit.
- Name
inputCurrency
- Type
- string
- Description
The currency used for the deposit (e.g., IDR).
- Name
inputAmount
- Type
- number
- Description
The amount of the deposit in the input currency.
- Name
exchangeRate
- Type
- number
- Description
The exchange rate applied to the deposit.
- Name
output
- Type
- object
- Description
The output details of the deposit transaction.
- Name
output.balanceType
- Type
- string
- Description
The type of balance (e.g., fiat or crypto).
- Name
output.currency
- Type
- string
- Description
The currency of the output (e.g., IDR).
- Name
output.amount
- Type
- number
- Description
The amount of the output.
- Name
fee
- Type
- object
- Description
The fee details associated with the deposit.
- Name
fee.amount
- Type
- number
- Description
The amount of the fee.
- Name
fee.percentage
- Type
- number
- Description
The percentage of the fee.
- Name
fee.currency
- Type
- string
- Description
The currency of the fee.
- Name
paymentFiat
- Type
- object
- Description
The payment details for fiat transactions.
- Name
paymentFiat.bankName
- Type
- string
- Description
The name of the bank used for the payment.
- Name
paymentFiat.bankCode
- Type
- string
- Description
The code of the bank used for the payment.
- Name
paymentFiat.accountName
- Type
- string
- Description
The name on the bank account.
- Name
paymentFiat.accountNumber
- Type
- string
- Description
The bank account number.
- Name
paymentCrypto
- Type
- object
- Description
The payment details for crypto transactions.
- Name
paymentCrypto.payoutWallet
- Type
- string
- Description
The wallet address used for the payment.
- Name
paymentCrypto.network
- Type
- string
- Description
The network used for the payment.
- Name
status
- Type
- string
- Description
The status of the deposit transaction. This can be either
pending
,expired
orcompleted
.
- Name
activityHistory
- Type
- array
- Description
A history of activities related to the deposit.
- Name
activityHistory.activity
- Type
- string
- Description
The activity description.
- Name
activityHistory.status
- Type
- string
- Description
The status of the activity.
- Name
activityHistory.description
- Type
- string
- Description
A description of the activity.
- Name
activityHistory.updatedAt
- Type
- string
- Description
The timestamp of the activity update.
- Name
expiredAt
- Type
- string
- Description
The expiration timestamp of the deposit transaction.
- Name
createdAt
- Type
- string
- Description
The timestamp when the deposit transaction was created.
- Name
updatedAt
- Type
- string
- Description
The timestamp when the deposit transaction was last updated.
List all deposit transactions
This endpoint allows you to retrieve a paginated list of all your deposit transactions. By default, a maximum of ten deposit transactions are shown per page.
Query Params attributes
- Name
limit
- Type
- integer
- Description
Limit the number of deposit transactions returned.
- Name
page
- Type
- integer
- Description
Specify the page number of the deposit transactions to retrieve.
- Name
sort
- Type
- string
- Description
Sort the deposit transactions by a specific field. You can sort by createdAt or updatedAt. By default, deposit 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
status
- Type
- string
- Description
Filter deposit transactions by status. This can be either pending, expired or completed.
- Name
depositType
- Type
- string
- Description
Filter deposit transactions by deposit type. This can be either fiat or crypto.
Request
curl -X GET "https://sandbox.rampable.co/v1/deposit?limit=10&page=1&sort=createdAt&status=pending&depositType=fiat" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
Response
{
"statusCode": 200,
"message": "getDepositListHandler successfully",
"data": {
"docs": [
{
"output": {
"balanceType": "fiat",
"currency": "IDR",
"amount": 4980
},
"paymentFiat": {
"bankName": "Bank Sinarmas",
"bankCode": "bank_sinarmas",
"accountName": "Rampable",
"accountNumber": "123123123"
},
"fee": {
"amount": 5020,
"percentage": 50.2,
"currency": "IDR"
},
"depositId": "24f8d87a-ee5c-42b6-81b1-0a2706430bd7",
"depositType": "fiat",
"userId": "6724548c8638b44fd6f6f0f3",
"inputCurrency": "IDR",
"exchangeRate": 1,
"inputAmount": 10000,
"activityHistory": [
{
"activity": "Paid by Payee",
"status": "pending",
"description": "Waiting for payment",
"updatedAt": "2024-11-01T10:27:35.024Z",
"_id": "6724ad17edf5d43f1026ace2"
}
],
"status": "completed",
"expiredAt": "2024-11-01T10:32:35.024Z",
"createdAt": "2024-11-01T10:27:35.040Z",
"updatedAt": "2024-11-02T06:57:15.690Z",
"id": "6724ad17edf5d43f1026ace1"
}
],
"totalDocs": 1,
"offset": 0,
"limit": 10,
"totalPages": 1,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": true,
"prevPage": null,
"nextPage": 2
}
}
Deposit details
This endpoint retrieves the details of a specific deposit transaction.
Request
curl -X GET "https://sandbox.rampable.co/v1/deposit/24f8d87a-ee5c-42b6-81b1-0a2706430bd7" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
Response
{
"statusCode": 200,
"message": "getDepositDetailHandler successfully",
"data": {
"output": {
"balanceType": "fiat",
"currency": "IDR",
"amount": 15049.82
},
"paymentFiat": {
"bankName": "Bank Sinarmas",
"bankCode": "bank_sinarmas",
"accountName": "Rampable",
"accountNumber": "123123123"
},
"fee": {
"amount": 5040.18,
"percentage": 25.088003982080636,
"currency": "IDR"
},
"depositId": "21817b75-5175-4a4a-bb0e-b6d4e2fb49fb",
"depositType": "fiat",
"userId": "6724548c8638b44fd6f6f0f3",
"inputCurrency": "IDR",
"exchangeRate": 1,
"inputAmount": 20090,
"activityHistory": [
{
"activity": "Paid by Payee",
"status": "pending",
"description": "Waiting for payment",
"updatedAt": "2024-11-09T12:51:36.925Z",
"_id": "672f5ad8b6778faec15f6269"
}
],
"status": "completed",
"expiredAt": "2024-11-09T12:56:36.925Z",
"createdAt": "2024-11-09T12:51:36.935Z",
"updatedAt": "2024-11-09T12:51:46.194Z",
"id": "672f5ad8b6778faec15f6268"
}
}
Deposit Fiat
This endpoint initiates a fiat deposit transaction. To initiate a deposit, you must provide the amount, inputCurrency, outputCurrency, balanceType, and paymentMethod.
Ensure that the amount is a positive number and both inputCurrency and outputCurrency are valid currency codes.
Required attributes
- Name
inputAmount
- Type
- number
- Description
The amount of the offramp in the input currency.
- Name
inputCurrency
- Type
- string
- Description
The fiat currency of the deposit.
- Name
outputCurrency
- Type
- string
- Description
The output currency (fiat or crypto) of the deposit.
- Name
balanceType
- Type
- string
- Description
The type of balance (e.g., fiat).
- Name
paymentMethod
- Type
- string
- Description
The payment method used for the transaction. You can get the payment method code from the payment methods endpoint.
Request
curl --location \
https://sandbox.rampable.co/v1/deposit/fiat \
--header 'x-client-secret: ••••••' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"inputAmount": 10000,
"inputCurrency": "IDR",
"outputCurrency": "IDR",
"balanceType": "fiat",
"paymentMethod": "bank_sinarmas"
}'
Response
{
"statusCode": 201,
"message": "Fiat deposit created",
"data": {
"depositId": "4b509748-b2c2-4334-a251-8b0d79e5b750",
"depositType": "fiat",
"userId": "6719f68dd07aef516b9158ba",
"inputCurrency": "IDR",
"inputAmount": 10000,
"exchangeRate": 1,
"output": {
"balanceType": "fiat",
"currency": "IDR",
"amount": 4980
},
"fee": {
"amount": 5020,
"percentage": 50.2,
"currency": "IDR"
},
"paymentFiat": {
"bankName": "Bank Sinarmas",
"bankCode": "bank_sinarmas",
"accountName": "Rampable",
"accountNumber": "00000000"
},
"status": "pending",
"activityHistory": [
{
"activity": "Paid by Payee",
"status": "pending",
"description": "Waiting for payment",
"updatedAt": "2024-10-30T12:05:44.650Z"
}
],
"expiredAt": "2024-10-30T12:10:44.650Z",
"createdAt": "2024-10-30T12:05:44.653Z",
"updatedAt": "2024-10-30T12:05:44.653Z"
}
}
HTTP Status 400 Example
Error Response
{
"statusCode": 400,
"error": "Not Found",
"message": "Payment method not found"
}
This endpoint initiates a crypto deposit transaction. To initiate a deposit, you must provide the amount, inputCurrency, outputCurrency, balanceType, and paymentMethod.
Ensure that the amount is a positive number and both inputCurrency and outputCurrency are valid currency codes.
Required attributes
- Name
inputAmount
- Type
- number
- Description
The amount of the offramp in the input currency.
- Name
inputCurrency
- Type
- string
- Description
The fiat currency of the deposit.
- Name
outputCurrency
- Type
- string
- Description
The output currency (fiat or crypto) of the deposit.
- Name
balanceType
- Type
- string
- Description
The type of balance (e.g., fiat).
Request
curl --location \
https://sandbox.rampable.co/v1/deposit/crypto \
--header 'x-client-secret: ••••••' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"inputAmount": 10,
"inputCurrency": "usdt-tron",
"outputCurrency": "IDR",
"balanceType": "fiat"
}'
Response
{
"statusCode": 201,
"message": "Crypto deposit created",
"data": {
"depositId": "cd8cf499-9bdd-4faf-a72a-3b0c7725e241",
"depositType": "crypto",
"userId": "6724548c8638b44fd6f6f0f3",
"inputCurrency": "usdt-tron",
"inputAmount": 10,
"exchangeRate": 15897,
"output": {
"balanceType": "fiat",
"currency": "IDR",
"amount": 153652.06
},
"fee": {
"amount": 5317.94,
"percentage": 3.3452475309806875,
"currency": "IDR"
},
"paymentCrypto": {
"payoutWallet": "TMLwSA83KgzNLFyhnTysAGBVjQguAkZxN3",
"network": "tron"
},
"status": "pending",
"activityHistory": [
{
"activity": "Paid by Payee",
"status": "pending",
"description": "Waiting for payment",
"updatedAt": "2024-11-02T07:04:06.396Z",
"_id": "6725cee61bc5acff583ec56d"
}
],
"expiredAt": "2024-11-02T07:09:06.396Z",
"createdAt": "2024-11-02T07:04:06.414Z",
"updatedAt": "2024-11-02T07:04:06.414Z"
}
}
HTTP Status 400 Example
Error Response
{
"statusCode": 400,
"error": "Not Found",
"message": "Fiat not found"
}
[DEV] Update status
This endpoint is used to update the status of a deposit. Work only on sandbox environment. Will send webhook to the user.
Work only on sandbox environment.
Required attributes
- Name
status
- Type
- string
- Description
The status of the deposit.
Request
curl --location --request PATCH 'https://sandbox.rampable.co/v1/deposit/24f8d87a-ee5c-42b6-81b1-0a2706430bd7' \
--header 'x-client-secret: ••••••' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"status" : "completed"
}'
Response
{
"statusCode": 200,
"message": "Deposit updated",
"data": {
"depositId": "24f8d87a-ee5c-42b6-81b1-0a2706430bd7",
"depositType": "fiat",
"userId": "6724548c8638b44fd6f6f0f3",
"inputCurrency": "IDR",
"inputAmount": 10000,
"exchangeRate": 1,
"output": {
"balanceType": "fiat",
"currency": "IDR",
"amount": 4980
},
"fee": {
"amount": 5020,
"percentage": 50.2,
"currency": "IDR"
},
"paymentFiat": {
"bankName": "Bank Sinarmas",
"bankCode": "bank_sinarmas",
"accountName": "Rampable",
"accountNumber": "123123123"
},
"paymentCrypto": {},
"status": "completed",
"activityHistory": [
{
"activity": "Paid by Payee",
"status": "pending",
"description": "Waiting for payment",
"updatedAt": "2024-11-01T10:27:35.024Z",
"_id": "6724ad17edf5d43f1026ace2"
}
],
"expiredAt": "2024-11-01T10:32:35.024Z",
"createdAt": "2024-11-01T10:27:35.040Z",
"updatedAt": "2024-11-02T06:56:39.934Z"
}
}
### HTTP Status 400 Example
```json {{ title: 'Error Response' }}
{
"statusCode": 400,
"error": "Bad Request",
"message": "Deposit not found"
}