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 WePay. 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

FieldTypeDescription
depositIdstring

Unique identifier for the deposit transaction.

depositTypestring

The type of deposit (e.g., fiat or crypto).

userIdstring

Unique identifier for the user making the deposit.

inputCurrencystring

The currency used for the deposit (e.g., IDR).

inputAmountnumber

The amount of the deposit in the input currency.

exchangeRatenumber

The exchange rate applied to the deposit.

outputAmountnumber

The amount of the deposit in the output currency.

feeobject

The fee details associated with the deposit.

fee.amountnumber

The amount of the fee.

fee.percentagenumber

The percentage of the fee.

fee.currencystring

The currency of the fee.

paymentFiatobject

The payment details for fiat transactions.

paymentFiat.bankNamestring

The name of the bank used for the payment.

paymentFiat.bankCodestring

The code of the bank used for the payment.

paymentFiat.accountNamestring

The name on the bank account.

paymentFiat.accountNumberstring

The bank account number. If we using VA or Bank transfer, this field will be filled.

paymentFiat.qrCodestring

The QR code for the payment. If we using QRIS, this field will be filled.

paymentFiat.checkoutUrlstring

The checkout URL for the payment. If we using EWallet, this field will be filled.

paymentCryptoobject

The payment details for crypto transactions.

paymentCrypto.payoutWalletstring

The wallet address used for the payment.

paymentCrypto.networkstring

The network used for the payment.

paymentCrypto.memostring

The memo or destination tag to include with the transfer, on networks that use one.

transactionHashstring

The on-chain hash of the transaction that paid the deposit. Crypto deposits only, returned by the crypto deposit endpoints.

senderWalletstring

The wallet address the payment was sent from. Crypto deposits only, returned by the crypto deposit endpoints.

statusstring

The status of the deposit transaction. This can be either pending, expired or completed.

activityHistoryarray

A history of activities related to the deposit.

activityHistory.activitystring

The activity description.

activityHistory.statusstring

The status of the activity.

activityHistory.descriptionstring

A description of the activity.

activityHistory.updatedAtstring

The timestamp of the activity update.

referencestring

This can be the client transaction ID for the deposit transaction. If exists, should be unique.

notestring

This can be used to store any additional information about the deposit transaction.

expiredAtstring

The expiration timestamp of the deposit transaction.

createdAtstring

The timestamp when the deposit transaction was created.

updatedAtstring

The timestamp when the deposit transaction was last updated.


GET/v1/deposit/fiat

List fiat deposits

This endpoint retrieves a paginated list of your fiat deposit transactions. It returns only deposits whose depositType is fiat; use List crypto deposits for crypto deposits. By default, ten deposit transactions are shown per page.

Fields that have no value are left out of each deposit.

Query Params attributes

FieldTypeDescription
pageinteger

Specify the page number of the deposit transactions to retrieve. Defaults to 1.

limitinteger

Limit the number of deposit transactions returned. Defaults to 10, maximum 100.

sortstring

Sort the deposit transactions by a specific field, such as createdAt or updatedAt. Add a hyphen (-) before the field to sort in reverse order.

statusstring

Filter deposit transactions by status.

depositBulkIdstring

Filter deposit transactions that belong to a deposit bulk.

Request

GET
/v1/deposit/fiat
curl -X GET "https://staging.wepay.to/v1/deposit/fiat?limit=10&page=1&sort=-createdAt&status=completed" \
-H "X-Signature: YOUR_SIGNATURE" \
-H "X-Timestamp: YOUR_TIMESTAMP" \
-H "X-Client-ID: YOUR_CLIENT_ID"

Response

