> ## Documentation Index
> Fetch the complete documentation index at: https://docs.capa.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute Off-Ramp

> Executes a previously created off-ramp transaction. This endpoint triggers the actual processing of the off-ramp transaction after crypto funds have been received.

Executes a previously created off-ramp transaction, triggering the fiat payout to the user's bank account. Call this after the user has sent crypto to the `destinationWalletAddress` returned by the [Create Off-Ramp](/reference/offramppartnerv2controller_createpartnerofframp) endpoint.

***

## Transaction Status Values

| Status                      | Description                             |
| :-------------------------- | :-------------------------------------- |
| `PENDING`                   | Transaction is pending processing.      |
| `IN_PROGRESS`               | Transaction is being processed.         |
| `COMPLETED`                 | Transaction has completed successfully. |
| `FAILED`                    | Transaction has failed.                 |
| `CANCELLED`                 | Transaction was cancelled.              |
| `CRYPTO_RECEIVED`           | Crypto payment has been received.       |
| `CRYPTO_NOT_RECEIVED`       | Crypto payment was not received.        |
| `COMPLETED_CRYPTO_RECEIVAL` | Crypto receival process has completed.  |
| `BANK_TRANSFER_PENDING`     | Bank transfer is pending.               |
| `READY_BANK_TRANSFER`       | Ready to initiate bank transfer.        |

***

## Important Notes

* The `transactionId` must reference a valid off-ramp transaction created via [Create Off-Ramp](/reference/offramppartnerv2controller_createpartnerofframp).
* The transaction must belong to the partner associated with the API key.
* Optionally include `transactionHash`, the blockchain hash of the user's crypto transfer, to help Capa locate and confirm the incoming funds. It must be a valid blockchain hash.

***

## Use Cases

* **Manual Execution**: Trigger execution after verifying crypto receipt.
* **Workflow Integration**: Separate transaction creation from execution in automated workflows.

***

## Error Codes

### Common Errors

| HTTP Status | Code           | Message                  |
| ----------- | -------------- | ------------------------ |
| 401         | `UNAUTHORIZED` | "API Key is missing"     |
| 401         | `UNAUTHORIZED` | "Invalid API Key format" |
| 401         | `UNAUTHORIZED` | "Invalid API Key"        |

### Endpoint-Specific Errors

| HTTP Status | Code                        | Message                                       |
| ----------- | --------------------------- | --------------------------------------------- |
| 400         | `INVALID_USER_INPUT_ERROR`  | "Invalid User Input"                          |
| 404         | `TRANSACTION_NOT_FOUND`     | "Transaction not found"                       |
| 403         | `TRANSACTION_ACCESS_DENIED` | "Transaction does not belong to this partner" |


## OpenAPI

````yaml reference/openapi/OffRampPartnerV2Controller_executeOffRamp.json POST /api/partner/v2/off-ramp/execute
openapi: 3.0.0
info:
  title: Capa Partner API - V2
  description: >-
    Partner API for integrating cryptocurrency on-ramp and off-ramp services
    using Capa's infrastructure. Enable your users to seamlessly convert between
    fiat and crypto.
  version: v2
  contact: {}
servers:
  - url: https://staging-api.capa.fi
  - url: https://production-api.capa.fi
security: []
paths:
  /api/partner/v2/off-ramp/execute:
    post:
      tags:
        - off-ramp
      summary: Execute an off-ramp transaction
      description: >-
        Executes a previously created off-ramp transaction. This endpoint
        triggers the actual processing of the off-ramp transaction after crypto
        funds have been received.
      operationId: OffRampPartnerV2Controller_executeOffRamp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                transactionId:
                  type: string
                  format: uuid
                  description: Identifier for the off-ramp transaction to execute
                  example: 8374f327-38bd-4b0b-b8a7-2524599eb903
                transactionHash:
                  type: string
                  description: >-
                    The blockchain transaction hash of the user's crypto
                    transfer
                  example: >-
                    0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0
              required:
                - transactionId
              x-readme-ref-name: ExecuteOffRampRequestBody
      responses:
        '201':
          description: Transaction execution initiated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: The identifier for the off-ramp transaction
                        example: 8374f327-38bd-4b0b-b8a7-2524599eb903
                      status:
                        type: string
                        description: Current status of the transaction after execution
                        example: PENDING
                        enum:
                          - PENDING
                          - IN_PROGRESS
                          - COMPLETED
                          - FAILED
                          - CANCELLED
                          - CRYPTO_RECEIVED
                          - CRYPTO_NOT_RECEIVED
                          - COMPLETED_CRYPTO_RECEIVAL
                          - BANK_TRANSFER_PENDING
                          - READY_BANK_TRANSFER
                    required:
                      - id
                      - status
                    x-readme-ref-name: ExecuteOffRampResponse
              example:
                success: true
                data:
                  id: 8374f327-38bd-4b0b-b8a7-2524599eb903
                  status: PENDING
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                INVALID_USER_INPUT_ERROR:
                  value:
                    success: false
                    code: INVALID_USER_INPUT_ERROR
                    message: Invalid User Input
                BAD_REQUEST:
                  value:
                    success: false
                    code: BAD_REQUEST
                    message: >-
                      Cannot execute off-ramp transaction: transaction is not an
                      off-ramp
                BAD_REQUEST_2:
                  value:
                    success: false
                    code: BAD_REQUEST
                    message: >-
                      Cannot execute off-ramp transaction: transaction is in
                      status {status}, expected PENDING or PENDING_PAYMENT
                BAD_REQUEST_3:
                  value:
                    success: false
                    code: BAD_REQUEST
                    message: >-
                      Cannot execute off-ramp transaction: partner is not
                      configured for manual off-ramp execution
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                UNAUTHORIZED:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: API Key is missing
                UNAUTHORIZED_2:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: Invalid API Key format
                UNAUTHORIZED_3:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: Invalid API Key
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: PARTNER_NOT_OWNER_OF_TRANSACTION_ERROR
                message: Partner is not the owner of the transaction.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: NOT_FOUND_ERROR
                message: Requested resource was not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: INTERNAL_SERVER_ERROR
                message: Internal server error
      security:
        - PartnerApiKey: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable error message.
        errors:
          type: array
          description: Optional per-field validation details.
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
      required:
        - success
        - code
        - message
  securitySchemes:
    PartnerApiKey:
      type: apiKey
      in: header
      name: partner-api-key
      description: API key for the affiliated partner performing the request.

````