# Consumer Application Invitation

For a merchant/contractor to issue a loan to a consumer.
The partner/sponsor must first send a POST to Momnt to initiate the consumer loan.
- Sends an invite via **SMS** or **Email**
- Only **ONE** of those fields is required
- Providing both will result in an error

Endpoint: POST /api/v1/sponsor/consumers/application/
Version: 1.0.0 (sponsor_consumer_v1)
Security: basicAuth

## Security:

  - `basicAuth` (unknown)
    http basic

## Request fields (application/json):

  - `request_user_id` (string, required)
    The ID in the partner system making the request.

  - `application_id` (string, required)
    The identifier in the partner system for this loan application.

  - `customer_email` (string)
    You must send email OR phone.

  - `customer_phone` (string)
    You must send email OR phone.

  - `sponsor_callback_url` (string, required)
    When consumer loan is approved or cancelled, Momnt will POST information to this fully qualified URL. This URL will be called A SECOND TIME when the loan documents are accepted by the consumer (borrower).

  - `consumer_first_name` (string)
    The first name of the consumer.

  - `consumer_middle_name` (string)
    The middle name of the consumer.

  - `consumer_last_name` (string)
    The last name of the consumer.

  - `consumer_address_1` (string)
    The first line of the consumer's address.

  - `consumer_address_2` (string)
    The second line of the consumer's address.

  - `consumer_city` (string)
    The city of the consumer's address.

  - `consumer_state` (string)
    The state of the consumer's address.

  - `consumer_zip_code` (string)
    The zip code of the consumer's address.

  - `consumer_requested_amount` (string)
    The requested amount of the consumer.

  - `offer_code` (string)
    The offer code of the consumer.

  - `external_org_id` (string)
    The external organization ID of the consumer.

## Response 201 fields (application/json):

  - `artis_consumer_invitation_id` (string, required)

  - `contractor_id` (string, required)

  - `request_user_invitation_id` (string, required)

  - `offer_code` (string)

  - `consumer_invitation_link` (string)

  - `consumer_requested_amount` (integer)

## Callback:

  - `Consumer Application Callback` (unknown)
    **Consumer Application Callback (POST)**
After the sponsor initiates a consumer loan invitation in the step above, Momnt will send the loan
invitation via Email or SMS to the consumer.
The consumer will use the URL sent in the loan invitation to complete the Momnt loan application.
Once this is complete, the sponsor and merchant will need to know the outcome of that application.
The consumer's application decision and other relevant details will be sent to the sponsor_callback_url.
When a consumer loan is approved or canceled, Momnt will POST information to this fully qualified URL.
This URL will be called A SECOND TIME when the loan documents are accepted by the consumer (borrower).
**Requirements:**
Before this callback will fire, a successful POST to send a consumer application must have taken place,
followed by successful completion of the application in the user interface session.
Basic Auth is supported by a username/password combination which is pre-shared between Momnt and the
sponsor.
**Response Structure**:
- Momnt expects acknowledgment of the POST with HTTP Status codes of 200 or 201 for success. Any other
status code will result in an error being logged.
The payload will be logged and used for informational/historical purposes only and may contain anything
the external partner wishes.

## Callback request fields (application/json):

  - `consumer_info` (object, required)
    An object of consumer details.

  - `consumer_info.first_name` (string, required)

  - `consumer_info.middle_name` (string)

  - `consumer_info.last_name` (string, required)

  - `consumer_info.email` (string, required)

  - `consumer_info.phone_number` (string, required)

  - `consumer_info.address_line_1` (string, required)

  - `consumer_info.address_line_2` (string)

  - `consumer_info.city` (string, required)

  - `consumer_info.state` (string, required)

  - `consumer_info.zip_code` (string, required)

  - `external_application_id` (string, required)
    Partner's ID for the Application sent in initial POST.

  - `consumer_application_status` (string, required)
    * `Approve` - Approve
* `Approved` - Approved
* `Accepted` - Accepted
* `Declined` - Declined
* `Cancel` - Cancel
    Enum: "Approve", "Approved", "Accepted", "Declined", "Cancel"

  - `status_date` (string, required)

  - `consumer_application_id` (string, required)
    10-digit application id.

  - `requested_amount` (string, required)
    Consumer request loan amount (dollars).

  - `credit_limit` (string, required)
    Credit Limit the consumer was approved for (only if status is Approve or Approved: Accepted).

  - `contractor_id` (string, required)
    UUID of the Contractor associated with Application.

  - `purchase_window_close_date` (string, required)
    Date the purchase window closes (only if status is Approve or Approved: Accepted).

  - `loan_product` (string, required)
    Product ID for the loan product selected by the consumer (only if status is Approve or Approved: Accepted).

  - `merchant_fee` (string, required)
    The transaction fee is charged to the merchant for this consumer's loan. This is a percentage in decimal form, multiply by 100 to present in percentage form.

  - `payment_factor` (string, required)
    The payment factor for the product the consumer selected. This is in decimal form.

  - `apr` (string, required)
    The APR for the product the consumer selected.

  - `term` (string, required)
    The term of the loan for the product the consumer selected.

  - `app_status_detail_desc` (string, required)
    Details regarding the application status.

  - `soft_pull_credit_limit` (string, required)
    Soft Pull approved credit limit.

  - `products_offered` (string, required)
    List of products offered during the consumer application process.

  - `current_balance` (string, required)
    Current balance of the loan (available funds).

  - `artis_consumer_invitation_id` (string, required)
    Momnt's invitation identifier; provided in invitation response.

  - `request_user_invitation_id` (string, required)
    External User ID that is sent in the consumer loan invitation.

  - `decision_detail` (string, required)
    The decision_detail field can contain one of the following values:
- "" (empty string, default when the following specific decision detail don't apply)
- "frozen_credit" (indicating the consumer's credit was frozen)
- "approved_for_less" (indicating the consumer was approved for a lower amount than requested)

  - `is_valid_for_transaction` (boolean, required)
    True or False - Can this account transact?

## Callback response 200:

  - `200` (unknown)
    No response body

