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
merchantApiClientTransactionPaymentSessionStartV2where 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
| Argument | Type | Required | Description |
|---|---|---|---|
amount | BigInt | Yes — always required | Amount to capture in smallest currency unit (e.g. cents). Must be greater than 0 and at most the authorized amount |
id | String | One of three | AccruPay transaction UUID |
providerCode | String | One of three | Provider's transaction reference |
merchantInternalTransactionCode | String | One of three | Your 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
| Field | Type | Description |
|---|---|---|
id | String | AccruPay transaction UUID |
status | TRANSACTION_STATUS | Updated status after settlement (typically SUCCEEDED) |
amount | BigInt | Original authorized amount |
settledAmount | BigInt | Amount actually captured |
currency | CURRENCY | Currency |
providerCode | String | Provider's transaction reference |
providerAuthorizationCode | String | Card network authorization code |
updatedAt | DateTime | Timestamp 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
| Argument | Type | Required | Description |
|---|---|---|---|
id | String | One of three | AccruPay transaction UUID |
providerCode | String | One of three | Provider's transaction reference |
merchantInternalTransactionCode | String | One of three | Your order / transaction ID |
Provide at least one of the three identifier fields.
Return shape
| Field | Type | Description |
|---|---|---|
id | String | AccruPay transaction UUID |
status | TRANSACTION_STATUS | Updated status after void (typically CANCELED) |
updatedAt | DateTime | Timestamp 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.
7 days — authorization holds expire after 7 days.
7 days — uncaptured PaymentIntents expire and Stripe voids the hold automatically.
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.
Related
- Server Payments — start a server-side authorization session
- Transactions — list, fetch, refund, and sync transactions
- Errors