Skip to content

Payment Details

Request URL

POST /public/customer/payment/details

Description

This endpoint will allow the customer session corresponding to the provided 'x-connectfi-jwtoken' header to retrieve the payment link details. 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/payment/details',
  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/payment/details"  --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

none

RESPONSE BODY

{
    "code": "0",
    "data": {
        "payment": {
            "cFiTransactionId": "7l7TrL0ZukBQR4H4W2fsvT",
            "cFiAggregatorId": "CLIENTID",
            "cFiMerchantId": "2Bc0QW0VYJe7VhTyXXEYNQ",
            "payerName": "Doe John",
            "cFiMerchantRef": "1",
            "invoiceNumber": "11125",
            "amount": 1.5,
            "currency": "USD",
            "dtsExpiredAt": "2024-08-29T17:56:45.189Z",
            "dueDate": "2024-08-29",
            "description": "test description",
            "status": "Sent",
            "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": "c*********************@e******.test"
                },
                {
                    "index": 4,
                    "code": "phone",
                    "label": "Phone",
                    "value": "*******5555"
                }
            ],
            "availablePaymentType": [
                "card",
                "ach"
            ],
            "statusChangeHistory": [
                {
                    "initiatorId": "2Bc0QW0VYJe7VhTyXXEYNQ",
                    "initiatorType": "merchant",
                    "status": "Initiated",
                    "dtsCreatedAt": "2024-07-30T17:55:44.024Z",
                    "dtsUpdatedAt": "2024-07-30T17:55:44.024Z"
                },
                {
                    "initiatorId": "2Bc0QW0VYJe7VhTyXXEYNQ",
                    "initiatorType": "merchant",
                    "status": "Sent",
                    "dtsCreatedAt": "2024-07-30T17:56:45.190Z",
                    "dtsUpdatedAt": "2024-07-30T17:56:45.190Z"
                }
            ],
            "dtsCreatedAt": "2024-07-30T17:55:44.024Z",
            "link": "3zjGoeyuHi1bPgCNgb2B1JERhfzLWU0SogPsgBG0nbb3d4RAHH2APVeyqldsOiH8C",
            "url": "google.com/payment/3zjGoeyuHi1bPgCNgb2B1JERhfzLWU0SogPsgBG0nbb3d4RAHH2APVeyqldsOiH8C"
        },
        "merchant": {
            "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/customer/payment/logo/3MPbtqzn0pB62JiNUNF6c9"
                }
            ],
            "daysToPaymentExpired": 30
        }
    },
    "requestId": "563c31504f2e11ef92543a54d404e711"
}