Payment API 2.0 – Functional Documentation

Payment API 2.0 – Functional Documentation

Payment API – Functional Documentation

Overview

The Payment API allows merchants to:

  • Create and manage payment charges

  • Perform captures, increments, voids, and releases

  • Issue and manage refunds

  • Perform card verifications

It supports multiple payment methods including cards, terminals, cash, wallets (Apple Pay / Google Pay), and stored payment tokens.


Environments

EnvironmentBase URL
UAT (Integration)https://uat.ca.api.payfacto.cloud/payments/v1
Productionhttps://ca.api.payfacto.cloud/payments/v1

Security

  • Authentication: HTTP Basic Authentication

  • All endpoints require valid credentials

  • Idempotency is supported on creation endpoints (charges, refunds, verifications)


Core Concepts

Charge

A charge represents a payment transaction.
A charge can be:

  • Captured immediately

  • Authorized first and captured later

  • Incremented (pre-authorization increase)

  • Released (remaining uncaptured amount)

  • Voided (if captured and unbatched)

  • Refunded (fully or partially)

Refund

A refund returns funds from a completed charge back to the customer.

Verification

A verification validates a payment card without charging it.


Charge Lifecycle

Typical charge flow:

  1. Create Charge

  2. (Optional) Increment amount (pre-auth only)

  3. (Optional) Capture authorized amount

  4. (Optional) Void captured charge (before batching)

  5. (Optional) Release uncaptured amount

  6. (Optional) Refund captured charge


Charges API

Create a Charge

POST /charges

Creates a new payment transaction.

Supports:

  • Card payments

  • Terminal payments

  • Cash

  • Wallets (Apple Pay, Google Pay)

  • 3-D Secure authentication

  • Stored credentials

Key behavior:

  • If capture = true (default): charge is immediately captured

  • If capture = false: charge is authorized and must be captured later

Responses:

  • 201 – Charge created

  • 200 – Charge already created (same idempotency key)

  • 402 – Charge declined

  • 400 / 500 – Error


Query Charges

GET /charges

Returns a paginated list of charges, sorted by most recent.

Filters include:

  • Terminal ID

  • Authorization code

  • Idempotency key

  • Invoice number

  • Card last four digits

  • Date range

  • Pagination (offset, limit)


Get a Charge

GET /charges/{chargeId}

Retrieves a single charge by its unique identifier.


Capture a Charge

POST /charges/{chargeId}/captures

Captures an existing authorized (uncaptured) charge.

Rules:

  • Charge must exist

  • Charge must not already be fully captured

  • Partial capture is supported


Increment a Charge

POST /charges/{chargeId}/increments

Increases the authorized amount on a pre-authorized charge.

Used for:

  • Hospitality

  • Car rentals

  • Variable-amount transactions


Void a Captured Charge

POST /charges/{chargeId}/voids

Voids a captured charge before it is batched.


Release a Charge

POST /charges/{chargeId}/releases

Releases the remaining uncaptured portion of a charge.


Refunds API

Create a Refund

POST /refunds

Issues a refund against a completed charge.

Features:

  • Full or partial refunds

  • Idempotent creation

  • Reason required


Query Refunds

GET /refunds

Returns a list of refunds, sorted by most recent.

Supports the same filtering and pagination logic as charges.


Get a Refund

GET /refunds/{refundId}

Retrieves a specific refund.


Void a Refund

POST /refunds/{refundId}/voids

Voids an unbatched refund.


Verifications API

Create Verification

POST /verifications

Verifies a credit card without charging it.

Use cases:

  • Card validation

  • Storing payment methods


Get Verification

GET /verifications/{verificationId}

Retrieves the result of a verification request.


Payment Methods Supported

  • CARD – Manual entry, EMV, magstripe

  • TERMINAL – POS-based payments

  • CASH

  • PAYMENT_TOKEN – Stored credentials

  • WALLETS

    • Apple Pay

    • Google Pay


Statuses & Results

Transaction Status

  • RECEIVED

  • PENDING

  • SUCCEEDED

  • FAILED

  • VOIDED

  • RELEASED

  • CANCELLED

  • ERROR

Result Object

Provides:

  • Authorization codes

  • Decline reasons

  • Processor and issuer response codes

  • Batch information


Error Handling

Errors include:

  • Type (CARD_ERROR, INVALID_REQUEST_ERROR, etc.)

  • Error code

  • Human-readable message

  • Field-level validation errors

  • Documentation reference URL


Key Functional Notes

  • Idempotency prevents duplicate charges/refunds

  • Partial capture and refund are supported

  • Stored credentials comply with recurring payment standards

  • Terminal transactions include EMV and track data

  • 3-D Secure and wallet authentication are supported


Pagination and Filtering for GET Requests

Overview

When an API GET request returns multiple results, PayFacto applies pagination by default to limit the response size. By default, only the first 10 records are returned. Clients can control both the number of results returned and the starting position by using query parameters.

In addition, results can be filtered by a date range using UTC timestamps.


Default Behavior

If no query parameters are provided:

  • Limit: 10 records

  • Offset: 0 (starting from the first record)

  • Date range: From 30 days prior to the current date and time up to the current date and time (UTC)


Query Parameters

limit

  • Description: The maximum number of records to return.

  • Type: Integer

  • Maximum value: 100

  • Default: 10


offset

  • Description: The starting position of the results.

  • Type: Integer

  • Default: 0

  • Notes:

    • offset=0 starts from the first record.

    • Useful for pagination when combined with limit.


startDate

  • Description: The start of the date range filter.

  • Type: UTC date-time

  • Default: 30 days before endDate

  • Notes:

    • Must be provided in UTC format.

    • If omitted, it is automatically calculated.


