Skip to main content

Authorizations

An authorization places a hold on a payment method for a specific amount without immediately moving funds. You capture (settle) the funds in a separate step, or void the hold if you do not need to charge.

AccruPay supports two authorization sources:

  • Client sessions started with merchantApiClientTransactionPaymentSessionStartV2 where the provider supports auth-only flows.
  • Server sessions started with merchantApiServerPaymentMethodTransactionAuthorizationSessionStart.

Both result in a transaction with a status of SUCCEEDED (funds on hold). The mutations on this page operate on that transaction.


merchantApiTransactionAuthorizationSettle

Capture (settle) an authorized transaction. You may settle for less than the authorized amount — this is called a partial capture.

mutation SettleAuthorization(
$amount: BigInt!
$id: String
$providerCode: String
$merchantInternalTransactionCode: String
) {
merchantApiTransactionAuthorizationSettle(
amount: $amount
id: $id
providerCode: $providerCode
merchantInternalTransactionCode: $merchantInternalTransactionCode
) {
id
status
amount
settledAmount
currency
providerCode
providerAuthorizationCode
updatedAt
}
}

Arguments

ArgumentTypeRequiredDescription
amountBigIntYes — always requiredAmount to capture in smallest currency unit (e.g. cents). Must be greater than 0 and at most the authorized amount
idStringOne of threeAccruPay transaction UUID
providerCodeStringOne of threeProvider's transaction reference
merchantInternalTransactionCodeStringOne of threeYour order / transaction ID

Provide amount plus at least one of id, providerCode, or merchantInternalTransactionCode.

Partial capture example

If you authorized $100.00 (amount: 10000) but the final order total is $87.50:

mutation PartialSettle {
merchantApiTransactionAuthorizationSettle(
amount: 8750
id: "txn-uuid-here"
) {
id
status
settledAmount
}
}

The unsettled portion of the hold is released automatically by the card network after the provider's hold expiry window.

Return shape

FieldTypeDescription
idStringAccruPay transaction UUID
statusTRANSACTION_STATUSUpdated status after settlement (typically SUCCEEDED)
amountBigIntOriginal authorized amount
settledAmountBigIntAmount actually captured
currencyCURRENCYCurrency
providerCodeStringProvider's transaction reference
providerAuthorizationCodeStringCard network authorization code
updatedAtDateTimeTimestamp of last update

merchantApiTransactionAuthorizationVoid

Release an authorization without capturing any funds. Use this when an order is cancelled or the hold is no longer needed.

mutation VoidAuthorization(
$id: String
$providerCode: String
$merchantInternalTransactionCode: String
) {
merchantApiTransactionAuthorizationVoid(
id: $id
providerCode: $providerCode
merchantInternalTransactionCode: $merchantInternalTransactionCode
) {
id
status
updatedAt
}
}

Arguments

ArgumentTypeRequiredDescription
idStringOne of threeAccruPay transaction UUID
providerCodeStringOne of threeProvider's transaction reference
merchantInternalTransactionCodeStringOne of threeYour order / transaction ID

Provide at least one of the three identifier fields.

Return shape

FieldTypeDescription
idStringAccruPay transaction UUID
statusTRANSACTION_STATUSUpdated status after void (typically CANCELED)
updatedAtDateTimeTimestamp of last update

Authorization lifecycle

SUCCEEDED (authorization approved, funds on hold)

├─ settle ──► creates new SETTLE transaction (SUCCEEDED)

└─ void ──► original moves to CANCELED

A transaction that is not settled or voided will expire according to the provider's hold window. Expired authorizations are not automatically reflected in AccruPay — call merchantApiTransactionSyncOne to pull the latest state after expiry.

Authorization hold windows
Nuvei

7 days — authorization holds expire after 7 days.

Stripe

7 days — uncaptured PaymentIntents expire and Stripe voids the hold automatically.

Other providers

Hold expiry windows vary by PSP and card network. Consult your provider's documentation for the exact window — do not assume 7 days applies to all providers.