Skip to content

Remove Logo

Request URL

POST /public/merchant/remove/logo

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 remove their previously uploaded logo image. This action can also be facilitated through the Payment Link Iframe script when embedded into your existing front-end merchant portal UI.

Schema

Property table for public/merchant/remove/logo

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

Request Body

{
    "logoId": "3uVYhItcRAsVLCVhtiCfU8"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "logoId": "3uVYhItcRAsVLCVhtiCfU8"
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/public/merchant/remove/logo',
  headers: {
    'Content-Type': "application/json",
    'x-connectfi-jwtoken': "A long random string token received from /payment-link/merchant/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/public/merchant/remove/logo" --data "{    \"logoId\":\"3uVYhItcRAsVLCVhtiCfU8\"}" --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

{
    "logoId": "5ktQdibRFJwHO4SFUqdRle"
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "cFiMerchantId": "7MYoRiCN2XuAxJxWr82n6I",
        "logoId": "5ktQdibRFJwHO4SFUqdRle",
        "type": "SomeType"
    },
    "requestId": "c9d7335092e311ef96cf56da8a860d70"
}