Approve/Decline

Request to sends a payment from a wallet. The application needs to provide an address or Ninjapay username.

Method


POST https://prod.ninjapay.me/uapi/v1/p2p/paymentLink/statusUpdate

Parameters

Body (application/json)
 {
  tid: string; // the transaction ID of the payment
  status: int // pending(0), approve(1), decline(2)
}

Other info

ParametersInput options

status

0, 1, 2

Response

{"http_status": <int>} // 200, 201, 400...

Example


const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'API_KEY'
  },
  body: '{"tid":"A18209856328","status":1}'
};

fetch('https://prod.ninjapay.me/uapi/v1/p2p/paymentLink/statusUpdate', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  
  

Note: You need to use Admin key for this request!

Last updated