Only this pageAll pages
Powered by GitBook
1 of 27

Sanctus Pay

Loading...

Getting Started

Loading...

Basics

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Developer

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Hosted Checkout Page

A Hosted Checkout Page (HCP sometimes also refered as HPP) is a secure, standalone payment page hosted by a payment provider (such as SanctusPay). Rather than the merchant’s own website handling and storing sensitive card data directly, the user is redirected to this pre-built, fully compliant checkout form to enter their payment details. Here’s what it generally does and why it’s beneficial:

  1. Secure Data Collection

    • The HCP ensures cardholder information is collected in a PCI-compliant environment.

    • Sensitive payment details (e.g., card number, CVV) never pass through the merchant’s servers, reducing the merchant’s risk and PCI-DSS scope.

  2. Payment Workflow

    • The merchant creates a “payment intent” (or similar transaction request) and receives an identifier from the SanctusPay API.

    • Using this intent identifier, the merchant redirects the customer to the HCP.

    • The customer reviews their order details and enters their card/billing information on the hosted page.

  3. Authorization & Processing

    • The HPP securely communicates with the SanctusPay backend to perform the authorization (and capture if applicable).

    • When the transaction completes—successfully or otherwise—the HCP redirects the customer back to the merchant’s website along with the transaction status.

  4. Customization

    • SanctusPay allows merchants to customize the HCP’s look and feel so it aligns with the merchant’s branding, while still ensuring best-in-class security.

  5. Reduced Complexity for Merchants

    • Because the hosted page is fully managed by the SanctusPay, merchants do not need to develop or maintain complex payment forms.

    • It also alleviates the burden of rigorous compliance checks, as the provider typically handles the bulk of security requirements.

Overall, a Hosted Checkout Page simplifies payment acceptance by offloading the most sensitive and compliance-heavy parts of payment processing to a secure third-party platform. This lets merchants focus on their core business while still offering a smooth checkout experience to customers.

Quickstart

Sign Up for a Merchant Account

  1. Register at portal.us.sanctuspay.com by providing your name and email.

  2. Confirm Your Email: Click the link in the confirmation email, then set your password.

  3. Log In: You’ll have immediate access to the test environment (sandbox).

Explore & Integrate

  1. Obtain Test Credentials: Within your Portal settings, you’ll find sandbox API keys (client ID/secret).

  2. Authenticate: Use these keys to call POST /auth/token and obtain a JWT.

  3. Create a Payment Intent: Try making a POST /intents/payment request to set up a sample payment flow.

  4. Embed Hosted Checkout: Redirect or link your users to the SanctusPay Hosted Checkout Page using the returned intent_id.

  5. Process Transactions: In test mode, confirm you can authorize, partially capture, void, or refund transactions through the relevant API calls (or Portal actions).

  6. Check the Portal: View your test transactions in the Portal to verify operations and statuses.

  1. Obtain Test Credentials: Within your Portal settings, you’ll find sandbox API keys (client ID/secret).

  2. Authenticate: Use these keys to call POST /auth/token and obtain a JWT.

  3. Create a Payment: Try making a POST /transactions request to create a new transaction.

Payment Processing

Here you’ll learn how a transaction moves through its lifecycle—from the initial authorization or auth+capture, to potential partial captures, voids, and final settlement. By combining the concepts of “Transaction” (the high-level record of payment, refund, or chargeback) with “Operations” (the actions that change its state), SanctusPay offers a transparent, step-by-step approach to managing payments at every stage.

Transaction

A Transaction is the primary record representing the movement of funds—be it a payment, refund, or chargeback. Each transaction includes essential details like a unique ID, a merchant-specific external reference ID, its type (PAYMENT, REFUND, or CHARGEBACK), and the associated amount and currency. This high-level entity serves as the core reference for all subsequent actions, providing a clear overview of the payment’s lifecycle.

Operation

An Operation is a discrete event describing a specific action taken on a transaction (such as authorization, capture, or void). Each operation references the associated transaction, includes the operation type (authorize, refund, etc.), and records relevant data like amount, currency, origin, and timestamps. Together, operations form a detailed audit trail of every step in the transaction’s lifecycle.

