PayTomorrow

PayTomorrow

  • Integration Docs
  • API Reference

›API

API

  • Authenticate
  • Create Order
  • Create Full Application
  • Settle Application
  • Cancel Application
  • Refund Application
  • Get Application Status
  • Validate Postback

Postbacks

  • Payment Complete
  • Payment Pending
  • Payment Failed
  • Order Cancelled

Create Order

POST https://api.paytomorrow.com/api/application/ecommerce/orders

Request for creating a loan application on PayTomorrow. It responds with a the url for the customer's PayTomorrow application and the application token, which needs to be stored and linked to the order on the ecommerce platform.

NOTE: When the purchase amount is out of your approval range, the application token will be null.

{
    "orderId": The order's ID on the ecommerce site,
    "firstName": Consumer's First Name,
    "lastName": Consumer's Last Name,
    "street": Shipping address must be equal to billing address,
    "city": Shipping address' city,
    "zip": Shipping address' zip code (must match billing zip code),
    "state": Shipping address' state,
    "email": Consumer's email (must be a valid email),
    "returnUrl": The url we will redirect the user to once the application is finished,
    "cancelUrl": The url we will redirect the user if the application is cancelled,
    "notifyUrl": The url we will use to postback the application status back to your site,
    "cellPhone": The customer's cell phone number (optional),
    "loanAmount": The total cart amount (the amount that will be financed),
    "shipping": Shipping costs,
    "taxes": Taxes,
    "applicationItems": An array of cart items (ApplicationItem). See below fo the description.
}


// ApplicationItem
{
    "description": Product description,
    "quantity": Quantity of the product,
    "price": Price of the product,
    "brand": (optional) Product brand,
    "model": (optional) Product model
}

Request Params Requirements

  • "orderId": Required, any string is valid.
  • "firstName": Required, any string is valid.
  • "lastName": Required, any string is valid.
  • "street": Required, any string is valid.
  • "city": Required, any string is valid.
  • "zip": Required, 5 character length string.
  • "state": Required, 2 character length string.
  • "email": Required, must be a valid email.
  • "returnUrl": Must be a valid http or https url pattern.
  • "cancelUrl": Must be a valid http or https url pattern.
  • "notifyUrl": Must be a valid http or https url pattern.
  • "cellPhone": Must be a valid US phone number. Numbers only and no country code.
  • "loanAmount": Required, must be a number.
  • "shipping": must be a number.
  • "taxes": must be a number.
  • "applicationItems": Required.

Headers

Authorization: Bearer theacces-toke-naaa-aaaa-aaaaaaaaaaaa // The access token
Content-Type: application/json

Request Body

{
    "orderId": "ordered_reference",
    "firstName": "David",
    "lastName": "Domingo",
    "street": "6001 Glenwood Ave",
    "city": "Raleigh",
    "zip": "27612",
    "state": "NC",
    "email": "consumer_email@thebestconsumer.com",
    "returnUrl": "http://success-redirect-url.com",
    "cancelUrl": "http://cancelled-order-redirect-url.com",
    "notifyUrl": "http://postback-url.com",
    "cellPhone": "9802361480",
    "loanAmount": 1000,
    "applicationItems": [
        {
            "description": "Diamond ring",
            "quantity": 1,
            "price": 1000,
            "brand": "Tiffany",
            "model": "Blue Hope"
        }
    ]
}

Success Response Example

{
  "url": "http://ecom-staging.paytomorrow.com/verify/personal?app=d7f5b8ee-380c-4559-be18-0311e9922f98&auth=80576fc3-2ef5-41c1-a499-d9fb1fb1eea4",
  "token": "d7f5b8ee-380c-4559-be18-0311e9922f98"
}

← AuthenticateCreate Full Application →
  • Headers
  • Request Body
  • Success Response Example
PayTomorrow
Docs
Integration DocsAPI Reference
Copyright © 2021 PayTomorrow