{
  "data": {
    "docs": [
      {
        "depositBulkId": "b7e2c9a4-1f3d-4a6b-9c8e-5d4f3a2b1c0e",
        "depositId": "24f8d87a-ee5c-42b6-81b1-0a2706430bd7",
        "depositType": "fiat",
        "userId": "6724548c8638b44fd6f6f0f3",
        "inputCurrency": "IDR",
        "inputAmount": 10000,
        "outputCurrency": "IDR",
        "outputAmount": 4980,
        "fee": {
          "amount": 5020,
          "percentage": 50.2,
          "currency": "IDR"
        },
        "paymentFiat": {
          "accountNumber": "8808123456789012",
          "accountName": "PT Example Merchant",
          "accountAddress": "Jl. Jend. Sudirman No. 1, Jakarta",
          "bankCode": "va_bni",
          "bankName": "VA BNI",
          "bankAddress": "Jl. Jend. Sudirman Kav. 1, Jakarta",
          "qrData": "00020101021226670016COM.EXAMPLE.WWW",
          "checkoutUrl": "https://checkout.example.com/pay/24f8d87a",
          "paymentReference": "PAYREF-1234567890",
          "routingNumber": {
            "primary": "021000021",
            "ach": "011000015",
            "wire": "026009593"
          },
          "intlCode": {
            "swift": "BNINIDJA",
            "bic": "BNINIDJAXXX"
          }
        },
        "status": "completed",
        "activityHistory": [
          {
            "activity": "Paid by Payee",
            "status": "pending",
            "description": "Waiting for payment",
            "updatedAt": "2026-10-01T03:27:35.024Z"
          },
          {
            "status": "completed",
            "description": "Payment received",
            "updatedAt": "2026-10-01T03:29:02.513Z"
          }
        ],
        "reference": "1234567890",
        "note": "Note for order 123",
        "bankNote": "Payment for order 123",
        "exchangeInfo": {
          "exchangeRate": 16868,
          "outputCurrency": "usdt-tron",
          "outputAmount": 0.295
        },
        "payerInfo": {
          "transactionCode": "abcdef123456",
          "name": "John Doe",
          "bankName": "Bank Mandiri",
          "accountNumber": "1234567890",
          "mid": "1234567890"
        },
        "settlementType": "instant",
        "expiredAt": "2026-10-01T03:32:35.024Z",
        "paidAt": "2026-10-01T03:29:02.513Z",
        "createdAt": "2026-10-01T03:27:35.04Z",
        "updatedAt": "2026-10-01T03:29:02.52Z"
      }
    ],
    "offset": 0,
    "page": 1,
    "limit": 10,
    "totalPages": 1,
    "totalDocs": 1,
    "pagingCounter": 10,
    "hasPrevPage": false,
    "hasNextPage": false,
    "prevPage": 0,
    "nextPage": 0
  },
  "message": "Successfully get deposits",
  "requestId": "3f6e0c2a-9b1d-4c7e-8a55-1d2f3e4a5b6c",
  "statusCode": 200,
  "timestamp": "2026-10-01T03:30:00.000Z"
}

GET/v1/deposit/fiat/:depositIdOrReference

Get fiat deposit

This endpoint retrieves a single fiat deposit transaction by its depositId or its reference.

The id or reference of a crypto deposit returns 404; use Get crypto deposit for crypto deposits.

Request

GET
/v1/deposit/fiat/:depositIdOrReference
curl -X GET "https://staging.wepay.to/v1/deposit/fiat/24f8d87a-ee5c-42b6-81b1-0a2706430bd7" \
-H "X-Signature: YOUR_SIGNATURE" \
-H "X-Timestamp: YOUR_TIMESTAMP" \
-H "X-Client-ID: YOUR_CLIENT_ID"

Response

{
  "data": {
    "depositBulkId": "b7e2c9a4-1f3d-4a6b-9c8e-5d4f3a2b1c0e",
    "depositId": "24f8d87a-ee5c-42b6-81b1-0a2706430bd7",
    "depositType": "fiat",
    "userId": "6724548c8638b44fd6f6f0f3",
    "inputCurrency": "IDR",
    "inputAmount": 10000,
    "outputCurrency": "IDR",
    "outputAmount": 4980,
    "fee": {
      "amount": 5020,
      "percentage": 50.2,
      "currency": "IDR"
    },
    "paymentFiat": {
      "accountNumber": "8808123456789012",
      "accountName": "PT Example Merchant",
      "accountAddress": "Jl. Jend. Sudirman No. 1, Jakarta",
      "bankCode": "va_bni",
      "bankName": "VA BNI",
      "bankAddress": "Jl. Jend. Sudirman Kav. 1, Jakarta",
      "qrData": "00020101021226670016COM.EXAMPLE.WWW",
      "checkoutUrl": "https://checkout.example.com/pay/24f8d87a",
      "paymentReference": "PAYREF-1234567890",
      "routingNumber": {
        "primary": "021000021",
        "ach": "011000015",
        "wire": "026009593"
      },
      "intlCode": {
        "swift": "BNINIDJA",
        "bic": "BNINIDJAXXX"
      }
    },
    "status": "completed",
    "activityHistory": [
      {
        "activity": "Paid by Payee",
        "status": "pending",
        "description": "Waiting for payment",
        "updatedAt": "2026-10-01T03:27:35.024Z"
      },
      {
        "status": "completed",
        "description": "Payment received",
        "updatedAt": "2026-10-01T03:29:02.513Z"
      }
    ],
    "reference": "1234567890",
    "note": "Note for order 123",
    "bankNote": "Payment for order 123",
    "exchangeInfo": {
      "exchangeRate": 16868,
      "outputCurrency": "usdt-tron",
      "outputAmount": 0.295
    },
    "payerInfo": {
      "transactionCode": "abcdef123456",
      "name": "John Doe",
      "bankName": "Bank Mandiri",
      "accountNumber": "1234567890",
      "mid": "1234567890"
    },
    "settlementType": "instant",
    "expiredAt": "2026-10-01T03:32:35.024Z",
    "paidAt": "2026-10-01T03:29:02.513Z",
    "createdAt": "2026-10-01T03:27:35.04Z",
    "updatedAt": "2026-10-01T03:29:02.52Z"
  },
  "message": "Successfully get deposit",
  "requestId": "8a1d4e7b-2c5f-4b9a-b3e6-7f0a1b2c3d4e",
  "statusCode": 200,
  "timestamp": "2026-10-01T03:30:00.000Z"
}

