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

# Accept an amount with the six consents and start funding

> Takes the borrower's data as of acceptance from the inline `data` block. `data` is required, and a
missing one is a 400 with details [{"field": "data"}]. `data.customer` must be the customer
who applied: the same national id as the application (dots, dashes and spaces are ignored), or the
same full name when the application or the acceptance has no national id. Otherwise it is a 400 with
details [{"field": "data.customer"}] and nothing is funded.
Runs every rule again as final checks on the accepting session, then reserves program capacity, creates the loan and starts funding in one transaction.
Allowed from prequalified, additional_income and selection. The response is a view with
step funding, back at selection with a recalculated offer (once), or declined or funding_failed.
All consents must be true and accepted_at must be within the last 24 hours and no more than
5 minutes ahead. The body is limited to 1 MiB; a larger body is a 413 PAYLOAD_TOO_LARGE.
The answer does not list `place_hold`: it is issued once the bureau check passes, so read
`GET /v1/loans/{loan_id}` to get it.




## OpenAPI

````yaml /api-reference/lending-openapi.yaml post /v1/applications/{id}/acceptance
openapi: 3.1.0
info:
  title: Cr3dentials Lending API
  version: 1.0.0
  description: >
    The partner API for Cr3dentials lending: applications, money steps,
    repayments and credit profiles. Money is integer USD cents.

    Every POST takes an Idempotency-Key header. Repeating a request with the
    same key and body

    replays the first response. Reusing a key with a different request is a 409.


    Webhooks (see `webhooks`): Cr3dentials POSTs outcomes that happen after a
    response to the partner's

    webhook URL as JSON `{event_id, type, created_at, data}`.

    - Signature: `X-Timestamp` is unix seconds; `X-Signature` is `v1=<lowercase
    hex HMAC-SHA256(secret, "<X-Timestamp>." + raw body)>`.
      The key is the whole `whsec_...` secret string. Verify against the raw body bytes before parsing.
    - The signing secret is shared once, when your webhook URL is registered.
    Rotating it ends the old
      secret at once.
    - Delivery is at least once: deduplicate by `event_id`. Answer 2xx to
    acknowledge. 408, 429, 5xx and
      network errors are retried with backoff for about 3 hours; any other 4xx stops delivery of that event.
    - Order is not guaranteed. `GET /v1/applications/{id}` is the source of
    truth.
servers: []
security:
  - bearerAuth: []
