Skip to content

Refund List

Request URL

POST /public/merchant/payment/refund-list

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 list payment link refund transactions that satisfy the specified criteria.

Schema

Property table for public/merchant/payment/refund-list

Property Description Required Schema
cFiTransactionId The transaction ID in the connectFi system No {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "$id": "common-id"
}
cFiTransactionIds Array of transaction IDs from the connectFi system obtained when each transaction was initialized No array of {
  "type": "string"
}
cFiParentId The transaction ID in the connectFi system of the original transaction request No {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "$id": "common-id"
}
status Status No {
  "type": "string",
  "nullable": true,
  "enum": [ "Initiated", "Sent", "Cancelled",
"Rejected", "Error", "Expired", "Processing",
"SentToPay", "Completed", "Settled",
"Returned", "Declined" ]
}
dateCreateFrom A beginning date in ISO Date format No {
  "type": "string",
  "nullable": true,
  "format": "dateISO"
}
dateCreateTo An ending date in ISO Date format No {
  "type": "string",
  "nullable": true,
  "format": "dateISO"
}
numberOfRecords The maximum number of desired records to return No {
  "type": "number",
  "nullable": true
}
skipRecords The number of records to skip when returning results No {
  "type": "number",
  "nullable": true
}

Request Body

{
  "cFiTransactionIds": [],
  "dateCreateFrom": "2024-08-30T18:03:46.637Z",
  "dateCreateTo": "2024-10-30T18:03:46.637Z"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
  "cFiTransactionIds": [],
  "dateCreateFrom": "2024-08-30T18:03:46.637Z",
  "dateCreateTo": "2024-10-30T18:03:46.637Z"
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/public/merchant/payment/refund-list',
  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/refund-list" --data "{  \"cFiTransactionIds\":[], \"dateCreateFrom\":\"2024-08-30T18:03:46.637Z\", \"dateCreateTo\":\"2024-10-30T18:03:46.637Z\"}" --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

{
  "cFiTransactionIds": [],
  "dateCreateFrom": "2024-08-30T18:03:46.637Z",
  "dateCreateTo": "2024-10-30T18:03:46.637Z"
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "total": {
            "skipRecords": 0,
            "numberOfRecords": 1,
            "more": false
        },
        "items": [
            {
                "cFiTransactionId": "2RR2QHRIVjm3GfOJCOOmf7",
                "cFiAggregatorId": "CLIENTID",
                "cFiMerchantId": "6i2DdNk8CDfPFzwceE5hC2",
                "cFiMerchantRef": "14",
                "cFiParentId": "1rqF1edFQWTNmliNcIbp29",
                "status": "SentToPay",
                "statusChangeHistory": [
                    {
                        "initiatorId": "6i2DdNk8CDfPFzwceE5hC2",
                        "initiatorType": "merchant",
                        "status": "SentToPay",
                        "_id": "671bcfe60b60cb137e84293d",
                        "dtsCreatedAt": "2024-10-25T17:05:42.782Z",
                        "dtsUpdatedAt": "2024-10-25T17:05:42.782Z"
                    }
                ],
                "dtsCreatedAt": "2024-10-25T17:05:42.783Z",
                "paymentType": "ach",
                "ach": {
                    "payment": {
                        "amount": 1.01,
                        "currency": "USD"
                    },
                    "result": {
                        "cFiTransactionId": "CLIENTID_2RTuaz88ibQoW2c0OeoCLU",
                        "status": "Initiated",
                        "effectiveEntryDate": "2024-10-28",
                        "dtsCreatedAt": "2024-10-25T17:05:42.836Z"
                    }
                }
            }
        ]
    },
    "requestId": "2e2cfaf092f411ef893705725acd1211"
}

200 SUCCESSFUL RESPONSE - NO MATCHES

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

{
  "cFiTransactionIds": [],
  "dateCreateFrom": "2024-08-30T18:03:46.637Z",
  "dateCreateTo": "2024-10-30T18:03:46.637Z",
  "status": "Initiated"
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "total": {
            "skipRecords": 0,
            "numberOfRecords": 0,
            "more": false
        },
        "items": []
    },
    "requestId": "0bfae6d092f511ef893705725acd1211"
}