Relationship & Lifecycle

  • Transaction as the “Container” A Transaction identifies the overall movement of funds—whether it’s a payment, refund, or chargeback. It stores details like transaction ID, external reference, amount, and currency.

  • Operations as “Actions” Each Operation records a specific event in the transaction’s lifecycle—such as authorize, capture, void, or expire. An operation references its parent transaction, tracks the amount involved, and notes the context (origin, timestamps, etc.).

  • Chronological Progression Together, multiple operations form a timeline for a single transaction. For example, a transaction may start with authorize, transition to partial_capture, and eventually end with a settle operation. At every step, the transaction’s status updates to reflect the latest successful operation.

  • Final Status Determination The most recent operation typically dictates the transaction’s current status (e.g., AUTHORIZED, CAPTURED, VOIDED, SETTLED). By examining the sequence of operations, one can audit the transaction’s complete journey from initiation to final resolution.

Key Takeaway

By keeping Transactions and Operations separate, SanctusPay’s system provides merchants with a transparent, granular view of the payment journey—ensuring that every authorization, capture, or void can be monitored from initiation to final settlement.

SanctusPay Documentation

Welcome to the SanctusPay Developer Portal! Here, you’ll find everything you need to integrate our secure payment solutions into your applications, websites, or e-commerce platforms. Our documentation covers the entire payment lifecycle—from token-based authentication and creating payment intents, to handling settlements, refunds, and more.

Whether you’re just starting out or looking to optimize an existing integration, these docs provide clear, step-by-step guides and reference materials to help you launch quickly and confidently. We’re excited to support your business with fast, reliable, and secure payment capabilities—explore the sections below or jump right to Quickstart!

Explore our sections

Operation Concept

An Operation represents a discrete event or action taken on a Transaction. Multiple operations can accumulate on a single transaction, providing a detailed audit trail of how a transaction moved from initial authorization to capture, void, refund, and beyond. This granular record is accessible in the SanctusPay Portal’s transaction details view, giving you insight into every step of the transaction’s lifecycle.

Key Fields (Portal View)

Field
Description

ID

Unique identifier for this operation.

Operation Type

Transaction ID

Th original transaction that this operation belongs to.

Amount

The monetary amount associated with this operation (in the smallest currency unit, e.g., cents for USD).

Currency

The three-letter currency code, indicating the currency of the operation (e.g., USD, EUR).

Created At

Timestamp (UTC) indicating when the operation was performed.

Reason

(Optional) Additional information regarding why the operation occurred (e.g., reason for a void or partial capture).

Operator

(Optional) Identifies who or what initiated the operation (e.g., user in the Portal, automated process, or API call).

Note: In the SanctusPay database, operations may also track internal fields like TrxID, TrxType, Operation Origin, and more. However, these internal details are not directly exposed via any public API endpoints. Merchants can see a subset of this information when viewing transaction history in the Portal.

Operation Types

Operations reflect each significant action in the transaction lifecycle. Below are some of the common Operation Type values you might see:

  • authorize: A request to hold funds (no immediate capture).

  • authcap: An authorization combined with an immediate capture of the total amount.

  • partial_capture: Capturing only a portion of the total authorized amount.

  • capture: A full capture of all authorized funds.

  • void: Canceling the authorization before capture.

  • refund: Reversing funds back to the customer for a completed (captured) transaction.

  • expire: Automatically releasing the hold on funds after the authorization period lapses.

How to View Operations

Since the SanctusPay API does not expose an endpoint to fetch operations directly, the Portal is the primary tool for merchants to see these records. Within a transaction’s details page, you’ll find a timeline or list of all operations performed on that transaction, along with timestamps, amounts, and any relevant notes.

Why Operations Matter

  • Audit Trail: Operations document every state change, enabling thorough reviews or investigations.

  • Clarity & Debugging: If a transaction was partially captured or voided unexpectedly, the operation history explains exactly when and how it happened.

  • Lifecycle Tracking: From initial authorization to final capture, each step is logged as a separate operation, providing a chronological account of the transaction’s journey.

The specific action taken. See below.