GET/v1/deposit/crypto

List crypto deposits

This endpoint retrieves a paginated list of your crypto deposit transactions. It returns only deposits whose depositType is crypto; use List fiat deposits for fiat deposits. By default, ten deposit transactions are shown per page, newest first.

Fields that have no value are left out of each deposit.

Query Params attributes

FieldTypeDescription
pageinteger

Specify the page number of the deposit transactions to retrieve. Defaults to 1.

limitinteger

Limit the number of deposit transactions returned. Defaults to 10, maximum 100.

sortstring

Sort the deposit transactions by a specific field, such as createdAt or updatedAt. Add a hyphen (-) before the field to sort in reverse order. Defaults to -createdAt.

statusstring

Filter deposit transactions by status.

Request

GET
/v1/deposit/crypto
curl -X GET "https://staging.wepay.to/v1/deposit/crypto?limit=10&page=1&sort=-createdAt&status=completed" \
-H "X-Signature: YOUR_SIGNATURE" \
-H "X-Timestamp: YOUR_TIMESTAMP" \
-H "X-Client-ID: YOUR_CLIENT_ID"

Response

{
  "statusCode": 200,
  "message": "Successfully get deposits",
  "data": {
    "docs": [
      {
        "depositBulkId": "5e7a9c1b-3d2f-4e6a-8b0c-1f2e3d4c5b6a",
        "depositId": "9b2f6c1e-4d8a-4f3b-a7c5-e1d2c3b4a596",
        "depositType": "crypto",
        "userId": "6724548c8638b44fd6f6f0f3",
        "inputCurrency": "usdt-polygon",
        "inputAmount": 50,
        "outputCurrency": "usdt-polygon",
        "outputAmount": 49.5,
        "fee": {
          "amount": 0.5,
          "percentage": 1,
          "currency": "usdt-polygon"
        },
        "paymentCrypto": {
          "payoutWallet": "0x8f3a1c2b4d5e6f708192a3b4c5d6e7f809a1b2c3",
          "network": "polygon"
        },
        "transactionHash": "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd",
        "senderWallet": "0x2b5ad5c4795c026514f8317c7a215e218dccd6cf",
        "status": "completed",
        "activityHistory": [
          {
            "activity": "Paid by Payee",
            "status": "completed",
            "description": "Received on the custody address",
            "updatedAt": "2026-10-01T05:12:00.12Z"
          },
          {
            "status": "pending",
            "description": "Waiting for payment",
            "updatedAt": "2026-10-01T05:10:00Z"
          }
        ],
        "reference": "order-88",
        "note": "invoice 88",
        "exchangeInfo": {
          "exchangeRate": 16250.5,
          "outputCurrency": "IDR",
          "outputAmount": 804399.75
        },
        "payerInfo": {
          "name": "Alice",
          "bankName": ""
        },
        "expiredAt": "2026-10-01T05:40:00Z",
        "paidAt": "2026-10-01T05:12:00.12Z",
        "createdAt": "2026-10-01T05:10:00Z",
        "updatedAt": "2026-10-01T05:12:00.1Z"
      }
    ],
    "offset": 0,
    "page": 1,
    "limit": 10,
    "totalPages": 1,
    "totalDocs": 1,
    "pagingCounter": 10,
    "hasPrevPage": false,
    "hasNextPage": false,
    "prevPage": 0,
    "nextPage": 0
  }
}

