TransfersV2API

Provides suspend and callback-based functions for managing V2 transfers (/v2/transfers).

Secret-key calls use com.framepayments.framesdk.FrameAuthMode.Secret. Checkout creates and confirms with Authorization: Bearer chk_sess_… when a checkout client secret is passed.

Functions

Link copied to clipboard
suspend fun captureTransfer(transferId: String, request: TransferV2Requests.AmountOnlyRequest? = null, idempotencyKey: String? = null): Pair<TransferV2?, NetworkingError?>

Captures a manually authorized payment transfer (optional partial amount).

Link copied to clipboard
suspend fun confirmTransfer(transferId: String, checkoutClientSecret: String): Pair<TransferV2?, NetworkingError?>
fun confirmTransfer(transferId: String, checkoutClientSecret: String, completionHandler: (TransferV2?, NetworkingError?) -> Unit)

Confirms a V2 transfer with a checkout-session bearer.

fun confirmTransfer(transferId: String, request: TransferV2Requests.CreateTransferRequest? = null, completionHandler: (TransferV2?, NetworkingError?) -> Unit)

Confirms a deferred-confirm payment transfer and delivers the result via a callback.

suspend fun confirmTransfer(transferId: String, request: TransferV2Requests.CreateTransferRequest? = null, idempotencyKey: String? = null): Pair<TransferV2?, NetworkingError?>

Confirms a deferred-confirm payment transfer (secret key).

Link copied to clipboard
suspend fun createTransfer(request: TransferV2Requests.CreateTransferRequest, idempotencyKey: String? = null, accountId: String? = null): Pair<TransferV2?, NetworkingError?>

Creates a V2 transfer. Requires an Idempotency-Key (generated when idempotencyKey is null or blank).

suspend fun createTransfer(request: TransferV2Requests.CreateTransferRequest, checkoutClientSecret: String, idempotencyKey: String? = null, accountId: String? = null): Pair<TransferV2?, NetworkingError?>

Creates a V2 transfer under a checkout session.

fun createTransfer(request: TransferV2Requests.CreateTransferRequest, idempotencyKey: String? = null, accountId: String? = null, completionHandler: (TransferV2?, NetworkingError?) -> Unit)

Creates a V2 transfer and delivers the result via a callback.

Link copied to clipboard
suspend fun getTransfers(perPage: Int? = null, page: Int? = null): Pair<TransferV2Responses.ListTransfersResponse?, NetworkingError?>

Retrieves a paginated list of V2 transfers.

fun getTransfers(perPage: Int?, page: Int?, completionHandler: (TransferV2Responses.ListTransfersResponse?, NetworkingError?) -> Unit)

Retrieves a paginated list of V2 transfers and delivers the result via a callback.

Link copied to clipboard
suspend fun getTransferWith(transferId: String): Pair<TransferV2?, NetworkingError?>

Retrieves an existing V2 transfer by its identifier.

fun getTransferWith(transferId: String, completionHandler: (TransferV2?, NetworkingError?) -> Unit)

Retrieves an existing V2 transfer by its identifier and delivers the result via a callback.

suspend fun getTransferWith(transferId: String, checkoutClientSecret: String): Pair<TransferV2?, NetworkingError?>
fun getTransferWith(transferId: String, checkoutClientSecret: String, completionHandler: (TransferV2?, NetworkingError?) -> Unit)

Retrieves a V2 transfer with a checkout-session bearer.

Link copied to clipboard
suspend fun refundTransfer(transferId: String, request: TransferV2Requests.AmountOnlyRequest? = null, idempotencyKey: String? = null): Pair<TransferV2?, NetworkingError?>

Refunds a succeeded payment transfer (optional partial amount).

Link copied to clipboard

Updates a deferred-confirm payment transfer before confirm.

Link copied to clipboard
suspend fun voidTransfer(transferId: String, idempotencyKey: String? = null): Pair<TransferV2?, NetworkingError?>

Voids a manually authorized payment transfer.