# Create payin transaction

Creates pay-in transaction for the given request

Endpoint: POST /public/payin
Version: 2.0.0
Security: bearerAuth

## Request fields (application/json):

  - `orderId` (string, required)
    Unique identifier for payin session
    Example: "944732c4608c441aa91379478b91f76e"

  - `amount` (number, required)
    PayIn transaction amount
    Example: 100

  - `currency` (string, required)
    PayIn transaction currency. If processor psp doesn't allow this currency but if this currency is enabled it will be automatically converted to PSP currency and final transaction currency will be set respectively.
    Example: "USD"

  - `kycVerified` (boolean, required)
    Whether or not this customer is KYC verified in your system. This flag is required to determine right PSP to process this payin.

  - `customer` (object, required)
    Customer information

  - `customer.externalUserId` (string, required)
    Your defined unique identifier for this customer.
    Example: "123456789"

  - `customer.firstName` (string, required)
    Customer first name
    Example: "John"

  - `customer.lastName` (string, required)
    Customer last name
    Example: "Doe"

  - `customer.email` (string, required)
    Customer email
    Example: "john.doe@example.com"

  - `customer.phoneNumber` (string, required)
    Customer phone number
    Example: "1 1234567890"

  - `customer.dateOfBirth` (string, required)
    Customer date of birth
    Example: "1990-12-01"

  - `customer.billing` (object, required)
    Customer billing information

  - `customer.billing.address` (string, required)
    Customer billing address
    Example: "123 Main St"

  - `customer.billing.city` (string, required)
    Customer billing city
    Example: "Atlanta"

  - `customer.billing.state` (string, required)
    Customer billing state
    Example: "GA"

  - `customer.billing.countryCode` (string, required)
    Customer billing country code (ISO 3166-1 alpha-2)
    Example: "US"

  - `customer.billing.postalCode` (string, required)
    Customer billing postal code
    Example: "30308"

  - `customer.kyc` (object)
    Customer KYC information

  - `customer.kyc.idType` (string)

  - `customer.kyc.idNumber` (string)

  - `customer.kyc.idCountry` (string)

  - `customer.kyc.idExpirationDate` (string)

  - `customer.kyc.nationality` (string)

  - `customer.kyc.countryOfBirth` (string)

  - `previousTransactionCount` (integer, required)
    Number of previous transactions in different payment system.
    Example: 1

  - `returnUrls` (object, required)
    Return URLs after transaction is finished.

  - `returnUrls.success` (string, required)
    Url where user will be redirected after successful transaction.
    Example: "https://example.com/success"

  - `returnUrls.failure` (string, required)
    Url where user will be redirected after failed transaction.
    Example: "https://example.com/failure"

  - `routerId` (string)
    Specific router ID to process transaction with.
    Example: "944732c4608c441aa91379478b91f76e"

  - `directRouteId` (string)
    Direct link route ID to process transaction with.
    Example: "944732c4608c441aa91379478b91f76e"

  - `merchantAdditionalData` (object)
    Additional data for the transaction

## Response 200 fields (application/json):

  - `paymentId` (string, required)
    Payment ID
    Example: "944732c4608c441aa91379478b91f76e"

  - `status` (string, required)
    Payment status
    Enum: "CREATED", "PENDING", "PENDING_3DS", "SUCCESS", "REFUNDED", "PARTIALLY_REFUNDED", "DECLINED", "FAILED", "TIMEOUT", "REFUND_FAILED", "REFUND_PENDING"

  - `iframeUrls` (object, required)
    Payment Iframe URLs

  - `iframeUrls.card` (string, required)
    Card IFrame URL
    Example: "https://checkout.omno.com/payments/<transactionType>/<paymentId>/card"

  - `iframeUrls.apm` (string, required)
    Alternate Payment Method IFrame URL
    Example: "https://checkout.omno.com/payments/<transactionType>/<paymentId>/apm"

## Response 400 fields (application/json):

  - `errorKey` (string)

  - `errorMessage` (string)

  - `errorCode` (integer)

## Response 401 fields (application/json):

  - `errorKey` (string)

  - `errorMessage` (string)

  - `errorCode` (integer)

## Response 403 fields (application/json):

  - `errorKey` (string)

  - `errorMessage` (string)

  - `errorCode` (integer)

## Response 404 fields (application/json):

  - `errorKey` (string)

  - `errorMessage` (string)

  - `errorCode` (integer)

## Response 409 fields (application/json):

  - `errorKey` (string)

  - `errorMessage` (string)

  - `errorCode` (integer)

## Response 500 fields (application/json):

  - `errorKey` (string)

  - `errorMessage` (string)

  - `errorCode` (integer)


