# Approve a pending redemption

Approves a transaction held in PENDING status (flexible redemption) and directs it.
Set type to FIAT to settle to your default bank account (creates a REDEMPTION), or
to CRYPTO with a walletId to bridge to one of your wallets (creates a BRIDGE).

Re-submitting the same destination after the transaction has moved to PROCESSING is
idempotent and returns 200. Submitting a different destination, or approving a
transaction that was never PENDING, returns 409.

Endpoint: PUT /v1/stablecoin/transactions/{id}/destination
Version: 1.0.0
Security: oauth2

## Path parameters:

  - `id` (string, required)
    Transaction UUID

## Request fields (application/json):

  - `type` (string, required)
    Destination type. FIAT creates a REDEMPTION settled to your default bank account;
CRYPTO creates a BRIDGE transfer to one of your wallets.
    Enum: "FIAT", "CRYPTO"

  - `walletId` (string)
    Target wallet identifier (e.g. RIP0000001). Required when type is CRYPTO;
must be omitted when type is FIAT.

## Response 200 fields (application/json):

  - `id` (string, required)
    Unique transaction identifier

  - `type` (string,null)
    Transaction type. Null while the transaction is PENDING (flexible redemption)
and a destination has not yet been chosen.
    Enum: "ISSUANCE", "REDEMPTION", "BRIDGE"

  - `status` (string, required)
    Current transaction status. COMPLETED, FAILED, and CANCELED are terminal.
CANCELED currently applies to ISSUANCE transactions canceled before settlement.
PENDING applies to flexible-redemption transactions awaiting approval via
[Approve a pending redemption](#operation/updateTransactionDestination); type and
destination are null until approved.
    Enum: "PROCESSING", "PENDING", "COMPLETED", "FAILED", "CANCELED"

  - `amount` (string, required)
    Transaction amount as a decimal string (e.g. "10000.00")

  - `token` (string, required)
    Always RLUSD
    Enum: "RLUSD"

  - `source` (object, required)

  - `source.type` (string, required)
    Endpoint type
    Enum: "FIAT", "CRYPTO"

  - `source.walletId` (string,null)
    Wallet identifier (e.g. RIP0000001). Present when type is CRYPTO.

  - `source.address` (string,null)
    The customer's on-chain address on this leg. Present when type is CRYPTO
and the on-chain leg has been initiated. EVM addresses include the 0x prefix.

  - `source.chain` (string,null)
    Blockchain network name (e.g. XRPL, ETH). Present when type is CRYPTO.

  - `source.transactionHash` (string,null)
    On-chain transaction hash for this leg. Present when type is CRYPTO and the on-chain leg has settled.
EVM chains (e.g. ETH) return the hash with the 0x prefix; XRPL hashes are
uppercase hex without a prefix.

  - `source.counterpartyAddress` (string,null)
    The Ripple-side internal account address that participated in this on-chain leg
(the counterparty to your wallet). Present when type is CRYPTO and the on-chain leg
has been initiated. EVM addresses include the 0x prefix.

  - `destination` (object,null)
    Destination endpoint. Null while the transaction is PENDING (flexible redemption)
and a destination has not yet been chosen.

  - `destination.type` (string, required)
    Endpoint type
    Enum: "FIAT", "CRYPTO"

  - `destination.walletId` (string,null)
    Wallet identifier (e.g. RIP0000001). Present when type is CRYPTO.

  - `destination.address` (string,null)
    The customer's on-chain address on this leg. Present when type is CRYPTO
and the on-chain leg has been initiated. EVM addresses include the 0x prefix.

  - `destination.chain` (string,null)
    Blockchain network name (e.g. XRPL, ETH). Present when type is CRYPTO.

  - `destination.transactionHash` (string,null)
    On-chain transaction hash for this leg. Present when type is CRYPTO and the on-chain leg has settled.
EVM chains (e.g. ETH) return the hash with the 0x prefix; XRPL hashes are
uppercase hex without a prefix.

  - `destination.counterpartyAddress` (string,null)
    The Ripple-side internal account address that participated in this on-chain leg
(the counterparty to your wallet). Present when type is CRYPTO and the on-chain leg
has been initiated. EVM addresses include the 0x prefix.

  - `createdAt` (string, required)
    Timestamp when the transaction was created

  - `updatedAt` (string, required)
    Timestamp when the transaction was last updated

## Response 400 fields (application/problem+json):

  - `type` (string)
    URI reference identifying the problem type

  - `title` (string)
    Short, human-readable summary of the problem

  - `status` (integer)
    HTTP status code

  - `code` (string)
    Machine-readable error code
    Enum: "TRANSACTION_NOT_FOUND", "TRANSACTION_INVALID_STATUS_TRANSITION", "TRANSACTION_DESTINATION_TYPE_IMMUTABLE", "INVALID_REQUEST_BODY", "UNKNOWN_EXCEPTION"


