Skip to content

Decline IOU

Request URL

POST /iou/:IOUTransactionId/decline

Description

Decline a pending IOU transaction. Used by a lender to decline to lend the requested amount. No balances are changed. The transaction becomes inactive.

Schema

Property table for iou/:IOUTransactionId/decline

Property Description Required Schema
IOUTransactionId IOUTransactionId Yes {
  "type": "string"
}

Snippet Examples

javascript

const axios = require('axios');
const config = {
  method: 'POST',
  url: '${AMPLIFI_BASE_URL}/iou/:IOUTransactionId/decline',
  headers: {
    'Content-Type': "application/json",
    'token': "A long random string token received from /token 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 "AMPLIFI_BASE_URL/iou/:IOUTransactionId/decline"  --header "Content-Type: application/json" --header "token: A long random string token received from /token request" 

Successful Response Examples

200 IOU/:IOUTRANSACTIONID/DECLINE SUCCESSFUL RESPONSE LENDER DECLINED IOU TRANSACTION

HEADERS

Header Value
Content-Type application/json
token A long random string token received from /token request

PARAMETERS

Parameter Description Value
IOUTransactionId [required] qweioutr70boy8rxdojsieqonwsordtb

REQUEST BODY

none

RESPONSE BODY

{
    "success": true
}