Merchant Profile
Request URL
POST /public/merchant/profile/details
Description
After authenticating the merchant through your existing front-end merchant portal UI and requesting a merchant JSON Web Token through the `/payment-link/merchant/get-token` endpoint, you may make a call to this endpoint in order to allow the merchant corresponding to the provided 'x-connectfi-jwtoken' header to view their own profile details. This action can also be facilitated through the Payment Link Iframe script when embedded into your existing front-end merchant portal UI.
Snippet Examples
javascript
const axios = require('axios');
const config = {
method: 'POST',
url: '${CONNECTFI_BASE_URL}/public/merchant/profile/details',
headers: {
'Content-Type': "application/json",
'x-connectfi-jwtoken': "A long random string token received from /payment-link/merchant/get-token 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/merchant/profile/details" --header "Content-Type: application/json" --header "x-connectfi-jwtoken: A long random string token received from /payment-link/merchant/get-token request"
Successful Response Examples
200 SUCCESSFUL RESPONSE
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
x-connectfi-jwtoken | A long random string token received from /payment-link/merchant/get-token request |
REQUEST BODY
RESPONSE BODY
{
"code": "0",
"data": {
"name": "Merchant1",
"isArchived": false,
"email": "def123.test@email.test",
"phone": "5555555555",
"address": "1346 Pleasant Ave",
"city": "New York",
"stateCode": "NY",
"postalCode": "12345",
"availablePaymentType": [
"ach",
"card"
],
"usePlaid": true,
"reference": "1",
"cFiAggregatorId": "CLIENTID",
"cFiMerchantId": "2Bc0QW0VYJe7VhTyXXEYNQ",
"dtsCreatedAt": "2024-07-30T14:59:34.766Z",
"dtsUpdatedAt": "2024-07-30T14:59:51.016Z",
"logos": [
{
"path": "public/merchant/logo/3oHaiMYzbQwKmUNBdTiF1M"
}
],
"daysToPaymentExpired": 30
},
"requestId": "43988f604e9511ef92543a54d404e711"
}