Skip to content

Payment Details

Request URL

POST /public/merchant/payment/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 the details of an existing payment link, specified by the "cFiTransactionId" property. 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/payment/details

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

Request Body

{
     "cFiTransactionId": "FvuOBABxhupaLH4x2hn33"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
     "cFiTransactionId": "FvuOBABxhupaLH4x2hn33"
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/public/merchant/payment/details',
  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/payment/details" --data "{     \"cFiTransactionId\":\"FvuOBABxhupaLH4x2hn33\"}" --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

{
     "cFiTransactionId": "FvuOBABxhupaLH4x2hn33"
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "cFiTransactionId": "FvuOBABxhupaLH4x2hn33",
        "cFiAggregatorId": "CLIENTID",
        "cFiMerchantId": "2Bc0QW0VYJe7VhTyXXEYNQ",
        "payerName": "Doe John",
        "cFiMerchantRef": "1",
        "invoiceNumber": "11123",
        "amount": 22.5,
        "currency": "USD",
        "dueDate": "2024-07-29",
        "description": "test description",
        "status": "Initiated",
        "fields": [
            {
                "index": 1,
                "code": "firstName",
                "label": "First Name",
                "value": "John"
            },
            {
                "index": 2,
                "code": "lastName",
                "label": "Last Name",
                "value": "Doe"
            },
            {
                "index": 3,
                "code": "email",
                "label": "Email",
                "value": "customer_email@email.test"
            },
            {
                "index": 4,
                "code": "phone",
                "label": "Phone",
                "value": "15556667777"
            }
        ],
        "availablePaymentType": [
            "card",
            "ach"
        ],
        "statusChangeHistory": [
            {
                "initiatorId": "2Bc0QW0VYJe7VhTyXXEYNQ",
                "initiatorType": "merchant",
                "status": "Initiated",
                "dtsCreatedAt": "2024-07-30T16:30:51.807Z",
                "dtsUpdatedAt": "2024-07-30T16:30:51.807Z"
            }
        ],
        "dtsCreatedAt": "2024-07-30T16:30:51.807Z"
    },
    "requestId": "3d1007204e9c11ef92543a54d404e711"
}