@nevermined-io/payments
    Preparing search index...

    Interface MppSpendReport

    What a buyer-side failure reports about money already committed.

    payments.mpp.fetch returns this accounting on its success path (credentialsPresented / creditsPresented on MppFetchResult). It is repeated on the ERROR path because that is where a caller needs it most: the credential and its access token are function-local and gone once the helper throws, so an error without these numbers leaves the caller unable to tell whether money left — the one outcome a buyer helper must never produce.

    Read it with mppSpendOf rather than casting: it rides on PaymentsError too (a maxCredits or planId guard can fire on the re-challenge turn, after a credential has already been presented).

    interface MppSpendReport {
        challengeId?: string;
        credentialsPresented: number;
        creditsPresented?: string;
    }
    Index

    Properties

    challengeId?: string

    id of the challenge the last credential was minted against, so the caller can correlate it with the seller's side.

    credentialsPresented: number

    How many credentials were minted and sent before the failure (0, 1 or 2).

    creditsPresented?: string

    Total credits named by the challenges those credentials were minted against, as a decimal string. Present whenever credentialsPresented > 0.