ChargeAfter Sessions V3 API

The SessionsV3 API from ChargeAfter — 1 operation(s) for sessionsv3.

OpenAPI Specification

chargeafter-sessionsv3-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Checkout Management Sessions V3 API
  description: Welcome to ChargeAfter API reference! This API is implemented in a RESTful state of mind, it has straight-forward, resource-oriented endpoints, and produces standard HTTP response codes to communicate back the result of operations. To get started please contact ChargeAfter support to get your API keys, and get an access to your testing and live environments.
  termsOfService: https://chargeafter.com/privacy-policy
  contact:
    name: Customer Support
    email: support@chargeafter.com
  version: 3.0.22+7e1a9d5f054dd9d981fc916bc81e7d98826a01ee
servers:
- url: https://api-sandbox.ca-dev.co
  description: Local Environment
- url: https://api.chargeafter.com
  description: Production Environment
security:
- apiKey: []
tags:
- name: SessionsV3
paths:
  /v3/session:
    post:
      tags:
      - SessionsV3
      summary: Create a new session
      description: Creates a session with an optional cart, consumer and checkout details.
      parameters: []
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
              - $ref: '#/components/schemas/ChargeAfter.BFF.WebApi.Contracts.CreateSessionRequestBodyV3'
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/ChargeAfter.BFF.WebApi.Contracts.CreateSessionRequestBodyV3'
          text/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/ChargeAfter.BFF.WebApi.Contracts.CreateSessionRequestBodyV3'
          application/*+json:
            schema:
              allOf:
              - $ref: '#/components/schemas/ChargeAfter.BFF.WebApi.Contracts.CreateSessionRequestBodyV3'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ChargeAfter.BFF.WebApi.Contracts.CreateSessionResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeAfter.BFF.WebApi.Contracts.CreateSessionResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ChargeAfter.BFF.WebApi.Contracts.CreateSessionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  requestId:
                    type: string
                    example: Unique RequestId
                  message:
                    type: string
                    example: Message Describing The Error
        '401':
          description: Unauthorized
        '422':
          description: Input Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  requestId:
                    type: string
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      properties:
                        field:
                          type: string
                        validationState:
                          type: string
                        error:
                          type: string
                example:
                  RequestId: Unique RequestId
                  Message: Input Validation Failure
                  Errors:
                  - Field: RequestField1
                    ValidationState: Invalid
                    Error: RequestField1 should be up to 150 characters, and can contain a-z, A-Z, _ characters.
        '500':
          description: General Server Error
          content:
            application/json:
              schema:
                example:
                  requestId: Unique RequestId
                  errors:
                  - code: '1'
                    description: Internal unknown error occurred
components:
  schemas:
    ChargeAfter.BFF.WebApi.Contracts.CreateSessionRequestBodyV3:
      required:
      - checkoutDetails
      type: object
      properties:
        consumerDetails:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.BFF.WebApi.Contracts.Models.ConsumerDetails'
          description: Optional consumer details
        cartDetails:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.Requests.Models.CartDetails'
          description: Order cart details. Mandatory for checkout, optional for apply flow.
        merchantDetails:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.BFF.WebApi.Contracts.Models.MerchantDetails'
          description: Optional merchant details
        checkoutDetails:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.BFF.WebApi.Contracts.Models.CheckoutDetailsV3'
          description: Checkout details
        userId:
          type:
          - string
          - 'null'
          description: Optional user id
        linkId:
          type:
          - string
          - 'null'
          description: Optional Omni-Link id
      additionalProperties: false
    ChargeAfter.BFF.WebApi.Contracts.CreateSessionResponse:
      required:
      - applicationId
      - expirationDate
      - id
      type: object
      properties:
        id:
          minLength: 1
          type: string
          description: SessionToken
        expirationDate:
          minLength: 1
          type: string
          description: Expiration date for the created session.
        applicationId:
          minLength: 1
          type: string
          description: Unique identifier of the application
        isContinuation:
          type: boolean
        deviceSessionId:
          type:
          - string
          - 'null'
        merchantDetails:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.BFF.WebApi.Contracts.Responses.Models.SessionMerchantDetailsResponse'
      additionalProperties: false
    ChargeAfter.Contracts.Source:
      enum:
      - Api
      - Dashboard
      - Sdk
      - Managed
      - Consumers
      - CheckoutApi
      - Distributor
      - Widget
      type: string
    ChargeAfter.Libraries.WebApi.Contracts.Language:
      enum:
      - En
      - Fr
      type: string
    ChargeAfter.Libraries.WebApi.Contracts.MarriageStatus:
      enum:
      - Not Married
      - Married
      type: string
      description: This Enum created to match UI select control.
    ChargeAfter.Libraries.Entities.IntentSafe:
      enum:
      - ExistingAccount
      - Authenticate
      - ConfirmPayment
      - StandaloneLookup
      type: string
    ChargeAfter.Libraries.Entities.ResidenceType:
      enum:
      - OWN
      - RENT
      - OTHER
      type: string
    ChargeAfter.Libraries.WebApi.Contracts.Requests.Models.Item:
      required:
      - price
      - quantity
      type: object
      properties:
        name:
          type:
          - string
          - 'null'
          description: Item name.
          example: Awesome Product
        price:
          type: number
          description: Price of a single item.
          format: double
          example: 1999
        sku:
          type:
          - string
          - 'null'
          description: Item SKU.
          example: AWSMPRDCT
        quantity:
          type: integer
          description: Number of items.
          format: int32
          example: 2
        leasable:
          type:
          - boolean
          - 'null'
          description: Indicates if the item is leasable (i.e. can be financed by LTO lender).
          example: true
        productCategory:
          type:
          - string
          - 'null'
          description: Optional product category.
          example: Product category
        warranty:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.Requests.Models.Warranty'
          description: Optional warranty for the item.
        taxAmount:
          type:
          - number
          - 'null'
          description: Optional tax amount.
          format: double
          example: 199
        discounts:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.Requests.Models.Discount'
          description: Optional discounts.
      additionalProperties: false
      description: Item details.
    ChargeAfter.BFF.WebApi.Contracts.Responses.Models.SessionMerchantDetailsResponse:
      type: object
      properties:
        storeId:
          type:
          - string
          - 'null'
          description: The store identifier
      additionalProperties: false
    ChargeAfter.BFF.WebApi.Contracts.Models.ConsumerDetails:
      required:
      - billingAddress
      - dateOfBirth
      - email
      - firstName
      - lastName
      - netMonthlyIncome
      - shippingAddress
      type: object
      properties:
        id:
          type:
          - string
          - 'null'
        firstName:
          minLength: 1
          type: string
          description: Consumer first name
          example: John
        lastName:
          minLength: 1
          type: string
          description: Consumer last name
          example: Doe
        email:
          minLength: 1
          type: string
          description: Consumer email
          example: john.doe@gmail.com
        shippingAddress:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.Address'
          description: Consumer shipping address
        billingAddress:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.Address'
          description: Consumer billing address
        spouseInfo:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.SpouseInfo'
          description: Spouse information
        marriageStatus:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.MarriageStatus'
          description: Marriage status
        netMonthlyIncome:
          type: number
          description: Net monthly income. Provide either net or gross monthly income.
          format: double
          example: 5000
        annualNetIncome:
          type:
          - number
          - 'null'
          description: Annual net income
          format: double
        annualGrossIncome:
          type:
          - number
          - 'null'
          description: Annual net income
          format: double
        updatedIncomeType:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.Entities.IncomeType'
          description: The most recently update income type.
        monthlyHousingPaymentIncome:
          type:
          - number
          - 'null'
          description: Monthly housing payment income
          format: double
        grossMonthlyIncome:
          type:
          - number
          - 'null'
          description: Gross monthly income. Provide either net or gross monthly income.
          format: double
        dateOfBirth:
          type: string
          description: Date of birth in ISO 8601 format
          format: date-time
          example: '1994-05-12T00:00:00Z'
        socialSecurityNumber:
          type:
          - string
          - 'null'
          description: 'US Social security number (SSN) or Tax ID.<br />

            9-digits number without dashes.'
          example: '123456789'
        additionalIds:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.AdditionalIds'
          description: Additional IDs, if any
        mobilePhoneNumber:
          type:
          - string
          - 'null'
          description: Mobile phone number, only digits.
          example: '2125555555'
        housingStatus:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.Entities.ResidenceType'
          description: Housing status
        preferences:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.Preferences'
          description: Optional preferences.
        merchantConsumerId:
          type:
          - string
          - 'null'
          description: Consumer ID in merchant system
      additionalProperties: false
    ChargeAfter.Libraries.WebApi.Contracts.AdditionalIds:
      type: object
      properties:
        socialInsuranceNumber:
          type:
          - string
          - 'null'
          description: Canadian Social Insurance Number
      additionalProperties: false
      description: Additional IDs
    ChargeAfter.Libraries.WebApi.Contracts.Requests.Models.FlowType:
      enum:
      - Apply
      - Checkout
      type: string
      description: FlowType.<p>Description:</p><ul><li><i>Apply</i> - Consumer checks if cart eligible.</li><li><i>Checkout</i> - Consumer makes purchasing in merchant.</li></ul>
    ChargeAfter.Libraries.Entities.IncomeType:
      enum:
      - MonthlyNet
      - MonthlyGross
      - AnnualNet
      - AnnualGross
      type: string
    ChargeAfter.Libraries.WebApi.Contracts.SpouseInfo:
      type: object
      properties:
        spouseSameAddress:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.BoolType'
        spouseAddress:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.Address'
          description: Consumer Address info.
        spouseFirstName:
          type:
          - string
          - 'null'
        spouseLastName:
          type:
          - string
          - 'null'
      additionalProperties: false
    ChargeAfter.Libraries.WebApi.Contracts.Address:
      required:
      - city
      - country
      - line1
      - state
      - zipCode
      type: object
      properties:
        country:
          minLength: 1
          type: string
          description: Gets or sets the country.
          example: US
        state:
          minLength: 1
          type: string
          description: Gets or sets the state.
          example: NY
        city:
          minLength: 1
          type: string
          description: Gets or sets the city.
          example: New York
        line1:
          minLength: 1
          type: string
          description: Gets or sets the line1.
          example: 3 My Street
        line2:
          type:
          - string
          - 'null'
          description: Gets or sets the line2.
          example: My Building, 4th floor
        zipCode:
          minLength: 1
          type: string
          description: Gets or sets the zip code.
          example: '10019'
      additionalProperties: false
      description: Consumer Address info.
    ChargeAfter.Libraries.WebApi.Contracts.Requests.Models.CartDetails:
      required:
      - items
      - totalAmount
      type: object
      properties:
        merchantOrderId:
          type:
          - string
          - 'null'
          description: Optional merchant order identifier.
          example: '12345'
        items:
          type: array
          items:
            $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.Requests.Models.Item'
          description: Line items.
        discounts:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.Requests.Models.Discount'
          description: Optional discounts.
        taxAmount:
          type: number
          description: Total tax amount.
          format: double
          example: 199
        shippingTaxAmount:
          type:
          - number
          - 'null'
          description: Shipping tax amount.
          format: double
          example: 1.9
        shippingAmount:
          type:
          - number
          - 'null'
          description: Shipping amount.
          format: double
          example: 19
        totalAmount:
          type: number
          description: 'Total amount.<br />

            Must be equal to the sum of all items - discounts + tax and shipping.'
          format: double
          example: 4297.9
      additionalProperties: false
      description: Order cart details. Mandatory for checkout, optional for apply flow.
    ChargeAfter.Libraries.WebApi.Contracts.Preferences:
      type: object
      properties:
        language:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.Language'
        marketingOptIn:
          type:
          - boolean
          - 'null'
      additionalProperties: false
    ChargeAfter.Libraries.WebApi.Contracts.Requests.Models.Discount:
      required:
      - amount
      type: object
      properties:
        name:
          type:
          - string
          - 'null'
          description: Name of the discount.
          example: Birthday discount
        amount:
          type: number
          description: Amount of the discount.
          format: double
          example: 20
      additionalProperties: false
      description: Discount details.
    ChargeAfter.BFF.WebApi.Contracts.Models.CheckoutDetailsV3:
      type: object
      properties:
        currency:
          type:
          - string
          - 'null'
          description: Optional ISO 4217 currency code. If not provided, the USD currency will be used.
        flowType:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.WebApi.Contracts.Requests.Models.FlowType'
          description: Optional flow type. If not provided, the Checkout flow type will be used.
        channel:
          type:
          - string
          - 'null'
          description: 'Optional Channel. If not provided, the E_COMMERCE channel will be used.<br />

            Other options are IN_STORE / CALL_CENTER / IN_HOME'
        source:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Contracts.Source'
          description: Source of the request. Api should be specified for all requests coming from the API.
        tokens:
          type:
          - object
          - 'null'
          additionalProperties:
            type: string
          description: Optional security tokens
        promoCode:
          type:
          - string
          - 'null'
          description: Optional promo code
        requestedLoanAmount:
          type:
          - number
          - 'null'
          description: Optional requested loan amount, if supported by the underlying lenders.
          format: double
        tags:
          type:
          - object
          - 'null'
          additionalProperties:
            type: string
          description: 'Merchant''s tags for this application.<br />

            The tags will be used for marking/analytics purposes.'
        correlationId:
          type:
          - string
          - 'null'
          description: Optional merchant's correlation id for this application.
        merchantPromoCode:
          type:
          - string
          - 'null'
          description: Optional merchant promo code.
        intent:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.Entities.IntentSafe'
          description: Optional intent used for initiating specific lender flows.
      additionalProperties: false
    ChargeAfter.BFF.WebApi.Contracts.Models.MerchantDetails:
      type: object
      properties:
        storeId:
          type:
          - string
          - 'null'
          description: The store identifier
        posId:
          type:
          - string
          - 'null'
          description: The point of sale identifier
        posType:
          allOf:
          - $ref: '#/components/schemas/ChargeAfter.Libraries.Entities.PosType'
          description: The point of sale type
      additionalProperties: false
    ChargeAfter.Libraries.WebApi.Contracts.Requests.Models.Warranty:
      required:
      - price
      type: object
      properties:
        name:
          type:
          - string
          - 'null'
          description: Gets or sets the name.
          example: Awesome Warranty
        sku:
          type:
          - string
          - 'null'
          description: Gets or sets the sku.
          example: AWSMWRNTY
        price:
          type: number
          description: Gets or sets the price.
          format: double
          example: 100
      additionalProperties: false
      description: Warranty.
    ChargeAfter.Libraries.Entities.PosType:
      enum:
      - Kiosk
      - Retail
      - GenericMerchantDevice
      - GenericConsumerDevice
      - SelfServiceTerminal
      type: string
    ChargeAfter.Libraries.WebApi.Contracts.BoolType:
      enum:
      - 'NO'
      - 'YES'
      type: string
      description: This Enum created to match UI select control
  securitySchemes:
    apiKey:
      type: apiKey
      name: Authorization
      in: header