Operation Types

About

The SanctusPay API provides merchants with a secure, reliable, and scalable way to process payments. By leveraging industry-standard JSON-based REST endpoints, merchants can integrate functionalities such as authentication, payment intent creation, card tokenization, transaction retrieval, and refunds into their own systems. This API is designed to reduce integration complexity and speed up time-to-market for online payment processing.

Key Capabilities

With the SanctusPay API, you can manage the entire lifecycle of a payment: from obtaining a new access token and generating payment intents, to finalizing transactions and handling refunds or chargebacks. Our endpoints ensure sensitive card data is transmitted and stored securely—often via tokenization and other PCI-compliant mechanisms—minimizing your liability and protecting your customers’ financial information.

Implementation Details

Integration follows a straightforward bearer token approach for authentication, requiring you to include the generated token in the Authorization header. Every endpoint in this specification details the required parameters, sample requests and responses, and potential error messages you may encounter, enabling you to build robust payment solutions with minimal friction.

For added flexibility, the SanctusPay API offers dedicated environments (test and live).

https://test.api.us.sanctuspay.com

Use this URL to access SanctusPay TEST environment

https://live.api.us.sanctuspay.com

Use this URL to access SanctusPay LIVE environment

Intents

Auth

Plugins

Transactions

Notice about PCI-DSS

The POST /transactions endpoint accepts raw card data for payment processing. Merchants using this endpoint must be PCI-DSS certified and maintain proper controls to securely handle and transmit cardholder information. If you are not PCI-DSS compliant, consider using SanctusPay Hosted Checkout Page instead.

Payment

Token

Transaction

Refunds

Cover

For Developers & Custom Integrations

About
API reference
Cover

SanctusPay Hosted Checkout Page

Hosted Checkout Page
Technical Information
Cover

Explore the Basic Concepts

Merchant Account
Payment Processing

Create a Transaction

post

Initiates a new transaction authorization (authorize) or an authorization with immediate capture (authcap). The operation type determines how the transaction will be processed.

Authorizations
Body
operationstring · enumRequired

The operation to perform. Use authorize for authorization-only, or authcap to authorize and immediately capture.

Example: authcapPossible values:
external_idstringRequired

A unique identifier (e.g., UUID) for this transaction in your system. Also used for idempotency validation. It can match the order_id or be a separate unique value.

Example: 496de72d-d4a4-45eb-b426-3d04d2078a85
Responses
200
Details of the newly created transaction.
application/json
post
POST /transactions HTTP/1.1
Host: test.api.us.sanctuspay.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 502

{
  "operation": "authcap",
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "order": {
    "order_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
    "order_amount": 10000,
    "order_currency": "USD",
    "order_items": [],
    "card_holder": {
      "first_name": "text",
      "middle_name": "text",
      "last_name": "text",
      "dob": "text",
      "email": "[email protected]",
      "phone": "text",
      "address_1": "text",
      "address_2": "text",
      "postal_code": "text",
      "city": "text",
      "state": "text",
      "country": "text"
    }
  },
  "card": {
    "pan": "text",
    "code": "012",
    "expiry": "122030",
    "name": "John Doe"
  }
}
200

Details of the newly created transaction.

{
  "id": "trx_01J5XCMDXCFXCAQ1BV8HVG6644",
  "type": "PAYMENT",
  "status": "AUTHORIZED",
  "order_amount": 10000,
  "order_currency": "USD",
  "amount_authorized": 10000,
  "amount_captured": 1,
  "amount_voided": 1,
  "amount_refunded": 1,
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "updated_at": "2024-09-05T05:05:25Z"
}

Retrieve a Transaction by Transaction ID

get

Fetch the details of a specific transaction using its unique trx_id.

Authorizations
Path parameters
trx_idstringRequired

The unique transaction ID to be retrieved.

