This call allows your app to ask the user for a one time payment. Users must have a paid account to run paid apps. Payments will processed at the end of the month. When you request a payment, the user will see a request.
Parameters
constamountInDollars=0; // amount in USDconstpaymentFor=''; // payment descriptiondronedeployApi.Payments.charge(amountInDollars, paymentFor);
Note: If your app is not published, the returned paymentId is fake and is not saved to our database. Additionally, having a paid account is not enforced while in development.
Example Response
Success Response
If the payment is successful you will receive the payment id.
{"user_id":"57c5fc90dd32274105595f92","description":"Paid for something","date_creation":1234567890100,"date_paid":null,"amount":1000,"plugin_id":"5817d4b6361143b45cbb072a","id":"5817d4b9361143b45cbb072b"}
To cancel a payment send a PUT request to /v1/plugin_payments/<payment_id> with {"status": "cancelled"} as the body.
curl -X PUT -H "Content-Type: application/json" -d '{"status":"cancelled"}' "https://public-api.dronedeploy.com/v1/plugin_payments/589e239dc66a510001bd330b?api_key=65452af2874547428a90d008a8ed75dc"