Create Link Token
Request URL
POST /public/customer/plaid/create_link_token
Description
This endpoint will allow the customer session corresponding to the provided 'x-connectfi-jwtoken' header to create a Plaid link token in order to enable linking the customer bank account via Plaid. The resulting link token is used to open Plaid Link for the customer. The customer will then verify their bank login credentials through Plaid Link. After successful verification, Plaid Link will return a temporary public token that can be used with the /public/customer/plaid/exhange-public-token
endpoint. This action can also be facilitated through the payment page HTML that is provided when the customer payment link email is sent or, depending on client configurations, the payment link webhook.
Snippet Examples
javascript
const axios = require('axios');
const config = {
method: 'POST',
url: '${CONNECTFI_BASE_URL}/public/customer/plaid/create_link_token',
headers: {
'Content-Type': "application/json",
'x-connectfi-jwtoken': "A long random string token received from /public/customer/payment/link request"
},
};
let result;
try {
result = await axios.request(config);
if (result.status === 200) {
console.log(JSON.stringify(result.data));
}
} catch (err) {
console.log({
errCode: err.code,
responseStatus: err.response && err.response.status,
data: err.response && JSON.stringify(err.response.data)
});
}
cURL
curl --location "CONNECTFI_BASE_URL/public/customer/plaid/create_link_token" --header "Content-Type: application/json" --header "x-connectfi-jwtoken: A long random string token received from /public/customer/payment/link request"
Successful Response Examples
200 SUCCESSFUL RESPONSE
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
x-connectfi-jwtoken | A long random string token received from /public/customer/payment/link request |
REQUEST BODY
RESPONSE BODY