GET/v1/deposit/crypto/:depositIdOrReference

Get crypto deposit

This endpoint retrieves a single crypto deposit transaction by its depositId or its reference.

The id or reference of a fiat deposit returns 404; use Get fiat deposit for fiat deposits.

Request

GET
/v1/deposit/crypto/:depositIdOrReference
curl -X GET "https://staging.wepay.to/v1/deposit/crypto/9b2f6c1e-4d8a-4f3b-a7c5-e1d2c3b4a596" \
-H "X-Signature: YOUR_SIGNATURE" \
-H "X-Timestamp: YOUR_TIMESTAMP" \
-H "X-Client-ID: YOUR_CLIENT_ID"

Response

{
  "statusCode": 200,
  "message": "Successfully get deposit",
  "data": {
    "depositBulkId": "5e7a9c1b-3d2f-4e6a-8b0c-1f2e3d4c5b6a",
    "depositId": "9b2f6c1e-4d8a-4f3b-a7c5-e1d2c3b4a596",
    "depositType": "crypto",
    "userId": "6724548c8638b44fd6f6f0f3",
    "inputCurrency": "usdt-polygon",
    "inputAmount": 50,
    "outputCurrency": "usdt-polygon",
    "outputAmount": 49.5,
    "fee": {
      "amount": 0.5,
      "percentage": 1,
      "currency": "usdt-polygon"
    },
    "paymentCrypto": {
      "payoutWallet": "0x8f3a1c2b4d5e6f708192a3b4c5d6e7f809a1b2c3",
      "network": "polygon"
    },
    "transactionHash": "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd",
    "senderWallet": "0x2b5ad5c4795c026514f8317c7a215e218dccd6cf",
    "status": "completed",
    "activityHistory": [
      {
        "activity": "Paid by Payee",
        "status": "completed",
        "description": "Received on the custody address",
        "updatedAt": "2026-10-01T05:12:00.12Z"
      },
      {
        "status": "pending",
        "description": "Waiting for payment",
        "updatedAt": "2026-10-01T05:10:00Z"
      }
    ],
    "reference": "order-88",
    "note": "invoice 88",
    "exchangeInfo": {
      "exchangeRate": 16250.5,
      "outputCurrency": "IDR",
      "outputAmount": 804399.75
    },
    "payerInfo": {
      "name": "Alice",
      "bankName": ""
    },
    "expiredAt": "2026-10-01T05:40:00Z",
    "paidAt": "2026-10-01T05:12:00.12Z",
    "createdAt": "2026-10-01T05:10:00Z",
    "updatedAt": "2026-10-01T05:12:00.1Z"
  }
}

GET/v1/deposit

[DEPRECATED] List all deposit transactions

This endpoint is deprecated and will be removed on 13 October 2026. Use List fiat deposits or List crypto deposits instead. Until then it returns both fiat and crypto deposits, unchanged.

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

FieldTypeDescription
limitinteger

Limit the number of deposit transactions returned.

pageinteger

Specify the page number of the deposit transactions to retrieve.

sortstring

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.

statusstring

Filter deposit transactions by status. This can be either pending, expired or completed.

depositTypestring

Filter deposit transactions by deposit type. This can be either fiat or crypto.

Request

GET
/v1/deposit
curl -X GET "https://staging.wepay.to/v1/deposit?limit=10&page=1&sort=createdAt&status=pending&depositType=fiat" \
-H "X-Signature: YOUR_SIGNATURE" \
-H "X-Timestamp: YOUR_TIMESTAMP" \
-H "X-Client-ID: YOUR_CLIENT_ID"

Response

