Implementation Comparison
Replace your existing Truv integration with Argyle in a few easy steps.
1<!-- Web example -->
2
3<!DOCTYPE html>
4<html>
5
6<head>
7 <meta charset="utf-8" />
8 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
9</head>
10
11<body>
12 <script src="https://plugin.argyle.com/argyle.web.v5.js"></script>
13 <script type="text/javascript">
14 const linkInstance = Argyle.create({
15 userToken: 'USER_TOKEN',
16 sandbox: true // Set to false for production environment.
17 })
18 linkInstance.open()
19 </script>
20</body>
21
22</html>
Optional callbacks such as onAccountConnected
and onClose
can be added when embedding Argyle Link.
1<!-- Web example -->
2
3<!DOCTYPE html>
4<html>
5
6<head>
7 <script src="https://cdn.truv.com/bridge.js"></script>
8</head>
9
10<body>
11 <script>
12 const bridgeToken = 'BRIDGE_TOKEN'
13
14 const bridge = TruvBridge.init({
15 bridgeToken: bridgeToken.bridge_token,
16 onSuccess:function(public_token, metadata){
17 console.log("token: ", public_token)
18 console.log("metadata: ", metadata)
19 }
20 })
21 </script>
22 <button type="button" id="button" onclick="bridge.open()">
23 Connect
24 </button>
25</body>
26
27</html>
Replace USER_TOKEN
in step 3 with a user token.
a. (Argyle API) — Create a user.
> Returns a user id.
> Returns the user token.
Replace BRIDGE_TOKEN
in step 3 with a bridge token.
a. (Truv API) — Create a user.
> Returns a user id.
b. (Truv API) — Retrieve a link id.
Use the public_token
returned by the onSuccess
callback in step 3.
> Returns a link id.
c. (Truv API) — Create a bridge token.
Use the user id returned in step 4a.
> Returns the bridge token.
Initialize Argyle Link.
Initialize Truv Bridge.
(Argyle API) — Retrieve identity information.
Filter by the user id returned in step 4.
1// Example Argyle identity object: 2 3{ 4 "id": "0153b145-7ab9-bea2-cc16-a8b71328942f", 5 "account": "0187c66e-e7e5-811c-b006-2232f00f426a", 6 "address": { 7 "city": "New York", 8 "line1": "852 North W St", 9 "line2": "Apt 221", 10 "state": "NY", 11 "country": "US", 12 "postal_code": "10014" 13 }, 14 "first_name": "Sarah", 15 "last_name": "Longfield", 16 "full_name": "Sarah Longfield", 17 "birth_date": "1980-10-30", 18 "email": "[email protected]", 19 "phone_number": "+12125555555", 20 "picture_url": "www.argyle.com/logofoldername", 21 "employment_status": "active", 22 "employment_type": "full-time", 23 "job_title": "Store Manager", 24 "ssn": "522-09-1191", 25 "marital_status": "Married filing jointly", 26 "gender": "Female", 27 "hire_date": "2020-04-08", 28 "termination_date": null, 29 "termination_reason": null, 30 "employer": "Whole Goods", 31 "base_pay": { 32 "amount": "58024.50", 33 "period": "annual", 34 "currency": "USD" 35 }, 36 "pay_cycle": "semimonthly", 37 "platform_ids": { 38 "employee_id": "OB238HDW5", 39 "position_id": "6ELL4O7PM", 40 "platform_user_id": "JLH7B9V6O6YGN9O7" 41 }, 42 "created_at": "2023-01-30T12:53:24.561594Z", 43 "updated_at": "2023-01-30T12:55:06.478699Z", 44 "metadata": {} 45}
(Truv API) — Retrieve identity information.
Query by the link id returned in step 4.
1// Example Truv identity object: 2 3{ 4 "id": "48427a36d43c4d5aa6324bc06c692456", 5 "created_at": "2022-06-07T15:00:00Z", 6 "updated_at": "2022-06-31T15:00:00Z", 7 "first_name": "John", 8 "last_name": "Doe", 9 "full_name": "John Doe", 10 "middle_initials": "K", 11 "email": "[email protected]", 12 "ssn": "123456789", 13 "date_of_birth": "1992-03-03", 14 "home_address": { 15 "street": "1 Morgan Ave", 16 "city": "Los Angeles", 17 "state": "CA", 18 "zip": "90210", 19 "country": "US" 20 } 21}
Connect a real account:
a. Change sandbox
to false
in step 3.
b. Repeat steps 4-7.
+ Use Production API keys.
+ Use real payroll credentials in step 6.
Connect a real account:
a. Repeat steps 4-7.
+ Use Production API keys.
+ Use real payroll credentials in step 6.
(Argyle API) — Subscribe to webhooks:
identities.added
— Sent when identity information is available after a new account connection.
(Truv API) — Subscribe to webhooks:
profile-created
— Sent when identity information is available after a new account connection.