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
) {
transaction {
id
action
status
amount
currency
providerCode
providerAuthorizationCode
updatedAt
}
}
}

This mutation returns a MerchantTransactionContext — the captured transaction is under transaction. Settling creates a new transaction with action: SETTLE; its amount is the captured amount.

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"
) {
transaction {
id
action
status
amount
}
}
}

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

Return shape — MerchantTransactionContext

FieldTypeDescription
transactionMerchantTransactionThe settle transaction (action: SETTLE). See fields below.
customerMerchantCustomerResolved customer, when available
paymentMethodMerchantCustomerPaymentMethodPayment method used, when available
sessionMerchantClientTransactionSessionOriginating session, when available
transactionProviderMerchantTransactionProviderProvider that processed the capture

Key transaction fields:

FieldTypeDescription
idIDAccruPay transaction UUID
actionTRANSACTION_ACTIONSETTLE for a capture
statusTRANSACTION_STATUSStatus after settlement (typically SUCCEEDED)
amountBigIntCaptured amount
currencyCURRENCYCurrency
providerCodeStringProvider's transaction reference
providerAuthorizationCodeStringCard network authorization code
updatedAtDateTimeISOTimestamp 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
) {
transaction {
id
action
status
updatedAt
}
}
}

Returns a MerchantTransactionContext; the voided transaction is under transaction.

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 — MerchantTransactionContext (same wrapper as settle). Key transaction fields:

FieldTypeDescription
idIDAccruPay transaction UUID
actionTRANSACTION_ACTIONVOID for a void
statusTRANSACTION_STATUSStatus after void (typically CANCELED)
updatedAtDateTimeISOTimestamp 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.