{
  "data": {
    "docs": [
      {
        "depositBulkId": "b7e2c9a4-1f3d-4a6b-9c8e-5d4f3a2b1c0e",
        "depositId": "24f8d87a-ee5c-42b6-81b1-0a2706430bd7",
        "depositType": "fiat",
        "userId": "6724548c8638b44fd6f6f0f3",
        "inputCurrency": "IDR",
        "inputAmount": 10000,
        "outputCurrency": "IDR",
        "outputAmount": 4980,
        "fee": {
          "amount": 5020,
          "percentage": 50.2,
          "currency": "IDR"
        },
        "paymentFiat": {
          "accountNumber": "8808123456789012",
          "accountName": "PT Example Merchant",
          "accountAddress": "Jl. Jend. Sudirman No. 1, Jakarta",
          "bankCode": "va_bni",
          "bankName": "VA BNI",
          "bankAddress": "Jl. Jend. Sudirman Kav. 1, Jakarta",
          "qrData": "00020101021226670016COM.EXAMPLE.WWW",
          "checkoutUrl": "https://checkout.example.com/pay/24f8d87a",
          "paymentReference": "PAYREF-1234567890",
          "routingNumber": {
            "primary": "021000021",
            "ach": "011000015",
            "wire": "026009593"
          },
          "intlCode": {
            "swift": "BNINIDJA",
            "bic": "BNINIDJAXXX"
          }
        },
        "status": "completed",
        "activityHistory": [
          {
            "activity": "Paid by Payee",
            "status": "pending",
            "description": "Waiting for payment",
            "updatedAt": "2026-10-01T03:27:35.024Z"
          },
          {
            "status": "completed",
            "description": "Payment received",
            "updatedAt": "2026-10-01T03:29:02.513Z"
          }
        ],
        "reference": "1234567890",
        "note": "Note for order 123",
        "bankNote": "Payment for order 123",
        "exchangeInfo": {
          "exchangeRate": 16868,
          "outputCurrency": "usdt-tron",
          "outputAmount": 0.295
        },
        "payerInfo": {
          "transactionCode": "abcdef123456",
          "name": "John Doe",
          "bankName": "Bank Mandiri",
          "accountNumber": "1234567890",
          "mid": "1234567890"
        },
        "settlementType": "instant",
        "expiredAt": "2026-10-01T03:32:35.024Z",
        "paidAt": "2026-10-01T03:29:02.513Z",
        "createdAt": "2026-10-01T03:27:35.04Z",
        "updatedAt": "2026-10-01T03:29:02.52Z"
      },
      {
        "depositId": "cd8cf499-9bdd-4faf-a72a-3b0c7725e241",
        "depositType": "crypto",
        "userId": "6724548c8638b44fd6f6f0f3",
        "inputCurrency": "usdt-tron",
        "inputAmount": 25,
        "outputCurrency": "usdt-tron",
        "outputAmount": 24.5,
        "fee": {
          "amount": 0.5,
          "percentage": 2,
          "currency": "usdt-tron"
        },
        "paymentCrypto": {
          "payoutWallet": "TMLwSA83KgzNLFyhnTysAGBVjQguAkZxN3",
          "network": "tron",
          "memo": "104857"
        },
        "status": "completed",
        "activityHistory": [
          {
            "activity": "Paid by Payee",
            "status": "pending",
            "description": "Waiting for payment",
            "updatedAt": "2026-10-01T02:04:06.396Z"
          }
        ],
        "reference": "order-88",
        "expiredAt": "2026-10-01T02:09:06.396Z",
        "createdAt": "2026-10-01T02:04:06.414Z",
        "updatedAt": "2026-10-01T02:06:41.2Z"
      }
    ],
    "offset": 0,
    "page": 1,
    "limit": 10,
    "totalPages": 1,
    "totalDocs": 2,
    "pagingCounter": 10,
    "hasPrevPage": false,
    "hasNextPage": false,
    "prevPage": 0,
    "nextPage": 0
  },
  "message": "Successfully get deposits",
  "requestId": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f",
  "statusCode": 200,
  "timestamp": "2026-10-01T03:30:00.000Z"
}

GET/v1/deposit/:depositIdOrReference

[DEPRECATED] Deposit details

This endpoint is deprecated and will be removed on 13 October 2026. Use Get fiat deposit or Get crypto deposit instead. Until then it returns both fiat and crypto deposits, unchanged.

This endpoint retrieves the details of a specific deposit transaction.

Request

GET
/v1/deposit/:depositIdOrReference
curl -X GET "https://staging.wepay.to/v1/deposit/24f8d87a-ee5c-42b6-81b1-0a2706430bd7" \
-H "X-Signature: YOUR_SIGNATURE" \
-H "X-Timestamp: YOUR_TIMESTAMP" \
-H "X-Client-ID: YOUR_CLIENT_ID"

