Front-end / Link Integration¶
Introduction¶
Ideally you should be integrating our payment solution on the back-end of your server, making a request from your server to our server to create the loan. This is the most robust option and will allow you to send us all the information needed. Also the information is gathered directly from the server, so when we send it to the different lenders is most accurate and increases the chances of being funded.
However, for sites using a hosted platform on a external server or with restricted access to the payment methods such as Shopify, BigCommerce or similar, we use front-end integration using Javascript to get the values on the screen and send them.
- We use as a base for this integration what we call the Simple Loan Form, which looks like this (assuming the testing stage):
https://partner.sandbox.wegetfinancing.com/partner.sandbox/loan/demo_global/ (the exact url for your website is on your portal)
In this case merchants can submit loan payments by redirecting to a URL containing a form on WeGetFinancing’s platform. Notice that we don’t allow anymore to have this link without any value pre-filled and it should have at least the product and price info.
Otherwise you can also use our Brick and Mortar tool, which is the recommended integration mode for call centers and brick and mortar. To use this mode simply login to your portal and click on the button “Send application to customer”.
Process overview¶
The process to submit loan requests is as follows:
A customer chooses to check out with WeGetFinancing
On your site, you place a button that redirects to a URL on our platform
The customer clicks the button and gets taken to a loan form on our platform.
The customer completes the form and submits it
The customer completes the WeGetFinancing process
Authentication¶
WeGetFinancing should have provided you with three pieces of information:
the merchant_id
a username
a password
If any of these are missing, contact support@wegetfinancing.com
Configuration¶
You should add the following information in the WeGetFinancing Portal:
your webshop URL
You should also enable the simple loan form for your merchant account (right above the webshop URL).
The WeGetFinancing platform will only allow loan requests to come from the domain you specified as your webshop URL.
Platforms¶
WeGetFinancing provides a staging platform that can be used to test integrations, and a production platform to be used in production. Both platforms work in the same way.
The base URL for the test platform is https://partner.sandbox.wegetfinancing.com/partner.sandbox/loan/
All examples will use this base URL.
For production, simply change this URL to https://partner.wegetfinancing.com/partner/loan/
Your Loan Form¶
Access¶
The URL is constructed by assembling:
the base url for the platform (see Platforms)
your merchant id
For example, if your merchant id is 1234, then the test URL is
and the production URL is
Note that the URL will only work if they are linked to from your webshop. Make sure you have given us the webshop URL so we can configure our platform to accept requests from your webshop.
Sending arguments to the loan form¶
Arguments can be passed as a normal query string to pre-fill the form. It is recommended to pass at least the amount of the purchase and the cart items.
The more arguments you pass, the better the user experience. The arguments should be URL-encoded and they are concatenated by ‘&’. This is a list of all possible arguments:
Field |
Type |
Description |
Sample Usage |
---|---|---|---|
shipping_amount |
Decimal(2) |
Shipping Amount |
Product Page, Checkout |
cart_items |
Array of items |
Cart items. See below. for the exact format |
Product Page, Checkout |
first_name |
String |
Customer First Name |
Checkout page |
last_name |
String |
Customer Last Name |
Checkout page |
String |
Customer e-mail address |
Checkout page |
|
billing_address |
String |
Billing Address |
Checkout page |
billing_city |
String |
Billing City |
Checkout page |
billing_state |
String |
Billing State |
Checkout page |
billing_zipcode |
String |
Billing Zip |
Checkout page |
merchant_transaction_id |
String |
Optional postback param |
|
success_url |
String |
URL to redirect the user when he gets authorized |
|
failure_url |
String |
URL to redirect the user when he cancels the requests |
|
software_name |
String |
Optional Shopping Cart software used |
|
tax_amount |
Integer |
Total tax amount in dollars |
The cart_items is an array of Items, which is a complex structure, with the following fields:
Field |
Type |
Description |
Required |
---|---|---|---|
sku |
String |
Internal reference of the product |
Yes |
display_name |
String |
Human friendly name of the product, including brand and product name |
Yes |
unit_price |
Decimal |
Price of the each unit |
Yes |
quantity |
Integer |
Number of units of this same item |
Yes |
unit_tax |
Integer |
Amount per unit that corresponds to taxes |
No |
This is an example of the cart_items parameter in the | json_link | format:
[{"sku":"ref 43","display_name":"TV Samsung 30inch DX43","quantity":2,"unit_price":2500},
{"sku":"ref 342","display_name":"TV LG 20inch 5F","quantity":1,"unit_price":1500}]
And this is an example of a link pre-populating many fields including cart_items :
https://partner.wegetfinancing.com/partner/loan/demo_gf/?first_name=Criscel& billing_address=WYHERITAGE 2437& billing_city=Union City& merchant_transaction_id=bcb01e84-66b6-11e5-8696-f23c91697827& billing_zipcode=94587& last_name=Abayon& success_url=https://merchant-test-pre.wegetfinancing.com/merchant-test/order/20& failure_url=https://merchant-test-pre.wegetfinancing.com/merchant-test/order/20& email=mail.1443537074@example.com& billing_state=CA& cart_items=[{"sku":"foo","display_name":"fubar","quantity":2,"unit_price":5500}]& shipping_amount=500.35 tax_amount=32.2Click on this to see an example of how it looks:
Link to a sample Loan Form with pre-filled values
Examples¶
HTML¶
This code example shows how the final HTML could look like, assuming our merchant ID is 8852, and the link is for a product called “TV 42 inch 3421CD” for an amount of $1200. This is very common to be placed in the product page or the listing page of an ecommerce. Since the link is placed in each page, the amount of the product and the name of the product are known, so they can be prepopulated easily. Some customers might be confused to enter the product name and the amount, so it is very important to prefill at least these two fields.
<a href="https://partner.wegetfinancing.com/partner/loan/8852?product_info=TV_42_inch_3421CD&amount=1200">
WeGetFinancing for TV 42 inch 3421CD now!
</a>
In the following example, we will be assuming we already know the details of the consumer and that he or she is ordering several items. This URL could be placed in the checkout process, once we have collected the details of the user. Unlike the previous example, where we can simply make a unique link for each page in a manual way, in this case, we will have to access to the variables in our software to know the name and the details of each customer. Notice we are still assuming our merchant ID is 8852:
<a href="https://partner.wegetfinancing.com/partner/loan/8852?product_info=Order_3547&amount=3000&first_name=John&last_name=Smith&
email=john@smith.com&billing_address=Av+Lexington+1147&billing_city=El+Cajon&billing_state=CA&billing_zipcode=92019">
WeGetFinancing for your order 3547 now!
</a>
Notice that instead of a simple text link, you can use any of our banners or buttons.
Test Subjects¶
- For all test subjects, you can use the following bank account information:
bank routing number: 011400178 (Bank of America)
bank account number: 123456789
Our staging platform has some pre-defined test subjects that can be used.
Mocked subjects¶
The first list has test subjects which are completely mocked, and trigger pre-defined behaviour in our staging platform.
FName |
LName |
Street |
City |
State |
Zip |
SSN4 |
AuthOnly |
Auth |
---|---|---|---|---|---|---|---|---|
Mary |
Bernard |
PO Box 190648 |
Anchorage |
AK |
99519 |
6220 |
purchase |
purchase |
Anthony |
Abate |
Av Lexington 1147 |
El Cajon |
CA |
92019 |
9862 |
purchase |
void |
Cheryl |
Abbott |
Av Twin Oaks 71 |
Monterey |
CA |
93940 |
4510 |
void |
|
Anita |
Abdo |
4269 Deeboyer Av |
Lakewood |
CA |
90712 |
9061 |
purchase |
purchase |
Mary Bernard simulates approval by LendingClub. Anita Abdo simulates approval by The Help Card.
Staging Subjects¶
These test subjects can be used to test the flow using LendingClub’s staging server.
Note that this staging server gets used for internal testing as well and is not always accepting loans.
FName |
LName |
Street |
City |
ST |
Zip |
SSN4 |
---|---|---|---|---|---|---|
Araz |
Abbasov |
PL RIPPLING BROOK 2808 |
Ontario |
CA |
91761 |
4232 |
Saucey |
Cranberry |
876 Turkey |
Fantasy Island |
IL |
60750 |
2525 |
Note that due to our partner’s policy, each e-mail/ssn4 combination can be used only once. In practice, while testing you should use a different email address for each request. We recommend you generate an email address that includes absolute time in seconds for testing.
Portal¶
WeGetFinancing operates two Platforms: a staging platform, which you can use for testing and doesn’t use real consumer data; and a production platform, which you use for real transactions.
You can log in to our staging portal to see all your test requests and configure your staging account.
You can see your production loan requests and configure your live account in our portal
Use the same username and password as you do for the API.
You can also use the portal to update your configuration and change your webshop url and postback information.
FAQ¶
This is a list of questions we’ve received or issues encountered by merchants during testing.
Can we do a dummy transaction to see how it works ?¶
Yes, you can. You should always do this transaction in the staging environment. Log in to our staging portal (as described in ‘Portal’_) and follow the link on the home page to submit a new application. You can use any of the ‘Test Subjects’_ for testing.
Why do I get ‘We are unable to offer you a loan at this time.’ ?¶
Because of the nature of credit products, we cannot show specific reasons to the end user on why a loan is not approved.
If this happens during testing, check the following:
Are you using one of the known good ‘Test Subjects’_ ?
Have you used the same email address for a previous loan request ? Ou partner only allows each email/ssn4 combination to be used once.
Can I email the link to the simple loan form to customers ?¶
Not directly. This link is always protected by a referral check to make sure it comes from an allowed domain as configured by you. In an email, there is no referrer.
You can implement it yourself by creating a page on your webshop that links to the simple loan form, and emailing the URL of your page to your consumers.
Embedded Form Page¶
Embed the loan form in your page inside an iframe with the following code:
<!-- Start Embedded form Widget -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdn.wegetfinancing.com/libs/1.0/wegetfinancing.js"></script>
<iframe id="gf_form_iframe" src="https://partner.wegetfinancing.com/partner/loan/[YOUR_MERCHANT_ID]" frameborder="0" width="100%" height="900px"></iframe>
<!-- End WeGetFinancing Embeed form Widget -->
Notes:
Remember to change [YOUR_MERCHANT_ID] for your merchant id.
Remove jquery include if you already have it included.
You can pass parameters to the URL to prepopulate some fields (More info at Simple Merchant Integration - Arguments).
You can adjust the width and height parameters that best suits your page, the form is responsive and mobile friendly.
If you have included the wegetfinancing.js library in your page make sure to remove it from this code.
Result: