Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
POST

Create a payment for a credit note

Scope: sales:invoices.write https://api.alladdin.com/api/v2/credit-notes/{creditNoteId}/payments

Records a payment against the credit note. The payment amount is deducted from the pending balance.
You can record partial payments by specifying an amount less than the total outstanding. The credit note status is automatically updated to paid when the pending balance reaches zero.

Parameters

Path parameters

creditNoteId string required

Credit Note ID (24-char hex ObjectId)

Request body

object amount string | null date string<date>

Payment date in ISO 8601 format

treasury_id string | null

Identifier of the treasury account. If omitted, the account default treasury is used.

description string | null

Request

python
import requests

url = "https://api.alladdin.com/api/v2/credit-notes/{creditNoteId}/payments"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "amount": "100.00",
    "date": "2024-01-15",
    "treasury_id": "string",
    "description": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Responses

Response

json
{
  "id": "507f1f77bcf86cd799439011"
}

Success responses

201 Payment created application/json object id string

Error responses

400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Credit note not found. application/json 429 Rate limit exceeded application/json 500 Internal server error application/json object type string title string status integer detail string

← PreviousCreate a credit note →

Next →Approve a credit note →