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

# Post Customer Information

> Send User information to Sardine to store theie information and create a risk profile



## OpenAPI

````yaml /api_reference/onramp.yaml post /customers
openapi: 3.0.3
info:
  version: '1.0'
  title: Crypto API
  description: Reference for Sardine Crypto API
  contact:
    email: support@sardine.io
    name: Sardine
    url: docs.sardine.io
servers:
  - url: https://api.sandbox.sardine.ai/v1
    description: Sandbox
  - url: https://api.sardine.ai/v1
    description: Prod Server
security: []
paths:
  /customers:
    post:
      tags:
        - User Onboarding
      summary: Post Customer Information
      description: >-
        Send User information to Sardine to store theie information and create a
        risk profile
      operationId: post-customers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                flow:
                  type: string
                  description: Merchant defined string that defines the flow the user is in
                  minLength: 1
                sessionKey:
                  type: string
                  description: uuid that identifies the given customer session
                  format: uuid
                  minLength: 1
                customer:
                  type: object
                  properties:
                    id:
                      type: string
                      description: >-
                        User ID hash. Please use the same value as passed to
                        device intelligence SDK
                      format: uuid
                      minLength: 1
                    taxId:
                      type: string
                      description: SSN or equivalent
                      minLength: 1
                    firstName:
                      type: string
                      description: First name of customer
                      minLength: 1
                    lastName:
                      type: string
                      description: Last name of customer
                      minLength: 1
                    dateOfBirth:
                      type: string
                      description: Date of birth in YYYY-MM-DD
                      format: date
                      minLength: 1
                    address:
                      type: object
                      properties:
                        street1:
                          type: string
                          description: Street name
                          minLength: 1
                        city:
                          type: string
                          description: City name
                          minLength: 1
                        regionCode:
                          type: string
                          description: 2 digit State or province code
                          minLength: 1
                        postalCode:
                          type: string
                          description: Postal or Zip code
                          minLength: 1
                        countryCode:
                          type: string
                          description: 2 digit Country code
                          minLength: 1
                      required:
                        - street1
                        - city
                        - regionCode
                        - postalCode
                        - countryCode
                    transaction:
                      type: object
                      properties:
                        id:
                          type: string
                          description: ID to be associated with transaction
                          format: uuid
                          minLength: 1
                        createdAtMillis:
                          type: number
                          description: Time of transaction in UNIX time
                        amount:
                          type: number
                          description: Transaction amount
                        itemCategory:
                          type: string
                          description: >-
                            Main item category in cart. e.g. crypto asset(ETH,
                            BTC), gift card, alcohol, generic
                          minLength: 1
                        actionType:
                          type: string
                          enum:
                            - buy
                            - sell
                            - deposit
                            - exchange
                            - withdraw
                            - refund
                            - payment
                            - topup
                            - transfer
                          description: >-
                            Indicates the type of transaction. If you need other
                            action types to be supported, please reach out to
                            the Sardine team.
                          minLength: 1
                        currencyCode:
                          type: string
                          description: 3-digit ISO 4217currency code
                          minLength: 1
                        paymentMethod:
                          type: object
                          properties:
                            type:
                              minLength: 1
                              enum:
                                - crypto
                            bank:
                              type: object
                              properties:
                                accountNumber:
                                  type: string
                                  description: Account number of banka account
                                  minLength: 1
                                routingNumber:
                                  type: string
                                  description: Routing number of bank account
                                  minLength: 1
                                accountType:
                                  type: string
                                  enum:
                                    - checking
                                    - savings
                                    - other
                                  description: Type of account
                                  minLength: 1
                                balance:
                                  type: number
                                  description: >-
                                    Last known bank balance in minor units like
                                    cents
                                balanceCurrencyCode:
                                  type: string
                                  description: 3 digit currency code
                                  minLength: 1
                              required:
                                - accountNumber
                                - routingNumber
                                - accountType
                                - balance
                                - balanceCurrencyCode
                          required:
                            - type
                            - bank
                      required:
                        - id
                        - createdAtMillis
                        - amount
                        - itemCategory
                        - actionType
                        - currencyCode
                        - paymentMethod
                    emailAddress:
                      type: string
                      description: Email address of customer
                      format: email
                      minLength: 1
                    isEmailVerified:
                      type: boolean
                      description: Set to true if email has been verified
                    phone:
                      type: string
                      description: Phone number including country
                      minLength: 1
                    isPhoneVerified:
                      type: boolean
                      description: >-
                        Set to true if phone has been verified via a one time
                        code
                    createdAtMills:
                      type: integer
                      description: >-
                        This is time the customer was onboarded/created in your
                        system. Please pass it as Unix timestamp in
                        milliseconds. e.g. 1622057169587 for Wed May 22021
                        19:26:09
                    personalInfo:
                      type: array
                      items:
                        type: object
                        properties:
                          source:
                            type: string
                            enum:
                              - id_verification
                              - bank_verification
                              - phone_verification
                            description: >-
                              Source of personal information obtained via
                              external third-party (non-Sardine) for
                              verification. Discuss with Sardine before using
                          firstName:
                            type: string
                            description: First name
                          middleName:
                            type: string
                            description: Middle name
                          lastName:
                            type: string
                            description: Last name
                          address:
                            type: object
                            properties:
                              street1:
                                type: string
                                description: Street
                              street2:
                                type: string
                              city:
                                type: string
                              regionCode:
                                type: string
                              postalCode:
                                type: string
                              countryCode:
                                type: string
                              company:
                                type: string
                          dateOfBirth:
                            type: string
                        required:
                          - source
                  required:
                    - id
                    - taxId
                    - firstName
                    - lastName
                    - dateOfBirth
                    - address
                    - transaction
                    - emailAddress
                    - isEmailVerified
                    - phone
                    - isPhoneVerified
              required:
                - flow
                - sessionKey
                - customer
              x-examples:
                example-1:
                  flow: string
                  sessionKey: string
                  personalInfo:
                    - source: plaid
                      firstName: string
                      middleName: string
                      lastName: string
                      address:
                        street1: string
                        street2: string
                        city: string
                        regionCode: string
                        postalCode: string
                        countryCode: string
                        company: string
                      phone: string
                      emailAddress: string
                      isEmailVerified: true
                      isPhoneVerified: true
                      dateOfBirth: string
                      identityObject: string
                  customer:
                    id: string
                    taxId: string
                    firstName: string
                    lastName: string
                    dateOfBirth: string
                    address:
                      street1: string
                      city: string
                      regionCode: string
                      postalCode: string
                      countryCode: string
                    transaction:
                      id: string
                      createdAtMillis: 0
                      amount: 0
                      itemCategory: string
                      actionType: string
                      currencyCode: string
                      paymentMethod:
                        type: string
                        bank:
                          accountNumber: string
                          routingNumber: string
                          accountType: string
                          balance: 0
                          balanceCurrencyCode: string
                    isEmailVerified: true
                    emailAddress: string
                    phone: string
                    isPhoneVerified: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
      security:
        - {}
      servers:
        - url: https://api.sandbox.sardine.ai/v1
          description: Sandbox
        - url: https://api.sardine.ai/v1
          description: Prod Server
