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:
If we using VA or Bank Transfer, the paymentFiat.accountNumber
field will be filled. If we using QRIS, the paymentFiat.qrCode
field will be filled.
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. If we using VA or Bank transfer, this field will be filled.
- Name
paymentFiat.qrCode
- Type
- string
- Description
The QR code for the payment. If we using QRIS, this field will be filled.
- 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
reference
- Type
- string
- Description
This can be the client transaction ID for the deposit transaction.
- Name
bankNote
- Type
- string
- Description
Bank note from user to easier match the deposit transaction.
- 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",
"reference": "1234567890",
"bankNote": "Payment for order 123",
"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",
"reference": "1234567890",
"bankNote": "Payment for order 123",
"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.
Optional attributes
- Name
reference
- Type
- string
- Description
This can be the client transaction ID for the deposit transaction.
- Name
bankNote
- Type
- string
- Description
Bank note from user to easier match the deposit transaction.
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",
"reference": "1234567890",
"bankNote": "Payment for order 123"
}'
Response using VA or Bank Transfer
{
"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"
}
],
"reference": "1234567890",
"bankNote": "Payment for order 123",
"expiredAt": "2024-10-30T12:10:44.650Z",
"createdAt": "2024-10-30T12:05:44.653Z",
"updatedAt": "2024-10-30T12:05:44.653Z"
}
}
Response using QRIS
{
"statusCode": 201,
"message": "Fiat deposit created",
"data": {
"depositId": "5d2df3ab-2f73-4a20-9b4c-f329bc1b10e6",
"depositType": "fiat",
"userId": "673c6c1454d8550b2d139779",
"inputCurrency": "IDR",
"inputAmount": 15002,
"exchangeRate": 1,
"output": {
"balanceType": "fiat",
"currency": "IDR",
"amount": 14896.986
},
"fee": {
"amount": 105.014,
"percentage": 0.7,
"currency": "IDR"
},
"paymentFiat": {
"bankName": "QRIS",
"bankCode": "qris",
"qrData": "000THIS IS A DUMMY QR00012345000GO TO SIMULATE PAGE ON DASHBOARD TO COMPLETE PAYMENT00012345000COM.PROVIDER.WWW00012345000ID.CO.QRIS.WWW000123000THIS IS A DUMMY QR00012345000GO TO SIMULATE PAGE ON DASHBOARD TO COMPLETE PAYMENT00012345.0001234ID1234Durianpay1234KOTA JAKARTA12345000"
},
"status": "pending",
"activityHistory": [
{
"activity": "Paid by Payee",
"status": "pending",
"description": "Waiting for payment",
"updatedAt": "2024-12-01T06:41:07.919Z",
"_id": "674c05037b94b795a8440a0d"
}
],
"reference": "1",
"bankNote": "bankNote1",
"expiredAt": "2024-12-01T10:41:07.919Z",
"createdAt": "2024-12-01T06:41:07.952Z",
"updatedAt": "2024-12-01T06:41:07.952Z"
}
}
HTTP Status 400 Example
Error Response
{
"statusCode": 400,
"error": "Not Found",
"message": "Payment method not found"
}
Cancel Deposit
This endpoint is used to cancel a deposit.
Request
curl --location \
https://sandbox.rampable.co/v1/deposit/:depositId/cancel \
--request PATCH \
--header 'x-client-secret: ••••••' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
Response
{
"statusCode": 200,
"message": "Deposit cancelled"
}
[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"
}
Deposit Fiat Payment Method
This endpoint is used to get the list of available payment methods for fiat deposit.
Request
curl --location --request GET 'https://sandbox.rampable.co/v1/deposit/payment-method' \
--header 'x-client-secret: ••••••' \
--header 'Authorization: ••••••'
Response
{
"statusCode": 200,
"message": "getDepositPayment executed successfully",
"data": [
{
"depositPaymentType": "qris",
"bankName": "QRIS",
"bankCode": "qris",
"minimumAmount": 10000,
"maximumAmount": 500000,
"isActive": true
},
{
"depositPaymentType": "va",
"bankName": "VA BNI",
"bankCode": "va_bni",
"minimumAmount": 10000,
"maximumAmount": 250000000,
"isActive": true
},
{
"depositPaymentType": "va",
"bankName": "VA BRI",
"bankCode": "va_bri",
"minimumAmount": 10000,
"maximumAmount": 250000000,
"isActive": true
},
{
"depositPaymentType": "va",
"bankName": "VA BSI",
"bankCode": "va_bsi",
"minimumAmount": 10000,
"maximumAmount": 250000000,
"isActive": true
},
{
"depositPaymentType": "va",
"bankName": "VA CIMB",
"bankCode": "va_cimb",
"minimumAmount": 10000,
"maximumAmount": 250000000,
"isActive": true
},
{
"depositPaymentType": "va",
"bankName": "VA DANAMON",
"bankCode": "va_danamon",
"minimumAmount": 10000,
"maximumAmount": 250000000,
"isActive": true
},
{
"depositPaymentType": "va",
"bankName": "VA MANDIRI",
"bankCode": "va_mandiri",
"minimumAmount": 10000,
"maximumAmount": 250000000,
"isActive": true
},
{
"depositPaymentType": "va",
"bankName": "VA PERMATA",
"bankCode": "va_permata",
"minimumAmount": 10000,
"maximumAmount": 250000000,
"isActive": true
}
]
}