Sign in

Create prepayment

documented

Create a prepayment.

POST /PrepaymentsPrepaymentsno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

npx -y keychains@latest curl "https://api.xero.com/api.xro/2.0/Prepayments" \
  -X POST \
  -H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
  -H "xero-tenant-id: {{$tenant_id}}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"Payments": [ {"Date": "{{$date}}", "Reference": "{{$reference}}", "Contact": {"ContactID": "{{$contact_id}}", "Name": "{{$contact_name}}"}, "BankAccount": {"AccountID": "{{$bank_account_id}}", "Code": "{{$bank_account_code}}"}, "LineItems": [ {"Description": "{{$description}}", "Quantity": 1, "UnitAmount": {{$unit_amount}}, "AccountCode": "{{$account_code}}"} ], "TotalAmount": {{$total_amount}} } ] }'"