endDate

  • Description: The end of the date range filter.

  • Type: UTC date-time

  • Default: Current date and time (UTC)


Pagination Example

Request

GET /transactions?limit=20&offset=40

Behavior

  • Returns 20 records

  • Starts from the 41st record in the result set


Date Range Filtering Example

Request

GET /transactions?startDate=2025-01-01T00:00:00Z&endDate=2025-01-31T23:59:59Z

Behavior

  • Returns records created within the specified UTC date range

  • Applies default pagination unless limit and offset are explicitly provided


Combined Example

Request

GET /transactions?limit=50&offset=0&startDate=2025-01-01T00:00:00Z&endDate=2025-01-15T00:00:00Z

Behavior

  • Returns up to 50 records

  • Starts from the first record

  • Filters results to the specified date range


Summary

PayFacto GET endpoints support flexible pagination and date-based filtering. By adjusting limit, offset, startDate, and endDate, clients can efficiently retrieve large result sets in manageable segments while controlling the time range of returned data.


Global Parameters Table (All Endpoints)

Path Parameters

ParameterLocationType / FormatRequiredEndpoints
chargeIdPathstring (uuid)YesGET /charges/{chargeId}
POST /charges/{chargeId}/captures
POST /charges/{chargeId}/increments
POST /charges/{chargeId}/voids
POST /charges/{chargeId}/releases
refundIdPathstring (uuid)YesGET /refunds/{refundId}
POST /refunds/{refundId}/voids
verificationIdPathstring (uuid)YesGET /verifications/{verificationId}

Query Parameters (Search & Pagination)

ParameterLocationType / FormatRequiredEndpoints
terminalIdQuerystring (uuid)NoGET /charges
GET /refunds
authCodeQuerystring (max 6)NoGET /charges
GET /refunds
idempotencyKeyQuerystring (max 64)NoGET /charges
GET /refunds
invoiceNumberQuerystring (max 25)NoGET /charges
GET /refunds
lastFourQuerystring (4 digits)NoGET /charges
GET /refunds
startDateQuerystring (YYYY-MM-DD)NoGET /charges
GET /refunds
endDateQuerystring (YYYY-MM-DD)NoGET /charges
GET /refunds
offsetQueryinteger (int32)NoGET /charges
GET /refunds
limitQueryinteger (int32)NoGET /charges
GET /refunds

Charge – Request Body Parameters

ParameterType / FormatRequiredEndpoints
amountinteger (int64)YesPOST /charges
invoiceNumberstring (max 25)YesPOST /charges
paymentMethodobjectYesPOST /charges
capturebooleanNoPOST /charges
billingDetailobjectNoPOST /charges
shippingDetailobjectNoPOST /charges
metadataobject (KVP)NoPOST /charges
statementDescriptorstring (max 23)NoPOST /charges

Capture Parameters

ParameterType / FormatRequiredEndpoints
amountinteger (int64)YesPOST /charges/{chargeId}/captures
statementDescriptorstring (max 23)NoPOST /charges/{chargeId}/captures
terminalobjectNoPOST /charges/{chargeId}/captures

Increment Parameters

ParameterType / FormatRequiredEndpoints
amountinteger (int64)YesPOST /charges/{chargeId}/increments
terminalobjectNoPOST /charges/{chargeId}/increments

Void Charge Parameters

ParameterType / FormatRequiredEndpoints
reasonenum (voidReason)YesPOST /charges/{chargeId}/voids
terminalobjectNoPOST /charges/{chargeId}/voids

Release Charge Parameters

ParameterType / FormatRequiredEndpoints
reasonenum (releaseReason)YesPOST /charges/{chargeId}/releases
terminalobjectNoPOST /charges/{chargeId}/releases

Refund – Request Body Parameters

ParameterType / FormatRequiredEndpoints
amountinteger (int64)YesPOST /refunds
chargeIdstring (uuid)YesPOST /refunds
reasonenumYesPOST /refunds
metadataobject (KVP)NoPOST /refunds

Void Refund Parameters

ParameterType / FormatRequiredEndpoints
reasonenum (voidReason)YesPOST /refunds/{refundId}/voids
terminalobjectNoPOST /refunds/{refundId}/voids

Verification Parameters

ParameterType / FormatRequiredEndpoints
cardobjectYesPOST /verifications
billingDetailobjectNoPOST /verifications
metadataobject (KVP)NoPOST /verifications

Bonus Notes

  • Terminal object appears in capture, increment, void, release, refund void

  • Amount fields always use smallest currency unit (e.g. cents)

    • Related Articles

    • API v1.0 - SHC - Secure Hosted Checkout

      About SHC What is Secure Hosted Checkout? Secure Hosted Checkout (SHC) is a JavaScript library that allows merchants to collect and send cardholder information to PayFacto for verification without needing to access that information directly. When ...
    • Hosted Payment Page

      Introduction This page aims to train future users of the secure redirection of the PayFacto payment solution. You will find in this page a description of the secure redirection service, the operation, the various call and return parameters, the ...
    • Payment Manager User Guide

      INTRODUCTION Foreword Due to the administrative interface, the client can control all transactions that are transmitted by its representatives or clients to the PayFacto server. With this tool the client can assigns users, who may then generate ...
    • API Specifications

      Overview To communicate with the Payment API you should submit HTTP POST requests to the corresponding endpoints. There are differ endpoints for Test and Production. The API uses FORM parameters (key-value parameters passed in an HTTP POST URL) for ...
    • Secure Payment - Android Intent (Application to Application)

      Description This documentation is intended for customers and third parties wishing to control the PayFacto payment application running on a PAX Android device using an Android Intent. The document contains the functional message specifications for a ...