Response

  {
    "data": {
      "depositBulkId": "b7e2c9a4-1f3d-4a6b-9c8e-5d4f3a2b1c0e",
      "depositId": "24f8d87a-ee5c-42b6-81b1-0a2706430bd7",
      "depositType": "fiat",
      "userId": "6724548c8638b44fd6f6f0f3",
      "inputCurrency": "IDR",
      "inputAmount": 10000,
      "outputCurrency": "IDR",
      "outputAmount": 4980,
      "fee": {
        "amount": 5020,
        "percentage": 50.2,
        "currency": "IDR"
      },
      "paymentFiat": {
        "accountNumber": "8808123456789012",
        "accountName": "PT Example Merchant",
        "accountAddress": "Jl. Jend. Sudirman No. 1, Jakarta",
        "bankCode": "va_bni",
        "bankName": "VA BNI",
        "bankAddress": "Jl. Jend. Sudirman Kav. 1, Jakarta",
        "qrData": "00020101021226670016COM.EXAMPLE.WWW",
        "checkoutUrl": "https://checkout.example.com/pay/24f8d87a",
        "paymentReference": "PAYREF-1234567890",
        "routingNumber": {
          "primary": "021000021",
          "ach": "011000015",
          "wire": "026009593"
        },
        "intlCode": {
          "swift": "BNINIDJA",
          "bic": "BNINIDJAXXX"
        }
      },
      "status": "completed",
      "activityHistory": [
        {
          "activity": "Paid by Payee",
          "status": "pending",
          "description": "Waiting for payment",
          "updatedAt": "2026-10-01T03:27:35.024Z"
        },
        {
          "status": "completed",
          "description": "Payment received",
          "updatedAt": "2026-10-01T03:29:02.513Z"
        }
      ],
      "reference": "1234567890",
      "note": "Note for order 123",
      "bankNote": "Payment for order 123",
      "exchangeInfo": {
        "exchangeRate": 16868,
        "outputCurrency": "usdt-tron",
        "outputAmount": 0.295
      },
      "payerInfo": {
        "transactionCode": "abcdef123456",
        "name": "John Doe",
        "bankName": "Bank Mandiri",
        "accountNumber": "1234567890",
        "mid": "1234567890"
      },
      "settlementType": "instant",
      "expiredAt": "2026-10-01T03:32:35.024Z",
      "paidAt": "2026-10-01T03:29:02.513Z",
      "createdAt": "2026-10-01T03:27:35.04Z",
      "updatedAt": "2026-10-01T03:29:02.52Z"
    },
    "message": "Successfully get deposit",
    "requestId": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80",
    "statusCode": 200,
    "timestamp": "2026-10-01T03:30:00.000Z"
  }

POST/v1/deposit/fiat

Deposit Fiat

This endpoint initiates a fiat deposit transaction. To initiate a deposit, you must provide the amount, inputCurrency, outputCurrency, balanceType, and paymentMethod.

Read the statusCode field in the response body rather than the HTTP status code.

Ensure that the amount is a positive number and both inputCurrency and outputCurrency are valid currency codes.

If the outputCurrency is a cryptocurrency, the amount will be converted directly using the current exchange rate.

Required attributes

FieldTypeDescription
inputCurrencystring

The fiat currency of the deposit.

inputAmountnumber

The amount of the deposit in the input currency. This is required if outputAmount is not provided.

outputCurrencystring

The output currency (fiat or crypto) of the deposit.

outputAmountobject

The output details of the deposit transaction. This is required if inputAmount is not provided. Choose either outputAmount.fiat or outputAmount.crypto.

outputAmount.fiatnumber

The currency of the output in fiat (e.g., IDR).

outputAmount.cryptofloat

The currency of the output in crypto (e.g., usdt-tron).

balanceTypestring

The type of balance (e.g., fiat).

paymentMethodstring

The payment method used for the transaction. You can get the payment method code from the payment methods endpoint.

Optional attributes

FieldTypeDescription
referencestring

This can be the client transaction ID for the deposit transaction. If exists, should be unique

notestring

This can be used to store any additional information about the deposit transaction.

quoteIdstring

This can be used to specify the quote ID for the deposit-convert transaction. Got from Convert estimation endpoint.

Request

