Contents

POST /batch-submit#

Send in donation receipts for the current or one of the past fiscal years. The donor will reveive the signed total back, which is called the donation statement.

Request: SubmitDonationReceiptsRequest

Response:

201 Created:

The request was successful, and a donation statement is now available. The response will be empty.

400 Bad Request:

The request body is malformed, required fields are missing, or the donation_receipts array is empty or contains malformed entries. Returned with error code TALER_EC_GENERIC_JSON_INVALID or TALER_EC_GENERIC_PARAMETER_MALFORMED.

403 Forbidden:

One of the donation receipt signatures is invalid. Returned with error code TALER_EC_DONAU_DONATION_RECEIPT_SIGNATURE_INVALID.

404 Not Found:

At least one of the donation unit keys is not known to the Donau. Returned with error code TALER_EC_DONAU_GENERIC_DONATION_UNIT_UNKNOWN.

409 Conflict:

A duplicate donor identifier nonce was detected within the submitted receipts. Returned with error code TALER_EC_DONAU_DONOR_IDENTIFIER_NONCE_REUSE.

500 Internal Server Error:

The Donau encountered an internal database error. Returned with error code TALER_EC_GENERIC_DB_FETCH_FAILED.

Details:

interface SubmitDonationReceiptsRequest{
  // hashed taxpayer ID plus salt
  h_donor_tax_id: HashCode;
  // All donation receipts must be for this year.
  donation_year: Integer;
  // Receipts should be sorted by amount.
  donation_receipts: DonationReceipt[];
}
interface DonationReceipt {
  h_donation_unit_pub: HashCode;
  nonce: string;
  donation_unit_sig: DonationReceiptSignature;
}
type DonationReceiptSignature = RSADonationReceiptSignature | CSDonationReceiptSignature ;
interface RSADonationReceiptSignature {
  cipher: "RSA";

  // RSA signature
  rsa_signature: RsaSignature;
}
interface CSDonationReceiptSignature {
  cipher: "CS";

  // R value component of the signature.
  cs_signature_r: Cs25519Point;

  // s value component of the signature.
  cs_signature_s: Cs25519Scalar;
}