Example: trx_01J5XCMDXCFXCAQ1BV8HVG6644
Responses
200
The details of the requested transaction.
application/json
get
GET /transactions/{trx_id} HTTP/1.1
Host: test.api.us.sanctuspay.com
Authorization: Bearer JWT
Accept: */*
200

The details of the requested transaction.

{
  "id": "trx_01J5XCMDXCFXCAQ1BV8HVG6644",
  "type": "PAYMENT",
  "status": "AUTHORIZED",
  "order_amount": 10000,
  "order_currency": "USD",
  "amount_authorized": 10000,
  "amount_captured": 1,
  "amount_voided": 1,
  "amount_refunded": 1,
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "updated_at": "2024-09-05T05:05:25Z"
}

Capture or Void a Transaction

post

Perform a capture or void operation on a previously authorized transaction. Specify an amount to partially capture or void. Full captures/voids will use the entire authorized amount.

Authorizations
Path parameters
trx_idstringRequired

The unique ID of the transaction to capture or void.

Example: trx_01J5XCMDXCFXCAQ1BV8HVG6644
Body
external_idstringRequired

A unique identifier (e.g., UUID) for referencing this operation in your system. Also used as an idempotency key for capture/void.

Example: 496de72d-d4a4-45eb-b426-3d04d2078a85
operationstring · enumRequired

The operation to perform, either capture or void.

Example: capturePossible values:
amountintegerRequired

The amount to capture or void, in the smallest currency unit (e.g., cents for USD).

Example: 5000
Responses
200
The transaction details after the capture or void operation.
application/json
post
POST /transactions/{trx_id} HTTP/1.1
Host: test.api.us.sanctuspay.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 90

{
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "operation": "capture",
  "amount": 5000
}
200

The transaction details after the capture or void operation.

{
  "id": "trx_01J5XCMDXCFXCAQ1BV8HVG6644",
  "type": "PAYMENT",
  "status": "AUTHORIZED",
  "order_amount": 10000,
  "order_currency": "USD",
  "amount_authorized": 10000,
  "amount_captured": 1,
  "amount_voided": 1,
  "amount_refunded": 1,
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "updated_at": "2024-09-05T05:05:25Z"
}

Create a Payment Transaction Intent

post

Creates a new intent for a payment authorization. An intent helps prepare and track the details required before finalizing a transaction (capture).

Authorizations
Body
external_idstringRequired

A unique identifier from your system to reference this payment intent. Useful for idempotency and for correlating the future transaction within your internal systems.

Example: 496de72d-d4a4-45eb-b426-3d04d2078a85
Responses
200
New payment intent created.
application/json
post
POST /intents/payment HTTP/1.1
Host: test.api.us.sanctuspay.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 563

{
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "redirect_urls": {
    "success": "https://www.example.com/success?trx_id=XYZ&order_id=ZYX",
    "failure": "https://www.example.com/failure?trx_id=XYZ&order_id=ZYX"
  },
  "order": {
    "order_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
    "order_amount": 10000,
    "order_currency": "USD",
    "order_items": [],
    "card_holder": {
      "first_name": "text",
      "middle_name": "text",
      "last_name": "text",
      "dob": "text",
      "email": "[email protected]",
      "phone": "text",
      "address_1": "text",
      "address_2": "text",
      "postal_code": "text",
      "city": "text",
      "state": "text",
      "country": "text"
    }
  }
}
200

New payment intent created.

{
  "intent_id": "int_01J5XCMDXCFXCAQ1BV8HVG6644",
  "reference_id": "496de72d-d4a4-45eb-b426-3d04d2078a85"
}

Obtain a New Authentication Token

post

Use this endpoint to generate a new JWT (JSON Web Token) by providing valid client credentials (client_id and client_secret). The returned token must be included in the Authorization header as Bearer <token> for subsequent calls to authenticate and authorize access to the SanctusPay API.

Body
client_idstringRequired

Your unique client_id assigned by SanctusPay.

client_secretstringRequired

Your unique client_secret associated with your client_id.

Responses
200
A successfully generated access token.
application/json
post
POST /auth/token HTTP/1.1
Host: test.api.us.sanctuspay.com
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "client_id": "text",
  "client_secret": "text"
}
200

A successfully generated access token.

{
  "access_token": "text",
  "expiry": 1
}

Get Transaction Details by Either order_id or external_id

get

Retrieves the details of a specific transaction by using either the external_id or the order_id. You must indicate which identifier type you are passing.

Authorizations
Query parameters
typeundefined · enumRequired

Indicates whether the provided id is the external_id or the order_id.

Possible values:
idstringRequired

The value of the external_id or the order_id being used.

Responses
200
The requested transaction details.
application/json
get
GET /transaction HTTP/1.1
Host: test.api.us.sanctuspay.com
Authorization: Bearer JWT
Accept: */*
200