POST
/v1/deposit/fiat
curl --location \
https://staging.wepay.to/v1/deposit/fiat \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
  "inputAmount": 10000,
  "inputCurrency": "IDR",
  "outputCurrency": "IDR",
  "balanceType": "fiat",
  "paymentMethod": "va_bni",
  "reference": "1234567890",
  "note": "Note 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,
        "outputCurrency": "IDR",
        "outputAmount": 4980,
        "fee": {
            "amount": 5020,
            "percentage": 50.2,
            "currency": "IDR"
        },
        "paymentFiat": {
            "bankName": "VA BNI",
            "bankCode": "va_bni",
            "accountName": "<ServiceName />",
            "accountNumber": "00000000"
        },
        "status": "pending",
        "activityHistory": [
            {
                "activity": "Paid by Payee",
                "status": "pending",
                "description": "Waiting for payment",
                "updatedAt": "2024-10-30T12:05:44.650Z"
            }
        ],
        "reference": "1234567890",
        "note": "Note 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": 15000,
    "outputCurrency": "IDR",
    "outputAmount": 14896.986,
    "fee": {
      "amount": 105.014,
      "percentage": 0.7,
      "currency": "IDR"
    },
    "paymentFiat": {
      "bankName": "QRIS",
      "bankCode": "qris",
      "qrData": "QR DATA"
    },
    "status": "pending",
    "activityHistory": [
      {
        "activity": "Paid by Payee",
        "status": "pending",
        "description": "Waiting for payment",
        "updatedAt": "2024-12-01T06:41:07.919Z",
        "_id": "674c05037b94b795a8440a0d"
      }
    ],
    "reference": "1",
    "expiredAt": "2024-12-01T10:41:07.919Z",
    "createdAt": "2024-12-01T06:41:07.952Z",
    "updatedAt": "2024-12-01T06:41:07.952Z"
  }
}

Response direct convert

{
  "statusCode": 201,
  "message": "Fiat deposit created",
  "data": {
    "depositId": "5d2df3ab-2f73-4a20-9b4c-f329bc1b10e6",
    "depositType": "fiat",
    "userId": "673c6c1454d8550b2d139779",
    "inputCurrency": "IDR",
    "inputAmount": 15000,
    "outputCurrency": "IDR",
    "outputAmount": 14896.986,
    "fee": {
      "amount": 105.014,
      "percentage": 0.7,
      "currency": "IDR"
    },
    "paymentFiat": {
      "bankName": "QRIS",
      "bankCode": "qris",
      "qrData": "QR DATA"
    },
    "status": "pending",
    "activityHistory": [
      {
        "activity": "Paid by Payee",
        "status": "pending",
        "description": "Waiting for payment",
        "updatedAt": "2024-12-01T06:41:07.919Z",
        "_id": "674c05037b94b795a8440a0d"
      }
    ],
    "reference": "1",
    "exchangeInfo": {
      "exchangeRate": 16868,
      "outputCurrency": "usdt-tron",
      "outputAmount": 0.951
    },
    "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"
}

POST/v1/deposit/crypto

Deposit Crypto

This endpoint initiates a crypto deposit transaction. To initiate a deposit, you must provide the inputCurrency and inputAmount.

Read the statusCode field in the response body rather than the HTTP status code.

Ensure that the inputCurrency is a valid crypto currency code and should transfer an amount exactly the same as inputAmount in response.

If the outputCurrency is a fiat currency, the amount will be converted directly using the current exchange rate.

Required attributes

FieldTypeDescription
inputCurrencystring

The crypto currency of the deposit.

inputAmountnumber

The amount of the deposit in the input currency.

outputCurrencystring

The output currency (fiat or crypto) of the deposit.

Optional, outputCurrency default value is same as inputCurrency

Optional attributes

FieldTypeDescription
referencestring

This can be the client transaction ID for the deposit transaction. If exists, should be unique

notestring

This can be used to store any additional information about the deposit transaction.

quoteIdstring

This can be used to specify the quote ID for the deposit-convert transaction. Got from Convert estimation endpoint.

Request

POST
/v1/deposit/crypto
curl --location \
https://staging.wepay.to/v1/deposit/crypto \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
  "inputCurrency": "usdt-tron",
  "inputAmount": 100,
  "reference": "1234567890",
  "note": "Note for order 123"
}'

Response

{
    "statusCode": 201,
    "message": "Crypto deposit created",
    "data": {
        "depositId": "4b509748-b2c2-4334-a251-8b0d79e5b750",
        "depositType": "crypto",
        "userId": "6719f68dd07aef516b9158ba",
        "inputCurrency": "usdt-tron",
        "inputAmount": 100,
        "outputCurrency": "usdt-tron",
        "outputAmount": 85,
        "reference": "1234567890",
        "note": "Note for order 123",
        "fee": {
            "amount": 5,
            "percentage": 10,
            "currency": "IDR"
        },
        "paymentCrypto": {
            "payoutWallet": "TDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "network": "tron"
        },
        "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"
    }
}

