FlexShopper API
3.0-preview
FlexShopper API
3.0-preview
  • Introduction
  • Integration Guides
    • Medusa
    • Payment Plugin
  • Customer
    • Verify User Exists
    • Deeply Verify User Exists
    • Create User
    • Get Users
    • Get User
    • Create Authorization Token
    • Add Payment Method
      • Get LoanPaymentPro Child Key
      • Get Clover PKMS Key
  • Decision
    • Apply for Spending Limit
  • Lease
    • Create Lease
    • Get Transactions
    • Get Lease By ID
    • Get Transaction By ID
    • Sign Lease
    • Finalize Lease
    • Cancel Items
    • Return Items
    • Confirm Shipment
    • Confirm Receipt
Powered by GitBook
On this page
  • API Connection
  • Customer
  • Decision & Spending Limit
  • Lease & Fulfillment

Was this helpful?

Export as PDF
  1. Integration Guides

Medusa

Medusa is a REST API that enables you to authenticate your user, apply for a spending limit, create a lease, sign the lease, and perform other operations on behalf of the user.

API Connection

The base URLs for Medusa are listed below according to the environment:

Environment
Base URL

Sandbox

Production

FlexShopper must issue you an API token. You must provide your API token in the Authorization header with every call to Medusa.

The following guide walks you through the end-to-end journey of the customer through Medusa, and outlines the required steps to complete this journey.

Customer

The customer must exist in Medusa and have a payment method on file. You'll need a customer authentication token for actions such as applying for a spending limit, creating a lease, and signing the lease.

1

Check if customer exists

You must first check if your customer already exists in Medusa, which you can do by calling the Verify User Exists endpoint. If the customer exists, their ID will be returned.

2

Authenticate an existing customer

If your customer aleady exists in Medusa, you can obtain a customer authentication token by calling the Create Authorization Token endpoint. The user's ID you'll need for this endpoint is returned from the Verify User Exists endpoint.

3

Create a customer

If your customer doesn't exist and you need to perform a customer action, then you must create a customer by calling the Create User endpoint. If the customer is successfully created, their ID and customer authentication token will be returned.

4

Collect a payment method

Once a customer is created, you must collect their payment method(s) and provide them to Medusa.

You can provide the payment methods in the payload when applying for a spending limit, or you can interact with the Add Payment Method endpoint. You may use that endpoint at any point after creating a customer.

Generally, the customer must have at least one payment method in Medusa to complete this flow.

Decision & Spending Limit

Once your customer is in Medusa, it's time to ensure they have an active decision, a spending limit, and are not on a spending hold.

An active decision ensures your customer has is allowed to create and sign leases.

The spending limit amount helps you understand what your customer's maximum order value is, as you won't be able to create a lease for them with a total higher than the spending limit.

A spending hold may be applied by FlexShopper to customers for various reasons. If a customer has a spending hold applied, no new leases will be created for them.

1

Check if decision exists

You can check the decision status and spending limit by calling the Get User endpoint.

2

Apply for a decision

If no decision is returned, then you must apply for a spending limit for this customer. You can do that by calling the Apply for Spending Limit endpoint.

If your customer is approved to spend, you can proceed with creating a lease. If the customer is denied, then they unfortuantely cannot proceed.

Lease & Fulfillment

Now that your customer is created, and has an active decision and an available spending limit, you can proceed with the lease process.

1

Create a lease

Firstly, you must create a lease, which you can do by calling the Create Lease endpoint.

The response will include the FlexShopper lease document in HTML format. You must render and present this to the customer and enable them to read it in full.

2

Sign the lease

Once a lease is created and presented to the user, you must give them the option to sign it virtually. Then, when the customer signs the lease on your end, you must subsequently sign the lease through Medusa by calling the Sign Lease endpoint.

3

Finalize the lease

After the lease is signed, the lease must be finalized (confirmed). This can be done by calling the Finalize Lease endpoint.

Once a lease is finalized, we begin the fulfillment and billing processes.

4

Confirm fulfillment

Finally, the fulfillment of the lease must be confirmed. For E-commerce integrations, this step must be done after you've confirmed the order is shipped. Confirmation is generally done by calling the Confirm Shipment endpoint.

PreviousIntroductionNextPayment Plugin

Last updated 10 days ago

Was this helpful?

https://apis.sandbox.flexshopper.com/
https://apis.flexshopper.com/