The requested transaction details.

{
  "id": "trx_01J5XCMDXCFXCAQ1BV8HVG6644",
  "type": "PAYMENT",
  "status": "AUTHORIZED",
  "order_amount": 10000,
  "order_currency": "USD",
  "amount_authorized": 10000,
  "amount_captured": 1,
  "amount_voided": 1,
  "amount_refunded": 1,
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "updated_at": "2024-09-05T05:05:25Z"
}

Refund a Transaction

post

Initiates a refund for an already captured or settled transaction. Each refund is treated as a new transaction of type REFUND. Use GET /transactions to retrieve its details.

Authorizations
Body
external_idstringRequired

A unique identifier (e.g., UUID) for this refund in your system. Used for idempotency checks and correlating the refund internally.

Example: 496de72d-d4a4-45eb-b426-3d04d2078a85
trx_idstringRequired

The unique ID of the original PAYMENT transaction that you want to refund.

Example: trx_01J5XCMDXCFXCAQ1BV8HVG6644
amountintegerRequired

The amount to refund, in the smallest currency unit (e.g., cents for USD).

Example: 5000
Responses
200
Details of the new refund transaction.
application/json
post
POST /refunds HTTP/1.1
Host: test.api.us.sanctuspay.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 110

{
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "trx_id": "trx_01J5XCMDXCFXCAQ1BV8HVG6644",
  "amount": 5000
}
200

Details of the new refund transaction.

{
  "id": "trx_01J5XCMDXCFXCAQ1BV8HVG6644",
  "type": "PAYMENT",
  "status": "AUTHORIZED",
  "order_amount": 10000,
  "order_currency": "USD",
  "amount_authorized": 10000,
  "amount_captured": 1,
  "amount_voided": 1,
  "amount_refunded": 1,
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "updated_at": "2024-09-05T05:05:25Z"
}

Woocommerce

Registration

Registration is the first step to accessing SanctusPay’s platform. By creating an account, you gain instant access to our test environment and can start experimenting with our APIs right away.

1

Visit SanctusPay Portal

Click Create Account to begin.

2

Enter Name and Email

Provide your basic details and submit.

3

Confirm Your Email

Check your inbox for a confirmation link and click it. Also remember to check your spam folder

4

Set Your Password

After confirming your email, you’ll be prompted to choose a secure password.

5

Automatic Login

You’re now logged in and can explore SanctusPay’s Portal and access your test environment credentials immediately. You will also be able to start your Merchant Application.

API reference

Card

SanctusPay HCP

SanctusPay Hosted Checkout Page (HCP) offers robust customization capabilities designed to create an optimal and branded shopping experience for your customers. Merchants have the flexibility to adapt the visual elements of the HCP, ensuring that the checkout process aligns seamlessly with their overall brand identity.

You can customize the checkout page by modifying the colors, fonts, and layout to mirror your brand's aesthetic. Additionally, it is possible to personalize the experience further by uploading your logo, embedding specific company information, and incorporating support contact details, thereby reassuring customers that help is accessible if needed. The HCP also presents detailed information about the user's current order, such as item descriptions, prices, and quantities, which promotes transparency and strengthens trust. This ability to provide a cohesive and informative checkout experience not only enhances the customer's journey but also potentially increases conversion rates by reducing cart abandonment.

Configuring the SanctusPay HCP

To configure the SanctusPay Hosted Checkout Page (HCP), users must first log into the SanctusPay Portal. Within the portal, they can access a dedicated section for customizing their HCP settings. Here, users have the option to add or modify various elements, such as adjusting the color scheme, selecting suitable fonts, and rearranging the layout to match their brand's design. They can also upload their company logo and input essential support contact details. By making these adjustments, merchants ensure that the checkout process reflects their brand identity, providing a seamless and reassuring experience for their customers.

