> ## 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.

# Create Receiver

Creates a receiver for third-party payments. Receivers represent individuals or businesses who can receive funds through off-ramp or cross-ramp transactions on behalf of a user.

***

## Field Relationships

* Set `receiverType` to `INDIVIDUAL` or `BUSINESS` — this determines which fields are required.
* **INDIVIDUAL** requires: `firstName`, `lastName`, `countryOfBirth`.
* **BUSINESS** requires: `businessName`, `countryOfConstitution`.
* `pepInfo` is required only when `isPep` is `true`.

***

## Use Cases

* **Third-party payments**: Create receivers so users can send off-ramp payouts to other individuals or businesses.
* **Payroll**: Set up employees or contractors as receivers for automated payouts.

***

## 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"                  |
| 403         | `INVALID_PARTNER_FLOW` | "The partner has an invalid flow." |

### User Ownership Errors

| HTTP Status | Code           | Message                                              |
| ----------- | -------------- | ---------------------------------------------------- |
| 401         | `UNAUTHORIZED` | "Partner information is required for this operation" |
| 401         | `UNAUTHORIZED` | "User is not associated with the partner"            |

### Endpoint-Specific Errors

| HTTP Status | Code                       | Message                                              |
| ----------- | -------------------------- | ---------------------------------------------------- |
| 400         | `INVALID_USER_INPUT_ERROR` | "Invalid User Input"                                 |
| 400         | `BAD_REQUEST`              | "Provided email {email} is not valid"                |
| 500         | `RECEIVER_CREATION_FAILED` | "Failed to create receiver. Please try again later." |


## OpenAPI

````yaml reference/openapi/ReceiverPartnerControllerV2_createReceiver.json POST /api/partner/v2/receivers
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/receivers:
    post:
      tags:
        - receivers
      operationId: ReceiverPartnerControllerV2_createReceiver
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  type: string
                  description: User ID who owns this receiver
                  example: 550e8400-e29b-41d4-a716-446655440000
                receiverType:
                  description: Type of receiver (INDIVIDUAL or BUSINESS)
                  example: INDIVIDUAL
                  enum:
                    - INDIVIDUAL
                    - BUSINESS
                  type: string
                email:
                  type: string
                  description: Email address of the receiver
                  example: john.doe@example.com
                taxId:
                  type: string
                  description: Tax identification number
                  example: RFC123456789
                firstName:
                  type: string
                  description: First name (required for INDIVIDUAL)
                lastName:
                  type: string
                  description: Last name (required for INDIVIDUAL)
                countryOfBirth:
                  description: Country of birth (required for INDIVIDUAL)
                  enum:
                    - MX
                    - DO
                    - US
                    - AT
                    - BE
                    - BG
                    - HR
                    - CY
                    - CZ
                    - DK
                    - EE
                    - FI
                    - FR
                    - DE
                    - GR
                    - HU
                    - IE
                    - IT
                    - LV
                    - LT
                    - LU
                    - MT
                    - NL
                    - PL
                    - PT
                    - RO
                    - SK
                    - SI
                    - ES
                    - SE
                    - IS
                    - LI
                    - 'NO'
                    - CH
                    - GB
                    - MC
                    - SM
                    - AD
                    - VA
                  type: string
                dateOfBirth:
                  type: string
                  description: Date of birth (ISO date format)
                businessName:
                  type: string
                  description: Legal name (required for BUSINESS)
                countryOfConstitution:
                  description: Country of constitution (required for BUSINESS)
                  enum:
                    - MX
                    - DO
                    - US
                    - AT
                    - BE
                    - BG
                    - HR
                    - CY
                    - CZ
                    - DK
                    - EE
                    - FI
                    - FR
                    - DE
                    - GR
                    - HU
                    - IE
                    - IT
                    - LV
                    - LT
                    - LU
                    - MT
                    - NL
                    - PL
                    - PT
                    - RO
                    - SK
                    - SI
                    - ES
                    - SE
                    - IS
                    - LI
                    - 'NO'
                    - CH
                    - GB
                    - MC
                    - SM
                    - AD
                    - VA
                  type: string
                dateOfConstitution:
                  type: string
                  description: Date of constitution (ISO date format)
                phoneNumber:
                  type: string
                  description: Phone number
                isPep:
                  type: boolean
                  description: Whether the receiver is a Politically Exposed Person
                hasBeneficialOwner:
                  type: boolean
                  description: Declaration of beneficial owner existence
                hasResourceProvider:
                  type: boolean
                  description: Declaration of resource provider existence
              required:
                - userId
                - receiverType
                - email
                - taxId
              x-readme-ref-name: CreateReceiverPartnerBody
      responses:
        '201':
          description: >-
            Receiver created successfully. Returns the receiver details,
            including its id.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Receiver ID
                        example: 9486244c-ff7d-4c22-9984-797179d7deaa
                      userId:
                        type: string
                        description: User ID who created this receiver
                        example: 1234567c-ff7d-4c22-9984-797179d7deaa
                      receiverType:
                        type: string
                        description: Type of receiver
                        example: INDIVIDUAL
                        enum:
                          - INDIVIDUAL
                          - BUSINESS
                      email:
                        type: string
                        description: Email address
                        example: john.doe@example.com
                      disabled:
                        type: boolean
                        description: Whether receiver is disabled
                        example: false
                      createdAt:
                        type: string
                        description: Creation timestamp
                        example: '2024-04-05T13:45:27.063Z'
                      updatedAt:
                        type: string
                        description: Last update timestamp
                        example: '2024-04-05T13:45:27.063Z'
                    required:
                      - id
                      - userId
                      - receiverType
                      - email
                      - disabled
                      - createdAt
                      - updatedAt
                    x-readme-ref-name: ReceiverHttpResponse
              example:
                success: true
                data:
                  id: 9486244c-ff7d-4c22-9984-797179d7deaa
                  userId: 1234567c-ff7d-4c22-9984-797179d7deaa
                  receiverType: INDIVIDUAL
                  email: john.doe@example.com
                  disabled: false
                  createdAt: '2024-04-05T13:45:27.063Z'
                  updatedAt: '2024-04-05T13:45:27.063Z'
        '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
                REQUIRED_USER_ID_ERROR:
                  value:
                    success: false
                    code: REQUIRED_USER_ID_ERROR
                    message: This endpoint requires a user id to be provided
        '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
                UNAUTHORIZED_4:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: Partner information is required for this operation
                UNAUTHORIZED_5:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: User is not associated with the partner
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: USER_NOT_VERIFIED_ERROR
                message: >-
                  User is not allowed to perform the operations because has not
                  completed the KYC verification.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                RECEIVER_CREATION_FAILED:
                  value:
                    success: false
                    code: RECEIVER_CREATION_FAILED
                    message: Failed to create receiver. Please try again later.
                INTERNAL_SERVER_ERROR:
                  value:
                    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.

````