Response direct convert

{
    "statusCode": 201,
    "message": "Crypto deposit created",
    "data": {
      "depositId": "4b509748-b2c2-4334-a251-8b0d79e5b750",
      "depositType": "crypto",
      "userId": "6719f68dd07aef516b9158ba",
      "inputCurrency": "usdt-tron",
      "inputAmount": 100,
      "outputCurrency": "usdt-tron",
      "outputAmount": 85,
      "reference": "1234567890",
      "note": "Note for order 123",
      "fee": {
          "amount": 5,
          "percentage": 10,
          "currency": "IDR"
      },
      "paymentCrypto": {
          "payoutWallet": "TDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "network": "tron"
      },
      "status": "pending",
      "activityHistory": [
          {
              "activity": "Paid by Payee",
              "status": "pending",
              "description": "Waiting for payment",
              "updatedAt": "2024-10-30T12:05:44.650Z"
          }
      ],
      "exchangeInfo": {
        "exchangeRate": 16868,
        "outputCurrency": "IDR",
        "outputAmount": 1300000
      },
      "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": "Crypto not found"
}

PATCH/v1/deposit/:depositId/cancel

Cancel Deposit

This endpoint is used to cancel a deposit.

Request

PATCH
/v1/deposit/:depositId/cancel
curl --location \
  https://staging.wepay.to/v1/deposit/:depositId/cancel \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: ••••••'

Response

{
  "statusCode": 200,
  "message": "Deposit cancelled"
}

PATCH/v1/deposit/:depositId

[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

FieldTypeDescription
statusstring

The status of the deposit.

Request

PATCH
/v1/deposit/:depositId
curl --location --request PATCH 'https://staging.wepay.to/v1/deposit/24f8d87a-ee5c-42b6-81b1-0a2706430bd7' \
--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,
    "outputAmount": 4980,
    "fee": {
      "amount": 5020,
      "percentage": 50.2,
      "currency": "IDR"
    },
    "paymentFiat": {
      "bankName": "VA BNI",
      "bankCode": "va_bni",
      "accountName": "<ServiceName />",
      "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

Error Response

{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "Deposit not found"
}

GET/v1/deposit/payment-method

Deposit Fiat Payment Method

This endpoint is used to get the list of available payment methods for fiat deposit. You can filter the results by currency using the currency query parameter.

Request

GET
/v1/deposit/payment-method
# Get all payment methods
curl --location --request GET 'https://staging.wepay.to/v1/deposit/payment-method' \
--header 'Authorization: ••••••'

# Filter by currency (e.g., IDR)
curl --location --request GET 'https://staging.wepay.to/v1/deposit/payment-method?currency=IDR' \
--header 'Authorization: ••••••'

Response

    {
        "statusCode": 200,
        "message": "getDepositPayment executed successfully",
        "data": [
            {
                "depositPaymentType": "qris",
                "bankName": "qris",
                "bankCode": "qris",
                "currency": "IDR",
                "minimumAmount": 10000,
                "maximumAmount": 10000000,
                "image": "https://raw.githubusercontent.com/kosasih777/cdn/refs/heads/main/qris.png",
                "feeFlat": 1000,
                "feePercentage": 1
            },
            {
                "depositPaymentType": "va",
                "bankName": "VA BRI",
                "bankCode": "va_bri",
                "currency": "IDR",
                "minimumAmount": 15000,
                "maximumAmount": 50000000,
                "image": "https://raw.githubusercontent.com/kosasih777/cdn/refs/heads/main/bri.png",
                "feeFlat": 1000,
                "feePercentage": 1
            },
            {
                "depositPaymentType": "va",
                "bankName": "VA BNI",
                "bankCode": "va_bni",
                "currency": "IDR",
                "minimumAmount": 15000,
                "maximumAmount": 50000000,
                "image": "https://raw.githubusercontent.com/kosasih777/cdn/refs/heads/main/bni.jpeg",
                "feeFlat": 1000,
                "feePercentage": 1
            },
            {
                "depositPaymentType": "va",
                "bankName": "VA PERMATA",
                "bankCode": "va_permata",
                "currency": "IDR",
                "minimumAmount": 15000,
                "maximumAmount": 50000000,
                "image": "https://raw.githubusercontent.com/kosasih777/cdn/refs/heads/main/permata.png",
                "feeFlat": 1000,
                "feePercentage": 1
            }
        ]
    }

Did this page help you ship?