Merchant Account

A merchant account in the SanctusPay Portal is created by registering at and completing the merchant application. While your application is under review, you can still access our test environment to explore the APIs and begin integrating. Once approved, your merchant account will be fully enabled for live payment processing.

SanctusPay Portal

Create a Card Tokenization Intent

post

Creates a new intent for card tokenization. This process securely collects card details that can later be used for transactions without needing to store raw card data on your systems.

Authorizations
Body
external_idstringRequired

A unique identifier (e.g., UUID) from the merchant side to reference this tokenization request. This helps correlate the newly generated card token with a specific user or account in your system.

Example: 496de72d-d4a4-45eb-b426-3d04d2078a85
Responses
200
New card tokenization intent created.
application/json
post
POST /intents/card HTTP/1.1
Host: test.api.us.sanctuspay.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85"
}
200

New card tokenization intent created.

{
  "intent_id": "int_01J5XCMDXCFXCAQ1BV8HVG6644",
  "reference_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "valid_for": 60000
}

Activation

When your application is approved, your merchant account moves from test mode to live mode. This unlocks the ability to process real transactions and access production API credentials.

1

Await Approval Notification

Our team reviews your application and notifies you upon successful approval.

2

Access Live Environment

Log in to the portal again to see your account now enabled for live processing.

3

Retrieve Live API Secrets

Go to your api/developer section in Portal to view and securely access your production API credentials.

4

Start Processing Real Payments

Integrate these credentials into your application or website to process live transactions with SanctusPay.

You can also integrate with SanctusPay using our Hosted Checkout Page or one of our prebuilt plugins for many of the best ecommerce platforms.

To access emcommer plugins, please visit the api/developer section in Portal

Application

Filling out the merchant application is required to enable live payment processing on SanctusPay. We gather essential business and compliance information to verify your account and help maintain a secure ecosystem.

1

Navigate to the Application Section

Once registered, log in and head to the Account/Application page in the portal.

2

Provide Business Details

Enter information about your company, including its legal name, address, and contact information.

3

Attach Required Documentation

Upload any proof of address or other documents requested for verification and compliance purposes.

4

Submit for Review

After completing all fields, submit your application. You will receive an update (both on our Portal as well as email) once our team has reviewed your information.

Technical Information

The SanctusPay process involves the merchant creating a payment intent with the API, directing the user to the HCP for secure card entry. The HCP confirms payment with the API and redirects the user back to the merchant with the transaction result.

Access HCP & Live and Test environments

SanctusPay's Hosted Checkout Page (HCP) operates in two distinct environments: Live and Test. The Live environment is used for processing real transactions with actual payment details, ensuring that all interactions are secure and reliable. On the other hand, the Test environment is designed for development and troubleshooting, allowing merchants to simulate transactions without incurring actual charges. This separation ensures that developers can verify their integration and functionality without jeopardizing real customer data or financial information.

Environments

https://test.checkout.us.sanctuspay.com?client_id={acc_id}&intent_id={int_id}

https://live.checkout.us.sanctuspay.com?client_id={acc_id}&intent_id={int_id}

HCP URL Variables

To access the Hosted Checkout Page (HCP) URL, it is essential to supply two specific GET parameters: client_id and intent_id.

The client_id represents the unique identifier assigned to the merchant's account, ensuring that the transaction is linked to the correct merchant. You can get this information in your api/developer section in Portal. It's also referred as "Account ID".

Meanwhile, the intent_id is the unique identifier for the payment intent, allowing the system to retrieve the correct transaction details. Utilizing these parameters correctly in the URL ensures that the SanctusPay HCP can open successfully and process the payment securely and efficiently for the intended user and transaction.

HCP Sequence Flow

