POST
/dashboard/invoices/{id}/pay/credit Pay invoice with credit
Pays a specific invoice using the credit balance on your account.
Parameters
| Name | Type | In | Description |
|---|---|---|---|
id* | integer | path | The ID of the invoice to pay with credit |
Response
200
400
403
404
422
successbooleanRequest
curl -X POST "https://api.royalehosting.net/dashboard/invoices/{id}/pay/credit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-organization-id: YOUR_ORG_ID"Request
const response = await fetch("https://api.royalehosting.net/dashboard/invoices/{id}/pay/credit", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
},
});
const data = await response.json();Request
import requests
response = requests.post(
"https://api.royalehosting.net/dashboard/invoices/{id}/pay/credit",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
}
)
print(response.json())Response
{
"success": true
}