Skip to main content

Payment Methods

Funds may be transferred to and from fiat balances using Payment Methods set up in Stripe.

Charge a Payment Method​

let deposit = await solidtx.wallets.deposit({
walletId: 'wallet_yxeh6q5mmpik8w6cyvc9zcnn',
stripePaymentMethodId: 'pm_1Q0PsIJvEtkwdCNYMSaVuRz6',
balanceId: 'cash',
amount: '25.00'
})

Parameters​


walletId stringRequired

ID of the Wallet


balanceId stringRequired

ID of the Balance


stripePaymentMethodId stringRequired

amount stringRequired

The amount to charge the Payment Method and deposit into the wallet. Must be positive.

Returns​

Creates and returns a new Deposit object.

{
"id": "deposit_cm8p0ruxb00000cjjg9ew2f02",
"walletId": "wallet_yxeh6q5mmpik8w6cyvc9zcnn",
"balanceId": "cash",
"amount": "10.00",
"status": "PENDING",
"createdAt": "2025-01-01T12:00:00Z",
"updatedAt": "2025-01-01T12:00:00Z",
"transaction": { ... }
}

Withdraw to a Payment Method​

let withdrawal = await solidtx.wallets.withdraw({
walletId: 'wallet_yxeh6q5mmpik8w6cyvc9zcnn',
stripePaymentMethodId: 'pm_1Q0PsIJvEtkwdCNYMSaVuRz6',
balanceId: 'cash',
amount: '25.00'
})

Parameters​


walletId stringRequired

ID of the Wallet


balanceId stringRequired

ID of the Balance


stripePaymentMethodId stringRequired

amount stringRequired

The amount to send to the Payment Method and withdraw from the wallet. Must be positive.

Returns​

Creates and returns a new Withdrawal object.

{
"id": "withdrawal_cm8p0ruxb00000cjjg9ew2f02",
"walletId": "wallet_yxeh6q5mmpik8w6cyvc9zcnn",
"balanceId": "cash",
"amount": "10.00",
"status": "PENDING",
"createdAt": "2025-01-01T12:00:00Z",
"updatedAt": "2025-01-01T12:00:00Z",
"transaction": { ... }
}