Skip to main content
This page is part of the Payments Library Guides. Prefer direct API calls instead? See REST API Guides.

Engine Constructor

UI Options

Control how the CardPay card-entry form is displayed. Other providers are not affected.
displayMode applies to the CardPay form only. Apple Pay, Google Pay, PayPal, BankPay, and UPI continue to use their standard flows.

Localization

The library supports 20 languages. Pass a language code to the constructor:

Supported Languages

checkAvailability()

Returns the list of payment methods available on the current device and browser:
Use this to filter which buttons to display. For example, Apple Pay is only available on Safari/iOS, and Google Pay only on Chrome/Android.

payBy() Method

Each button is an object with name and domEntitySelector:

Button Styling

Customize button appearance with ButtonProperties:

Parsing Results

Use parseResultToken() to decode the result token into structured data:
The method returns a tuple:
  • data - The parsed result object containing payment details
  • success - Boolean indicating if the token was successfully decoded (not whether the payment succeeded)
To determine if a payment succeeded, check data.clientSuccess:

getSessionType()

Returns the operation type for this session:

getSelectedProviderName()

Returns which payment method the customer used:

Result Data Structure

directChargeResults.data is intentionally untyped. Its contents are provider-specific (PayPal, BankPay, UPI each return different fields) and may change as those providers update their APIs. Use success and message to determine the payment outcome - do not build logic that depends on the contents of data.

Address Collection

Request billing and/or shipping addresses from the payment method (supported by Google Pay, Apple Pay, PayPal).

Configuration

Address Levels

Retrieving Addresses

After payment completes, retrieve the collected addresses:

Operations

The session operation (set when creating the session) determines what the library does:
Tokenization is only available for CardPay, ApplePay, and GooglePay. PayPal, BankPay, and UPI support charge only.

Payment Method Requirements

CardPay, ApplePay, GooglePay

Requires a payment processor (PSP) configured in your Orchestra account. Pass paymentGatewayAccountId when creating the session. Orchestra supports payment gateways.

ApplePay, GooglePay

In addition to PSP credentials, these require:
  • Merchant registration with Apple/Google
  • Domain verification
  • A PSP that supports 3DS
See ApplePay Setup and GooglePay Setup for details.

PayPal

Requires PayPal merchant credentials configured in the Orchestra Portal. See PayPal Setup for details.

BankPay

Requires an Open Banking or ACH provider account configured in the Orchestra Portal. Contact our team to confirm regional support.

UPI

Requires a UPI provider account configured in the Orchestra Portal. Only available for INR transactions in India.

Library Setup

Quick start guide

Supported Payment Methods

All payment methods

Result Handling

Parse payment results

Payments Library API

Backend endpoint reference