POST
/
api
/
v1
/
transactions
/
wallet
/
card-deposit
/
create
Create Card Deposit
curl --request POST \
  --url https://hpay-api.host-sl.com/api/v1/transactions/wallet/card-deposit/create \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '
{
  "wallet_id": "<string>",
  "amount": 123,
  "payment_method_id": "<string>"
}
'
{
  "id": "trans_123abc...",
  "wallet_id": "wall_789xyz...",
  "amount": 95.0,
  "currency": "USD",
  "transaction_type": "deposit",
  "payment_method": "card",
  "status": "pending",
  "total_amount_paid": 100.0,
  "stripe_fee": 3.0,
  "application_fee": 2.0,
  "created_at": "2025-01-16T10:00:00Z"
}
This endpoint initiates a card deposit to a user’s wallet. It creates a Stripe PaymentIntent that the client must confirm to complete the deposit.

Request Body

wallet_id
string
required
The unique identifier of the wallet to deposit funds into.
amount
number
required
The amount to deposit in the wallet’s base currency (e.g., 100.00 for $100.00 USD).
payment_method_id
string
Optional Stripe PaymentMethod ID (pm_...) to reuse from fee estimation. If provided, the user won’t need to enter card details again.

Response

id
string
The unique identifier for the transaction.
wallet_id
string
The ID of the wallet receiving the deposit.
amount
number
The net amount to be credited to the wallet.
currency
string
The currency code (e.g., “USD”).
status
string
The current status of the transaction (e.g., “pending”, “completed”, “failed”).
total_amount_paid
number
The total amount paid by the user, including all platform and provider fees.
stripe_fee
number
The fee charged by Stripe for processing the payment.
application_fee
number
The platform fee collected by your application.
{
  "id": "trans_123abc...",
  "wallet_id": "wall_789xyz...",
  "amount": 95.0,
  "currency": "USD",
  "transaction_type": "deposit",
  "payment_method": "card",
  "status": "pending",
  "total_amount_paid": 100.0,
  "stripe_fee": 3.0,
  "application_fee": 2.0,
  "created_at": "2025-01-16T10:00:00Z"
}
curl --request POST \
  --url https://hpay-api.host-sl.com/api/v1/transactions/wallet/card-deposit/create \
  --header 'api-key: YOUR_API_KEY' \
  --header 'secret-key: YOUR_SECRET_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "wallet_id": "wall_789xyz...",
    "amount": 100.00
  }'