Skip to content
GitHub

Payment liquidity

Payment liquidity represents:

  • The value received from a completed incoming payment
  • The value available to send in an outgoing payment

Because Rafiki doesn’t hold funds, anything you receive in an incoming payment must be withdrawn and then credited to the recipient’s account on your ledger. Listen for the incoming payments webhook events to know when you need to interact with Rafiki.

Any excess liquidity that remains after an outgoing payment completes must be withdrawn. You may also find that you must deposit liquidity into Rafiki to fund an outgoing payment. Listen for Rafiki’s outgoing payments webhook events to know when action is required on your part.

For more information about how Rafiki handles liquidity, see the Accounting concepts page.

Manage payment liquidity using the Backend Admin API

Withdraw incoming payment liquidity

mutation CreateIncomingPaymentWithdrawal($input: CreateIncomingPaymentWithdrawalInput!) {
createIncomingPaymentWithdrawal(input: $input) {
success
}
}

Deposit outgoing payment liquidity

mutation DepositOutgoingPaymentLiquidity($input: DepositOutgoingPaymentLiquidityInput!) {
depositOutgoingPaymentLiquidity(input: $input) {
success
}
}

Withdraw outgoing payment liquidity

mutation CreateOutgoingPaymentWithdrawal($input: CreateOutgoingPaymentWithdrawalInput!) {
createOutgoingPaymentWithdrawal(input: $input) {
success
}
}