paths:
  /v1/applications/{id}/acceptance:
    post:
      summary: Accept an amount with the six consents and start funding
      description: >
        Takes the borrower's data as of acceptance from the inline `data` block.
        `data` is required, and a

        missing one is a 400 with details [{"field": "data"}]. `data.customer`
        must be the customer

        who applied: the same national id as the application (dots, dashes and
        spaces are ignored), or the

        same full name when the application or the acceptance has no national
        id. Otherwise it is a 400 with

        details [{"field": "data.customer"}] and nothing is funded.

        Runs every rule again as final checks on the accepting session, then
        reserves program capacity, creates the loan and starts funding in one
        transaction.

        Allowed from prequalified, additional_income and selection. The response
        is a view with

        step funding, back at selection with a recalculated offer (once), or
        declined or funding_failed.

        All consents must be true and accepted_at must be within the last 24
        hours and no more than

        5 minutes ahead. The body is limited to 1 MiB; a larger body is a 413
        PAYLOAD_TOO_LARGE.

        The answer does not list `place_hold`: it is issued once the bureau
        check passes, so read

        `GET /v1/loans/{loan_id}` to get it.
      operationId: acceptApplication
      parameters:
        - $ref: '#/components/parameters/ApplicationId'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Acceptance'
      responses:
        '200':
          description: The application after final checks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationView'
        '400':
          description: >-
            VALIDATION_FAILED. A consent that is not true is named in details as
            [{"field"}]. Acceptance data for another customer is [{"field":
            "data.customer"}].
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: INVALID_STATE, or an idempotency conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: PAYLOAD_TOO_LARGE. The body is over 1 MiB.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: ORIGINATION_PAUSED, POLICY_NOT_READY or PARTNER_DATA_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    ApplicationId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: 1 to 255 visible ASCII characters
      schema:
        type: string
        minLength: 1
        maxLength: 255
  schemas:
    Acceptance:
      type: object
      additionalProperties: false
      required:
        - amount_cents
        - terms_version
        - autopay_authorized
        - bureau_check_consent
        - bureau_reporting_consent
        - balance_debit_authorized
        - hold_authorized
        - accepted_at
        - session
      properties:
        amount_cents:
          type: integer
          description: >-
            A multiple of the rounding step, from the minimum loan up to the
            offer's max_amount_cents
        terms_version:
          type: string
          minLength: 1
          maxLength: 64
        autopay_authorized:
          type: boolean
          const: true
        bureau_check_consent:
          type: boolean
          const: true
        bureau_reporting_consent:
          type: boolean
          const: true
        balance_debit_authorized:
          type: boolean
          const: true
        hold_authorized:
          type: boolean
          const: true
        accepted_at:
          type: string
          format: date-time
        session:
          $ref: '#/components/schemas/Session'
        data:
          $ref: '#/components/schemas/CustomerData'
    ApplicationView:
      type: object
      required:
        - application_id
        - partner_account_id
        - step
        - status
        - is_first_loan
        - expires_at
        - offer
        - decline
        - loan
      properties:
        application_id:
          type: string
          format: uuid
        partner_account_id:
          type: string
        step:
          type: string
          enum:
            - screening
            - prequalified
            - additional_income
            - selection
            - final_checks
            - funding
        status:
          type: string
          enum:
            - in_progress
            - funded
            - declined
            - expired
            - withdrawn
            - funding_failed
        is_first_loan:
          type: boolean
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
        offer:
          oneOf:
            - $ref: '#/components/schemas/Offer'
            - type: 'null'
        decline:
          oneOf:
            - $ref: '#/components/schemas/Decline'
            - type: 'null'
        loan:
          oneOf:
            - $ref: '#/components/schemas/LoanView'
            - type: 'null'
    Error:
      type: object
      required:
        - error
        - request_id
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: array
              items: {}
        request_id:
          type: string
    Session:
      type: object
      additionalProperties: false
      required:
        - device_id
        - ip
        - user_agent
        - device_timezone
      properties:
        device_id:
          type: string
          minLength: 1
          maxLength: 128
        ip:
          type: string
          description: An IPv4 or IPv6 address
        user_agent:
          type: string
          maxLength: 512
        device_timezone:
          type: string
          minLength: 1
          maxLength: 64
    CustomerData:
      type: object
      additionalProperties: false
      required:
        - customer
        - balance
        - security
      description: >-
        A 400 names each invalid field as `{"field":
        "data.transactions[0].amount_cents"}`, never its value.
      properties:
        customer:
          type: object
          additionalProperties: false
          required:
            - full_name
            - country
          properties:
            full_name:
              type: string
              minLength: 1
            national_id:
              type: string
            phone:
              type: string
            email:
              type: string
            country:
              type: string
            account_opened_on:
              type: string
              format: date
            active:
              type: boolean
            kyc_verified:
              type: boolean
        balance:
          type: object
          additionalProperties: false
          required:
            - holdable_cents
          properties:
            holdable_cents:
              type: integer
              minimum: 0
        transactions:
          type: array
          description: >-
            Without it the application is declined with
            SYS_PARTNER_DATA_UNAVAILABLE
          items:
            type: object
            additionalProperties: false
            required:
              - id
              - direction
              - amount_cents
              - currency
              - transfer_type
            properties:
              id:
                type: string
                minLength: 1
                maxLength: 128
              direction:
                type: string
                enum:
                  - in
                  - out
              amount_cents:
                type: integer
                minimum: 1
              currency:
                type: string
                const: USD
              settled_at:
                type:
                  - string
                  - 'null'
                format: date-time
              transfer_type:
                type: string
                enum:
                  - bank_transfer
                  - card
                  - internal
                  - crypto
                  - other
              from_outside_institution:
                type: boolean
              into_own_account:
                type: boolean
              payer_name:
                type:
                  - string
                  - 'null'
              intermediary:
                type:
                  - string
                  - 'null'
              beneficiary_name:
                type:
                  - string
                  - 'null'
              counterparty_name:
                type:
                  - string
                  - 'null'
              merchant_name:
                type:
                  - string
                  - 'null'
              merchant_category:
                type:
                  - string
                  - 'null'
              balance_after_cents:
                type:
                  - integer
                  - 'null'
        account_events:
          type: array
          items:
            type: object
            additionalProperties: false
            required:
              - kind
              - 'on'
            properties:
              kind:
                type: string
                enum:
                  - overdraft
                  - returned_payment
                  - insufficient_funds
                  - negative_balance
              'on':
                type: string
                format: date
        security:
          type: object
          additionalProperties: false
          properties:
            credential_changes:
              type: array
              items:
                type: object
                additionalProperties: false
                required:
                  - kind
                  - 'on'
                properties:
                  kind:
                    type: string
                    enum:
                      - phone
                      - email
                      - password
                      - two_factor
                  'on':
                    type: string
                    format: date
            devices:
              type: array
              items:
                type: object
                additionalProperties: false
                required:
                  - id
                  - first_seen_on
                properties:
                  id:
                    type: string
                  first_seen_on:
                    type: string
                    format: date
            withdrawal_destinations_added:
              type: array
              items:
                type: object
                additionalProperties: false
                required:
                  - 'on'
                properties:
                  'on':
                    type: string
                    format: date
    Offer:
      type: object
      required:
        - offer_id
        - kind
        - currency
        - max_amount_cents
        - interest_cents
        - hold_cents
        - installment_count
        - credit_level
        - income_base_cents
        - max_payment_cents
        - installments
        - income_verification
      properties:
        offer_id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - prequalified
            - recalculated
        currency:
          type: string
          enum:
            - USD
        max_amount_cents:
          type: integer
        interest_cents:
          type: integer
        hold_cents:
          type: integer
        installment_count:
          type: integer
        credit_level:
          type: integer
        income_base_cents:
          type: integer
        max_payment_cents:
          type: integer
        installments:
          type: array
          items:
            $ref: '#/components/schemas/OfferInstallment'
        income_verification:
          type: object
          required:
            - platforms
          properties:
            platforms:
              type: array
              items:
                type: string
    Decline:
      type: object
      required:
        - reasons
      properties:
        reasons:
          type: array
          items:
            $ref: '#/components/schemas/DeclineReason'
    LoanView:
      type: object
      required:
        - loan_id
        - status
        - currency
        - principal_cents
        - interest_cents
        - hold_cents
        - outstanding_cents
        - installments
        - instructions
        - deduction
      properties:
        loan_id:
          type: string
          format: uuid
        status:
          type: string
        currency:
          type: string
          enum:
            - USD
        principal_cents:
          type: integer
        interest_cents:
          type: integer
        hold_cents:
          type: integer
        outstanding_cents:
          type: integer
          description: >-
            Contractual balance, the sum of amount due less amount paid over the
            current installments. It is 0 while the loan is pending_disbursement
            or cancelled, because nothing is owed until the payout is confirmed;
            each installment's `amount_due_cents` still shows the schedule.
        installments:
          type: array
          items:
            $ref: '#/components/schemas/LoanInstallment'
        instructions:
          type: array
          description: Pending instructions only, oldest first.
          items:
            $ref: '#/components/schemas/Instruction'
        deduction:
          description: >-
            The stored deduction instruction, never recomputed; null until the
            first payout.
          oneOf:
            - $ref: '#/components/schemas/DeductionInstruction'
            - type: 'null'
    OfferInstallment:
      type: object
      required:
        - seq
        - amount_due_cents
        - principal_cents
        - interest_cents
      properties:
        seq:
          type: integer
        amount_due_cents:
          type: integer
        principal_cents:
          type: integer
        interest_cents:
          type: integer
    DeclineReason:
      type: object
      required:
        - code
        - borrower_message
        - how_to_improve
      properties:
        code:
          type: string
        borrower_message:
          type: string
        how_to_improve:
          type: string
    LoanInstallment:
      type: object
      required:
        - seq
        - amount_due_cents
        - principal_due_cents
        - interest_due_cents
        - amount_paid_cents
        - due_date
        - provisional_due_date
        - paid_at
        - status
      properties:
        seq:
          type: integer
        amount_due_cents:
          type: integer
        principal_due_cents:
          type: integer
        interest_due_cents:
          type: integer
        amount_paid_cents:
          type: integer
        due_date:
          type:
            - string
            - 'null'
          format: date
        provisional_due_date:
          type:
            - string
            - 'null'
          format: date
        paid_at:
          type:
            - string
            - 'null'
          format: date-time
        status:
          type: string
    Instruction:
      type: object
      required:
        - instruction_id
        - kind
        - amount_cents
        - currency
        - issued_at
      properties:
        instruction_id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - place_hold
            - pay_out
            - release_hold
            - refund
        amount_cents:
          type: integer
        currency:
          const: USD
        issued_at:
          type: string
          format: date-time
    DeductionInstruction:
      type: object
      required:
        - instruction_version
        - status
        - installment_seq
        - amount_cents
        - currency
        - deposit_filter
        - max_deposit_pct
      properties:
        instruction_version:
          type: integer
          minimum: 1
        status:
          type: string
          enum:
            - active
            - cancelled
        installment_seq:
          type:
            - integer
            - 'null'
        amount_cents:
          type: integer
        currency:
          const: USD
        deposit_filter:
          const: inbound_bank_transfer_from_outside
        max_deposit_pct:
          const: 100
  responses:
    Unauthenticated:
      description: UNAUTHENTICATED
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: NOT_FOUND, also for another partner's application
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Token from POST /v1/oauth/token (client credentials)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.