Step-by-Step Explanation

  1. Merchant Website → SanctusPay API: The merchant’s backend sends a POST /intents/payment request to create a new payment intent. This request typically includes information such as the merchant’s external_id, order details, and redirect URLs.

  2. SanctusPay API → Merchant Website: The SanctusPay API responds with a JSON payload that includes an intent_id. This unique identifier references the newly created payment intent.

  3. Merchant Website → User: With the intent_id in hand, the merchant constructs and provides the Hosted Checkout Page URL to the user. This might involve redirecting the user’s browser or displaying a link/button that includes the intent_id and the merchant account_id (also known as client_id).

  4. User → Hosted Checkout Page: The user clicks on the provided link (or is automatically redirected) to the SanctusPay Hosted Checkout Page (HCP). The HCP page is responsible for securely collecting the user’s card and billing information.

  5. Hosted Checkout Page → SanctusPay API: Once the user inputs their card details and confirms payment, the HPP sends the card data and confirmation to the SanctusPay API. This step initiates the actual payment authorization process.

  6. SanctusPay API → Hosted Checkout Page: The SanctusPay API processes the request (e.g., checks the card, contacts the payment network, etc.) and returns the authorization result to the HPP. The result can be a success (authorized) or failure (declined or error).

  7. Hosted Checkout Page → Merchant Website: Finally, the Hosted Checkout Page redirects the user back to the merchant-specified success or failure URL. This redirect typically includes parameters indicating the status of the transaction, and possibly the intent_id or a transaction reference.

Transaction Concept

A Transaction represents the primary record of money movement in SanctusPay’s payment platform. It indicates whether a particular flow of funds is a payment, a refund, or a chargeback, and contains the essential data needed to track, audit, and manage the lifecycle of that financial event.

Field Descriptions

Field
Type
Description

id

string

The unique identifier for the transaction (e.g., trx_01J5XCMDXCFXCAQ1BV8HVG6644). Use this value to retrieve, update, or reference the transaction in subsequent API calls.

type

string

status

string

order_amount

integer

The total order amount in the smallest currency unit (e.g., cents for USD). For example, $100.00 would be 10000.

order_currency

string

The three-letter ISO currency code (e.g., USD, EUR) representing the transaction’s currency.

amount_authorized

integer

The total authorized amount (in the smallest currency unit). This reflects how much was initially authorized—even if only part of it is ultimately captured.

amount_captured

integer

The cumulative sum of all captures that have been applied to this transaction. If partial captures occur, this value will increment until it reaches the total authorized amount.

amount_voided

integer

The total amount voided from the initial authorization. Voids typically occur before funds are captured, effectively canceling part or all of the authorization.

amount_refunded

integer

The total amount refunded back to the customer after funds are captured. For REFUND transactions, this value should match the order_amount if it’s a full refund.

external_id

string

A merchant-supplied reference (e.g., an order ID or UUID) that links this transaction to your internal systems.

updated_at

string

An ISO 8601–formatted timestamp (UTC) indicating when the transaction was last updated. For example, 2024-09-05T05:05:25Z.

Transaction Types

  • PAYMENT: Standard transaction flow where a customer pays the merchant. Typically begins with authorization, followed by capture (partial or full).

  • REFUND: The returning of funds to a customer for a previously captured payment. This transaction references the original payment and tracks the refunded amount.

  • CHARGEBACK: Initiated by the cardholder’s bank due to a dispute or fraudulent activity. Funds previously captured may be reversed, pending further investigation or resolution.

Transaction Statuses

  • AUTHORIZED: The transaction has been authorized. Funds are held but not captured. The hold is kept until you capture, void or it expires automatically.

  • DECLINED: The authorization was rejected due to insufficient funds, fraud checks, or other reasons. The actual reason will be shown in the Operation.

  • VOIDED: The authorization was canceled before funds were captured. No money moves in a void and the cardholder gets the authorized amount available immediately.

  • PARTIAL_CAPTURED: Only a portion of the authorized amount was captured so far.

  • CAPTURED: The entire authorized amount is captured. The money has left the cardholder's account and will be transferred to the Merchant.

  • EXPIRED: The authorization window elapsed without capture or void, automatically releasing the hold on funds.

The high-level category of transaction. See below.

Indicates the current state of the transaction in its lifecycle. See below.

Transaction Types
Transaction Status
SanctusPay Hosted Checkout Page