Skip to content

Get Merchant Details

Request URL

POST /payment-link/merchant/details

Description

This endpoint will return the specified merchant's details.

Schema

Property table for payment-link/merchant/details

Property Description Required Schema
cFiMerchantId The ID of the Merchant in connectFi Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "$id": "common-id"
}

Request Body

{
  "cFiMerchantId": "2Bc0QW0VYJe7VhTyXXEYNQ"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
  "cFiMerchantId": "2Bc0QW0VYJe7VhTyXXEYNQ"
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/payment-link/merchant/details',
  headers: {
    'Content-Type': "application/json",
    'x-connectfi-token': "A long random string token received from /auth/get-token request"
  },
  data
};

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/payment-link/merchant/details" --data "{  \"cFiMerchantId\":\"2Bc0QW0VYJe7VhTyXXEYNQ\"}" --header "Content-Type: application/json" --header "x-connectfi-token: A long random string token received from /auth/get-token request" 

Successful Response Examples

200 SUCCESSFUL RESPONSE

HEADERS

Header Value
Content-Type application/json
x-connectfi-token A long random string token received from /auth/get-token request

REQUEST BODY

{
  "cFiMerchantId": "2Bc0QW0VYJe7VhTyXXEYNQ"
}

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-30T13:22:20.560Z",
        "dtsUpdatedAt": "2024-07-30T13:28:46.084Z",
        "logos": [],
        "daysToPaymentExpired": 30
    },
    "requestId": "c8d69f204e7a11efac39cdb5e869de12"
}