PayFacto API - v2.0 - POST /charges/{chargeId}/increments

PayFacto API - v2.0 - POST /charges/{chargeId}/increments

PayFacto API - v2.0 - POST /charges/{chargeId}/increments

Increases the authorized amount of an existing, uncaptured pre-authorized charge. Use to add a tip or additional items before capture.

1

Prerequisites

πŸ”‘

Authentication β€” HTTP Basic Auth

All v2.0 endpoints use HTTP Basic Authentication. Set Authorization: Basic base64(username:password). Contact PayFacto for credentials.

πŸ“‹

Content-Type

All request bodies require Content-Type: application/json.

πŸ”„

Idempotency

Include Idempotency-Key header (max 64 chars) on POST requests. 200 = duplicate; 201 = newly created.

πŸ’΅

Amounts

All monetary amounts are positive integers in cents. $12.99 = 1299.

2

Request

POST    https://uat.ca.api.payfacto.cloud/payments/v1/charges/{chargeId}/increments

Path parameter

ParameterTypeDescription
chargeIdstring (UUID) Β· requiredID of the uncaptured pre-authorized charge to increment.

Request body fields

FieldConstraintDescription
amountinteger Β· requiredNew total authorized amount in cents. Must be greater than current.
terminalobject Β· optionalRequired for terminal increments. Must include terminalId.
3

Request β€” Code Example

⚠️

Charge must be uncaptured. New amount must be greater than the current authorized amount.

JSON β€” Card increment
{
"amount": 1599
}
JSON β€” Terminal increment
{
"amount": 1599,
"terminal": { "terminalId": "3a2049fb-6c9f-433d-9cef-701b6843f0cd" }
}
4

Response

Response fields (charge object)

FieldTypeDescription
idstring (UUID)Unique charge identifier. Store for all subsequent operations.
amountintegerAmount in cents (e.g. 1299 = $12.99).
amountCapturedintegerTotal captured amount in cents.
amountRefundedintegerTotal refunded amount in cents.
billingDetailobjectCustomer billing info (address, email, name, phone).
capturebooleanWhether the charge was captured immediately.
capturedbooleanWhether an uncaptured charge has since been captured.
invoiceNumberstringMerchant invoice reference (max 25 chars).
metadataobjectKey-value pairs for custom data.
originalTransactionTimestring (ISO 8601)UTC timestamp of original transaction. Only on post-charge operations.
paymentMethodobjectPayment method details (type, card/terminal/token data).
refundedbooleanWhether the charge has been fully refunded.
releaseDetailobjectRelease details if the charge was released.
resultobjectAuth result: authCode, batch, declineCode, isoResponseCode, issuerMessage.
shippingDetailobjectShipping recipient information.
statementDescriptorstringMerchant descriptor on customer statement (max 23 chars).
statusstringTransaction status: AUTHORIZED, CAPTURED, DECLINED, FAILED, RELEASED, SUCCEEDED, VOIDED.
transactionTimestring (ISO 8601)UTC timestamp when this object was created.
voidDetailobjectVoid details if voided.
errorobjectError object on failure. Contains code, type, details, message.
5

Response β€” Code Example

JSON β€” 200 Incremented
{
"id": "a1822999-099d-4fb1-a354-77be553a5b22",
"amount": 1599,
"captured": false,
"status": "AUTHORIZED",
"transactionTime": "2024-05-15T15:10:01Z"
}
6

Error / HTTP Status Codes

HTTP StatusMeaningRecommended Action
200OK β€” Previously created (same idempotency key)Check status field in response body
201Created β€” New resource createdStore the id for future operations
400Bad Request β€” Invalid payloadCheck error.details and error.invalidFields
402Payment Required β€” Issuer declinedCheck result.declineCode β€” do not retry automatically
404Not FoundVerify the ID in the request path
422Unprocessable β€” Invalid stateCheck error.message
500Internal Server ErrorRetry with backoff; contact PayFacto Support if persistent