CompletePurchaseResult
Fields
purchasePurchaserefusalCompletePurchaseRefusalWhy the order was not completed. Null when it was. Read this, not the text in errors, to decide what to do next: paymentNotSucceeded leaves the order open to confirm again, fulfillmentRefused closes it for good.
Null alongside errors in two other answers, told apart by purchase:
purchasenull: nothing is known yet — Stripe could not be read — which
a client must treat as "may have paid" and confirm again later.
purchaseset: the order completed and the card's payment was recorded,
but a gift card staged to cover part of a balance no longer could, so that part is still owed (purchase.balanceDue). Final — calling again changes nothing; the rest is collected like any other balance.
refundedAmountIntOn a fulfillmentRefused refusal, the cents given back to the buyer's payment method. Null when nothing has gone back yet: a bank debit still clearing is refunded once it settles, and a refund Stripe would not issue is raised with Sessions to return by hand. Null too when nothing was charged.
errors[OperationError!]!