Skip to main content

Overview

PayGlocal offers three standalone API services for merchants who need fine-grained control over the payment lifecycle:
ServicePurpose
AuthorizationRequest a payment authorization from the issuer
CaptureCapture an authorized payment to trigger settlement
ReversalReverse (void) an authorized payment before capture
These APIs are available only when your MID is configured for authentication-only processing through the GPI service. In this model, GPI handles 3DS authentication, and you manage authorization and capture separately. Contact PayGlocal merchant support to configure this on your account.

Authorization

Request a standalone authorization through PayGlocal after completing 3DS authentication via GPI.

Endpoint

POST /gl/v1/payments/auth

Request

For countries requiring authentication before authorization, include the authenticationData block with the ECI and CAVV values received from the authentication process.
{
  "paymentData": {
    "totalAmount": "100",
    "txnCurrency": "INR",
    "cardData": {
      "number": "4242424242424242",
      "expiryMonth": "05",
      "expiryYear": "2026",
      "securityCode": "173"
    },
    "authenticationData": {
      "eci": "5",
      "cavv": "<cavv-from-authentication>"
    }
  },
  "billingData": {
    "firstName": "TestFirstName",
    "lastName": "TestLastName",
    "addressStreet1": "Test123 Avenue",
    "addressStreet2": "nytest",
    "addressCity": "Test City",
    "addressState": "New York",
    "addressStateCode": "NY",
    "addressPostalCode": "98109",
    "addressCountry": "US",
    "emailId": "example@gmail.com"
  }
}

Response

{
  "gid": "gl-13bbd3c4-9817-4786-96c6-12fa6191f118",
  "status": "AUTHORIZED",
  "message": "Authorization Successful",
  "timestamp": "2021-04-12T07:47:18Z"
}
Store the GID — you will use it in the Capture or Reversal request.

Capture

Capture a previously authorized payment to trigger settlement. You must capture within the authorization window allowed by the card network (typically 7 days).

Endpoint

POST /gl/v1/payments/{gid}/capture
{gid} = the GID returned in the Authorization response.

Request

{
  "merchantTxnId": "23AEE8CB6B62EE2AF07",
  "paymentData": {
    "totalAmount": "100.00"
  },
  "captureType": "F"
}

Request Fields

FieldTypeRequiredDescription
merchantTxnIdStringYesYour unique reference for this capture
paymentData.totalAmountStringYesAmount to capture
captureTypeStringYesF = Full capture, P = Partial capture

Reversal (Auth Reversal)

Reverse an authorized payment that has not yet been captured. Only full reversals are supported.

Endpoint

POST /gl/v1/payments/{gid}/auth-reversal
{gid} = the GID returned in the Authorization response.

Request

{
  "merchantTxnId": "23AEE8CB6B62EE2AF07"
}

When to Use Each Service

GPI Service (Auth Only mode)

       ├──▶ Authorization API ──▶ AUTHORIZED
       │                               │
       │                    ┌──────────┴──────────┐
       │                    ▼                     ▼
       │             Capture API           Reversal API
       │          (ship goods)         (cancel the order)
       │                    │
       │                    ▼
       │           SENT_FOR_CAPTURE
       │              (settled)
ScenarioUse
Customer completes payment, you are ready to shipCapture
Order cancelled after authorization but before shipmentReversal
Already captured and customer requests refundRefund Service

GPI Service

Required prerequisite — handles 3DS and auth-only mode configuration.

Get Status

Poll transaction status after authorization or capture.

Refund Service

Issue refunds on already-captured transactions.