components:
  schemas:
    Customer:
      type: object
      title: Customer
      properties:
        sessionKey:
          type: string
          minLength: 1
        level:
          type: string
          enum:
            - low
            - medium
            - high
            - very_high
          description: >-
            This is the ONLY field that a merchant needs to use to make decision
            on fraud. This field is set by our rules and the main rule is the
            rule using our "customer score" model.
          minLength: 1
        status:
          type: string
          enum:
            - Success
            - Failure
          minLength: 1
        customer:
          type: object
          properties:
            score:
              type: number
              description: >-
                ML Risk Score for the current customer session. The ML model
                used to predict the score is trained on velocity and aggregation
                features, phone, email, bank, tax, card, IP, location, device
                and behavior intelligence signals. The score can be used once
                feedback for historical transactions has been provided.
            level:
              type: string
              enum:
                - low
                - medium
                - high
                - very_high
              description: This field is based on the signals sent in the response.
              minLength: 1
            signals:
              type: array
              description: >-
                See
                https://docs.sardine.ai/api/reference/operation/v1-customers/
              minItems: 1
              uniqueItems: true
              items:
                type: object
                properties:
                  key:
                    type: string
                    minLength: 1
                  value:
                    type: string
                    minLength: 1
        transaction:
          type: object
          properties:
            level:
              type: string
              enum:
                - low
                - medium
                - high
              description: transaction risk level
              minLength: 1
            amlLevel:
              type: string
              enum:
                - low
                - medium
                - high
              description: aml risk level
              minLength: 1
            indemnification:
              type: object
              properties:
                decision:
                  type: string
                  enum:
                    - approved
                    - conditionally_approved
                    - rejected
                    - unknown
                  minLength: 1
                instantLimit:
                  type: number
                  description: >-
                    This is the withdrawal amount in cents that is immediately
                    available to the end-user. The remaining hold amount should
                    be kept on hold on your side until the time specified by
                    holdTime parameter below.
                holdAmount:
                  type: number
                  description: >-
                    This is the remaining amount in cents that is available
                    after the hold time is over. The hold time + instantLimit is
                    the total deposit amount.
                verificationCode:
                  type: string
                  minLength: 1
                holdTime:
                  type: string
                  description: >-
                    UNIX timestamp that represents time until you which should
                    hold part of fund
                  format: time
      x-examples:
        example-1:
          sessionKey: string
          level: string
          status: string
          customer:
            score: 0
            level: string
            signals:
              - key: string
                value: string
          transaction:
            level: string
            amlLevel: string
            indemnification:
              decision: string
              instantLimit: 0
              holdAmount: 0
              verificationCode: string
          checkpoints:
            customer:
              customerPurchaseLevel:
                value: string
                ruleIds:
                  - {}
              emailLevel:
                value: string
                ruleIds:
                  - {}
              historicalLevel:
                value: string
                ruleIds:
                  - {}
              riskLevel:
                value: string
                ruleIds:
                  - {}

````