Skip to content

Add donate-on-failure payment flag support #298

Description

@Kingsman-99

Labels: complexity: high

Update the SDK pay() method to accept a donateOnFailure boolean flag. When true, the payment is marked in the contract so that if the invoice fails to reach its goal, the funds are donated rather than refunded.

Acceptance criteria:

  • pay({ invoiceId, amount, donateOnFailure }) passes the flag to the contract
  • donateOnFailure defaults to false
  • getPaymentHistory returns the flag per payment
  • TypeScript type updated on PaymentOptions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions