Create order
/application/ecommerce/ordersCreates a financing application for a cart and returns the URL where the customer
completes it. Store the returned token with the order on your side. You need it for
every other call and it arrives as uuid in every postback.
Send the customer to url with a redirect, or open it in an
iframe.
If the application can't be created, token is null and url points to a
PayTomorrow page that explains why and links back to your cancelUrl. This happens
when:
- the cart total is outside your approval range
- the shipping address is a PO box
Authorization
bearerAuth Access token from Get an access token.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/application/ecommerce/orders" \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "orderId": "100045", "firstName": "Jordan", "lastName": "Rivera", "street": "123 Main St", "city": "Charlotte", "state": "NC", "zip": "28202", "email": "jordan.rivera@example.com", "cellPhone": "7045550123", "returnUrl": "https://yourstore.com/checkout/paytomorrow/success", "cancelUrl": "https://yourstore.com/checkout/paytomorrow/cancel", "notifyUrl": "https://yourstore.com/webhooks/paytomorrow", "loanAmount": 1149.97, "shipping": 49.99, "taxes": 99.99, "applicationItems": [ { "description": "65-inch 4K Smart TV", "quantity": 1, "price": 999.99, "brand": "Acme", "model": "AX-65", "sku": "TV-AX65", "category": "Televisions" } ] }'{ "url": "https://consumer-staging.paytomorrow.com/verify/personal?app=3f9c2a7e5b8d4e1fa0c6b2d9e7f41a53&auth=eyJhbGciOi...&rauth=eyJhbGciOi...", "token": "3f9c2a7e5b8d4e1fa0c6b2d9e7f41a53"}