Skip to content

Set Refund Status

Request URL

POST /payment-link/payment/refund-set-status

Description

This endpoint will allow you (the client/platform) to manually set the status of a payment link refund transaction, specified by the cFiTransactionId. The manualStatus property default is 'true' and will lock the status of the specified refund, preventing non-manual status updates. To allow non-manual status updates, set manualStatus: false.

Schema

Property table for payment-link/payment/refund-set-status

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"
}
status Status Yes {
  "type": "string",
  "enum": [ "Initiated", "Sent", "Cancelled",
"Rejected", "Error", "Expired", "Processing",
"SentToPay", "Completed", "Settled",
"Returned", "Declined" ]
}
description Description Yes {
  "type": "string",
  "pattern": "^((?![<>]).)*$",
  "minLength": 0,
  "maxLength": 100,
  "nullable": true,
  "$id": "common-commonStr100"
}
manualStatus true if status is set manually No {
  "type": "boolean",
  "nullable": true
}

Request Body

{
    "cFiTransactionId": "2RR2QHRIVjm3GfOJCOOmf7",
    "status": "Completed",
    "description": "Manual status set test"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "cFiTransactionId": "2RR2QHRIVjm3GfOJCOOmf7",
    "status": "Completed",
    "description": "Manual status set test"
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/payment-link/payment/refund-set-status',
  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/payment/refund-set-status" --data "{    \"cFiTransactionId\":\"2RR2QHRIVjm3GfOJCOOmf7\",   \"status\":\"Completed\",   \"description\":\"Manual status set test\"}" --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

{
    "cFiTransactionId": "2RR2QHRIVjm3GfOJCOOmf7",
    "status": "Completed",
    "description": "Manual status set test"
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "cFiTransactionId": "2RR2QHRIVjm3GfOJCOOmf7",
        "cFiAggregatorId": "CLIENTID",
        "cFiMerchantId": "6i2DdNk8CDfPFzwceE5hC2",
        "cFiParentId": "1rqF1edFQWTNmliNcIbp29",
        "status": "Completed",
        "statusChangeHistory": [
            {
                "initiatorId": "6i2DdNk8CDfPFzwceE5hC2",
                "initiatorType": "merchant",
                "status": "SentToPay",
                "dtsCreatedAt": "2024-10-25T17:05:42.782Z",
                "dtsUpdatedAt": "2024-10-25T17:05:42.782Z"
            },
            {
                "login": "CLIENTID",
                "description": "Manual status set test",
                "initiatorId": "1BYMjwHbm9QtronYdXDEWe",
                "initiatorType": "user",
                "status": "Completed",
                "dtsCreatedAt": "2024-10-25T17:58:51.368Z",
                "dtsUpdatedAt": "2024-10-25T17:58:51.368Z"
            }
        ],
        "paymentType": "ach",
        "ach": {
            "payment": {
                "reference": "2RR2QHRIVjm3GfOJCOOmf7",
                "effectiveEntryDate": "2024-10-28",
                "companyEntryDescription": "PURCHASE",
                "standardEntryClassCode": "PPD",
                "individualName": "Doe John",
                "routingNumber": "103112617",
                "DFIAccountNumber": "123456789",
                "accountType": "Checking",
                "transactionType": "Debit",
                "amount": 1.01,
                "currency": "USD",
                "webhookUrl": "https://connectfi-payment-link-public.paygears.net/api/public/webhook/ach"
            },
            "result": {
                "cFiTransactionId": "CLIENTID_2RTuaz88ibQoW2c0OeoCLU",
                "reference": "2RR2QHRIVjm3GfOJCOOmf7",
                "cFiAggregatorId": "CLIENTID",
                "status": "Sent",
                "dtsCreatedAt": "2024-10-25T17:05:42.836Z",
                "dtsSent": "2024-10-25T17:54:47.477Z",
                "effectiveEntryDate": "2024-10-28",
                "individualName": "Doe John",
                "routingNumber": "103112617",
                "amount": 1.01,
                "currency": "USD",
                "DFIAccountNumber": "123456789"
            }
        },
        "dtsCreatedAt": "2024-10-25T17:05:42.783Z",
        "dtsUpdatedAt": "2024-10-25T17:58:51.368Z",
        "manualStatus": true
    },
    "requestId": "cacb38d092fa11efbfe134d6d15a4812"
}