- 04 Jun 2025
- 2 Minutes to read
- DarkLight
Recommended Workflow
- Updated on 04 Jun 2025
- 2 Minutes to read
- DarkLight
Recommended Workflow
1. Get Pricing for Payment Selector (Marketing API)
Using the Marketing API on the Checkout Page will allow an order to be qualified so as to not show the pricing and or payment option if the order isn’t eligible. This API will show suggestive pricing based on the details of the order that are sent in.
2. Get Redirect URL
Once the customer selects Flex Pay as a payment option & clicks the Continue to Payment button, the next step would be to send a POST request to the /orders endpoint. The /orders endpoint will determine order eligibility. In the request the merchant will pass both a confirm and cancel URL for redirect once the users loan is approved or denied. In the response a redirect URL will be provided from Flex Pay.
Sample of sending confirm/cancel URL in request
"merchantConfig":{"confirmationUrl": "https://merchantsite.com/confirm",
"cancelUrl": "https://merchantsite.com/cancel"
}
Sample of redirect URL returned from Flex Pay
"redirectUrl": "https://payments.uplift.com/redirect/#/{order_id}"
}
3. Route user to Flex Pay application
At this point the Partner is expected to redirect the customer so that they can fill out the Flex Pay application. When the user is redirected they will land on the home page.
4. Redirect from Flex Pay Application back to Merchant site
Once the customer has completed their application on the Flex Pay site, they will be redirected back to the partner site using the confirmationUrl that was included in the initial POST /orders payload. The customer’s order-id will be appended to the url as a query parameter.
"http://"https://merchantsite.com/confirm?order_id=a3ed33bfw22-234234234
5. Pull the Virtual Credit Card to process payment
Once the customer has been redirected to the confirmationUrl, the Partner should pull the payment from the /payment endpoint & charge the returned VCC before displaying an order confirmation to the customer.
Note: there may be situations, like with Hotel bookings where the card will be charged at a later date. In these cases, the VCC should be securely stored or sent to the system that will process the charges.
GET partner.upgrade.com/api/flexpay/v1/orders/{order_id}/payment
Sample response
{
"card": {
"card_ccv": "XXX",
"contact": {
"postal_code": "99999",
"email": "arthur@uplift.com",
"first_name": "Arthur",
"phone": "5555551749",
"city": "Mayfield",
"region": "KY",
"last_name": "Davis",
"street_address": "1013 Weda Cir",
"country": "US"
},
"expiration_month": 7,
"card_number": "XXXXXXXXXXXXXXXX",
"expiration_year": XXXX,
"card_type": "MASTERCARD",
"name_on_card": "Arthur Davis"
}
}
Note: if you are using the Flex Pay Transaction API to handle direct settle, then you can skip this step.
6. Confirming the order
Once the VCC has been successfully charged and the order has confirmed, the merchant will then make a request to the /confirmation endpoint to confirm the order with Flex Pay. This step is important as it gives Flex Pay a pointer back to the reservation in case any updates, cancellations, etc are done at a later date.
Example URL: partner.upgrade.com/api/flexpay/v1/orders/{order_id}/confirmation