---
title: Integration Steps
slug: hosted-checkout/integration-steps
excerpt: >-
  Step-by-step guide to integrate Pine Labs Hosted Checkout using the Generate
  Checkout Link API. Authenticate, create a checkout link, redirect customers,
  handle callbacks, and verify payments.
hidden: false
sidebar_order: 2
metadata:
  title: Integration Steps hosted checkout – Pine Labs Payment Gateway
  description: >-
    Step-by-step guide to integrate Pine Labs Hosted Checkout using the Generate
    Checkout Link API. Authenticate, create a checkout link, redirect customers,
    handle callbacks, and verify payments.
  robots: index
sidebar_label: Hosted checkout Integration Steps
---
Follow the below steps to integrate with Pine Labs Hosted checkout APIs in your application.
1. [[Prerequisite\] Generate Token](#generate-token)
2. [Generate Checkout Link](#generate-checkout-link)
3. [Launch Checkout](#launch-checkout)
4. [Handle Callback](#handle-callback)

> 📘 Note
>
> - Ensure you store your Client ID and Secret in your Backend securely.
> - Integrate our APIs on your backend system.
> - We strictly recommend not to call our APIs from the frontend.
> - Failure to adhere to the above guidelines may result in legal implications. In such cases, you will be held responsible for any damage or loss arising from non-compliance.


<h2 id="generate-token">1. [Prerequisite] Generate Token</h2>

Integrate our Generate Token API in your backend servers to generate the access token. Use the token generated to authenticate Pine Labs APIs.

Below are the sample requests and response for the Generate Token API.

```curl cURL – UAT
curl --request POST \
--url https://pluraluat.v2.pinepg.in/api/auth/v1/token \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \
--header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
--data '
{
  "client_id": "a17ce30e-f88e-4f81-ada1-c3b4909ed232",
  "client_secret": "fgwei7egyhuggwp39w8rh",
  "grant_type": "client_credentials"
}
'
```
```curl cURL – PROD
curl --request POST \
--url https://api.pluralpay.in/api/auth/v1/token \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \
--header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
--data '
{
  "client_id": "a17ce30e-f88e-4f81-ada1-c3b4909ed232",
  "client_secret": "fgwei7egyhuggwp39w8rh",
  "grant_type": "client_credentials"
}
'
```
```json Sample Response
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  "expires_in": 3600
}
```


Refer to our [Generate Token API](/api/authentication/generate-token) documentation to learn more.

---

<h2 id="generate-checkout-link">2. Generate Checkout Link</h2>

To generate a Pine Labs Hosted checkout link, use our Generate Checkout Link API. Include the access token in the request headers for Bearer Authentication.

Below are the sample requests and response for a Generate Checkout Link API.

```curl cURL - UAT
curl --request POST \
--url https://pluraluat.v2.pinepg.in/api/checkout/v1/orders \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' \
--header 'Content-Type: application/json' \
--header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
--header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \
--header 'accept: application/json' \
--data '
{
  "merchant_order_reference": "112345",
  "order_amount": {
    "value": 1100,
    "currency": "INR"
  },
  "integration_mode": "REDIRECT",
  "pre_auth": false,
  "allowed_payment_methods": [
    "CARD",
    "UPI",
    "NETBANKING",
    "POINTS",
    "WALLET"
  ],
  "notes": "order1",
  "callback_url": "https://sample-callback-url",
  "failure_callback_url": "https://sample-failure-callback-url",
  "purchase_details": {
    "customer": {
      "email_id": "kevin.bob@example.com",
      "first_name": "Kevin",
      "last_name": "Bob",
      "customer_id": "123456",
      "mobile_number": "9876543210",
      "country_code": "91",
      "billing_address": {
        "address1": "10 Downing Street Westminster London",
        "address2": "Oxford Street Westminster London",
        "address3": "Baker Street Westminster London",
        "pincode": "51524036",
        "city": "Westminster",
        "state": "Westminster",
        "country": "London",
        "full_name": "Kevin Bob",
        "adddress_type": "Home",
        "address_category": "billing"
      },
      "shipping_address": {
        "address1": "10 Downing Street Westminster London",
        "address2": "Oxford Street Westminster London",
        "address3": "Baker Street Westminster London",
        "pincode": "51524036",
        "city": "Westminster",
        "state": "Westminster",
        "country": "London",
        "full_name": "Kevin Bob",
        "adddress_type": "Home",
        "address_category": "shipping"
      }
    },
    "merchant_metadata": {
      "express_checkout_enabled": "TRUE",
      "express_checkout_allowed_action": "checkoutCollectAddress",
      "key1": "DD",
      "key2": "XOF"
    },
    "cart_details": {
      "cart_items": [
        {
          "item_id": "cart_id_1",
          "item_name": "T Shirt",
          "item_description": "Test Description",
          "item_details_url": "https://chriscross.in/cdn/shop/files/95_800x.jpg",
          "item_image_url": "https://chriscross.in/cdn/shop/files/95_800x.jpg",
          "item_original_unit_price": 1,
          "item_discounted_unit_price": 1,
          "item_quantity": 1,
          "item_currency": "INR"
        }
      ]
    }
  }
}
'
```
```curl cURL - PROD
curl --request POST \
--url https://api.pluralpay.in/api/checkout/v1/orders \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' \
--header 'Content-Type: application/json' \
--header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
--header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \
--header 'accept: application/json' \
--data '
{
  "merchant_order_reference": 112345171,
  "order_amount": {
    "value": 500,
    "currency": "INR"
  },
  "pre_auth": false,
  "allowed_payment_methods": [
    "CARD",
    "UPI",
    "NETBANKING",
    "POINTS",
    "WALLET"
  ],
  "notes": "order1",
  "callback_url": "https://sample-callback-url",
  "failure_callback_url": "https://sample-failure-callback-url",
  "purchase_details": {
    "customer": {
      "email_id": "kevin.bob@example.com",
      "first_name": "Kevin",
      "last_name": "Bob",
      "customer_id": "192212",
      "mobile_number": "9876543210",
			"country_code": "91",
      "billing_address": {
        "address1": "H.No 15, Sector 17",
        "address2": "",
        "address3": "",
        "pincode": "61232112",
        "city": "CHANDIGARH",
        "state": "PUNJAB",
        "country": "INDIA",
        "full_name": "harsh kumar",
        "address_type": "HOME/WORK/OTHER",
        "address_category": "BILLING"
      },
      "shipping_address": {
        "address1": "H.No 15, Sector 17",
        "address2": "",
        "address3": "",
        "pincode": "144001123",
        "city": "CHANDIGARH",
        "state": "PUNJAB",
        "country": "INDIA",
        "full_name": "harsh kumar",
        "address_type": "HOME/WORK/OTHER",
        "address_category": "BILLING"
      }
    },
    "merchant_metadata": {
      "key1": "DD",
      "key2": "XOF",
      "express_checkout_enabled": "TRUE",
      "express_checkout_allowed_action": "checkoutCollectAddress"
    }
  },
  "cart_details": {
    "cart_items": [
      {
        "item_id": "cart_id_1",
        "item_name": "T Shirt",
        "item_description": "Test Description",
        "item_details_url": "https://chriscross.in/cdn/shop/files/95_800x.jpg",
        "item_image_url": "https://chriscross.in/cdn/shop/files/95_800x.jpg",
        "item_original_unit_price": 1,
        "item_discounted_unit_price": 1,
        "item_quantity": 1,
        "item_currency": "INR"
      }
    ]
  }
}
'
```
```json Sample Response
{
  "token": "<<Redirect Token>>",
  "order_id": "<<Order ID>>",
  "redirect_url": "https://api.pluralonline.com/api/v3/checkout-bff/redirect/checkout?token=<<Redirect Token>>",
  "response_code": 200,
  "response_message": "Order Creation Successful."
}
```

> 📘 Note:
>
> - You can set `pre-auth` as true to use pre-authorization flow for card payments only through hosted checkout.

Refer to our [Generate Checkout Link API](/api/checkout/generate-checkout-link) documentation to learn more.

<h2 id="launch-checkout">3. Launch Checkout</h2>

After successfully generating the checkout link, launch the checkout using the `redirect_url`. This can be done as listed below.

In the response to the Generate Checkout Link API, a `redirect_url` is returned. Use this URL to redirect your customers to the Pine Labs - Hosted checkout page to accept payment.

After successfully completing the payment to know the status of the payment we sent the response to the callback\_url.

<h2 id="handle-callback">4. Handle Callback</h2>

On a successful and failed payment we return the following fields to the return url.

### 4.1. Store Payment Details on Your Server

- We recommend you to store the payment details on your server.
- You must validate the authenticity of the payment details returned. You can authenticate by verifying the signature.

```json Success Callback Response
{
  "order_id": "v1-4405071524-aa-qlAtAf",
  "status": "PROCESSED",
  "signature": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
}
```
```json Failure Callbak Response
{
  "order_id": "v1-4405071524-aa-qlAtAf",
  "status": "AUTHORIZED",
  "error_code": "USER_AUTHENTICATION_REQUIRED",
  "error_message": "Consumer Authentication Required",
  "signature": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
}
```

### 4.2. Verify Payment Signature

Ensure you follow this as a mandatory step to verify the authenticity of the details returned to the checkout form for successful payments.

Follow the below steps to verify the signature.

1. Create a signature on your server using the following parameters using the SHA256 algorithm.
   1. `order_id`: Unique Identifier generated for an order request on Pine Labs database.
   2. `payment_status`: Payment status.
   3. `error_code`: Short code for the error returned.
   4. `error_message`: Corresponding error message for the code.
   5. `secret_key`: The Onboarding team has provided you with this information as part of the onboarding process.

Use the below sample code to construct HashMap signature using the SHA256 algorithm.

```java Java
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
 
public class hash {
    public static void main(String[] args) {
        // Test the GenerateHash method
        String input = "<string>";
        String secretKey = "<secret_key>";  // Example key in hex
 
        String hash = GenerateHash(input, secretKey);
        System.out.println("Generated Hash: " + hash);
    }
    public static String GenerateHash(String input, String strSecretKey) {
        String strHash = "";
        try {
            if (!isValidString(input) || !isValidString(strSecretKey)) {
                return strHash;
            }
            byte[] convertedHashKey = new byte[strSecretKey.length() / 2];
 
            for (int i = 0; i < strSecretKey.length() / 2; i++) {
                convertedHashKey[i] =
                        (byte)Integer.parseInt(strSecretKey.substring(i * 2, (i*2)+2),16); //hexNumber radix
            }
            strHash = hmacDigest(input.toString(), convertedHashKey,
                    "HmacSHA256");
        } catch (Exception ex) {
            strHash = "";
        }
        return strHash.toUpperCase();
    }
    private static String hmacDigest(String msg, byte[] keyString, String algo) {
        String digest = null;
        try {
            SecretKeySpec key = new SecretKeySpec(keyString, algo);
            Mac mac = Mac.getInstance(algo);
            mac.init(key);
            byte[] bytes = mac.doFinal(msg.getBytes("UTF-8"));
            StringBuffer hash = new StringBuffer();
            for (int i = 0; i < bytes.length; i++) {
                String hex = Integer.toHexString(0xFF & bytes[i]);
                if (hex.length() == 1) {
                    hash.append('0');
                }
                hash.append(hex);
            }
            digest = hash.toString();
        } catch (UnsupportedEncodingException e) {
// logger.error("Exception occured in hashing the pine payment gateway request"+e);
        } catch (InvalidKeyException e) {
// logger.error("Exception occured in hashing the pine payment gateway request"+e);
        } catch (NoSuchAlgorithmException e) {
// logger.error("Exception occured in hashing the pine payment gateway request"+e);
        }
        return digest;
    }
    public static boolean isValidString(String str){
        if(str != null && !"".equals(str.trim())){
            return true;
        }
        return false;
    }
}
```

> 📘 Note:
>
> To create a request string, format the key-value pairs of data returned to the return URL. The pairs are separated by `&` and arranged in ascending order based on a lexicographical comparison of the keys.

Shown below is a example to create a request string.

```text Success
"key1=value1&key2=value2", ["order_id=random_order_id&status=PROCESSED"]
```
```text Failed
"key1=value1&key2=value2&key3=value3&key4=value4", ["error_code=USER_AUTHENTICATION_FAILED&error_message=Consumer Authentication required&order_id=<order_id>&status=FAILED"]
```

2. If the signature generated on your server matches the Pine Labs signature returned in the return URL, it confirms that the payment details are from Pine Labs.
3. Capture the status returned on your database. Once the payment status is `AUTHORIZED` you can either capture or cancel an order.

## Manage Transactions

Track and verify transaction status using Pine Labs APIs. To retrieve the latest status, use the Fetch APIs or subscribe to webhooks for real-time transaction updates.


<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;max-width:1200px;margin:0 auto;">
  <div style="border:1px solid #e2e8f0;border-radius:10px;padding:1.25rem;">
    <h4 style="font-size:0.95rem;font-weight:650;margin-bottom:0.5rem;">Get Order by Order ID</h4>
    <p style="font-size:0.82rem;color:#64748b;">Fetch real-time transaction status by order ID.</p>
    <a href="https://plcorp.uat.pinelabs.com/doc/online-payments/api/orders/get-order-by-id" style="font-size:0.8rem;font-weight:600;color:#0f766e;text-decoration:none;">View Docs →</a>
  </div>
  <div style="border:1px solid #e2e8f0;border-radius:10px;padding:1.25rem;">
    <h4 style="font-size:0.95rem;font-weight:650;margin-bottom:0.5rem;">Webhooks</h4>
    <p style="font-size:0.82rem;color:#64748b;">Configure webhook events for automatic transaction updates.</p>
    <a href="https://plcorp.uat.pinelabs.com/doc/online-payments/developer-tools/webhooks" style="font-size:0.8rem;font-weight:600;color:#0f766e;text-decoration:none;">View Docs →</a>
  </div>
  <div style="border:1px solid #e2e8f0;border-radius:10px;padding:1.25rem;">
    <h4 style="font-size:0.95rem;font-weight:650;margin-bottom:0.5rem;">Refunds</h4>
    <p style="font-size:0.82rem;color:#64748b;">Automatically process customer refunds whenever required.</p>
    <a href="https://plcorp.uat.pinelabs.com/doc/online-payments/api/refunds/create-refund" style="font-size:0.8rem;font-weight:600;color:#0f766e;text-decoration:none;">View Docs →</a>
  </div>
</div>

## Pre Authorization Flow

Our Orders API includes an optional **pre-authorization** feature. When pre-authorization is enabled (`pre_auth` = true), you can **Capture a Payment** for an order after successful delivery, ensuring that settlement remains on hold until then.

> 📘 Note:
>
> **For&#x20;**`pre_auth`**&#x20;true**
>
> - On successful payment we send the webhook event `ORDER_AUTHORIZED` and the status of the payment is updated to `AUTHORIZED`.
> - You can capture or cancel an order only when the order status is `AUTHORIZED`.
>
> **For&#x20;**`pre_auth`**&#x20;false**
>
> - On successful payment we send the webhook event `ORDER_PROCESSED` and the status of the payment is updated to `PROCESSED`

Once pre-authorization is enabled and the payment is successfully authorized, you have the following options:

**Capture Order**: Utilize the Pine Labs Online capture order API in your backend to capture the payment against an order.

**Cancel Order**: Use the Pine Labs Online cancel order API in your backend to cancel the payment against an order.

### 1. Capture Order

Use this API to capture the payment against an order. On successful capture of an order the order status is updated as `processed`.

Shown below are the sample requests and sample response for a Capture Order API.

```curl cURL - UAT
curl --request PUT \
     --url https://pluraluat.v2.pinepg.in/api/pay/v1/orders/order_id/capture \
     --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' \
     --header 'Content-Type: application/json' \
     --header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
     --header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \
     --header 'accept: application/json' \
     --data '
{
  "merchant_capture_reference": "merchant-capture-ref-r4y",
  "capture_amount": {
    "value": 4000,
    "currency": "INR"
  }
}
'
```
```curl cURL - PROD
curl --request PUT \
     --url https://api.pluralpay.in/api/pay/v1/orders/order_id/capture \
     --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' \
     --header 'Content-Type: application/json' \
     --header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
     --header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \
     --header 'accept: application/json' \
     --data '
{
  "merchant_capture_reference": "merchant-capture-ref-r4y",
  "capture_amount": {
    "value": 4000,
    "currency": "INR"
  }
}
'
```
```json Sample Response
{
  "data":{
    "order_id":"v1-5757575757-aa-hU1rUd",
    "merchant_order_reference":"f4548bbf-a029-43d3-9209-e3385c80b1e9",
    "type":"CHARGE",
    "status":"PROCESSED",
    "merchant_id":"123456",
    "order_amount":{
      "value":1100,
      "currency":"INR"
    },
    "pre_auth":true,
    "callback_url":"https://sample-callback-url",
    "failure_callback_url": "https://sample-failure-callback-url",
    "allowed_payment_methods":[
      "CARD",
      "UPI",
      "NETBANKING",
      "POINTS",
      "WALLET",
			"CREDIT_EMI"
    ],
    "notes":"order1",
    "purchase_details":{
      "customer":{
        "email_id":"kevin.bob@example.com",
        "first_name":"Kevin",
        "last_name":"Bob",
        "customer_id":"232323",
        "mobile_number":"9876543210",
			  "country_code": "91",
        "billing_address": {
        "address1": "10 Downing Street Westminster London",
        "address2": "Oxford Street Westminster London",
        "address3": "Baker Street Westminster London",
        "pincode": "51524036",
        "city": "Westminster",
        "state": "Westminster",
        "country": "London",,
        "full_name": "Kevin Bob",
        "adddress_type": "Home",
        "address_category": "billing"
      },
      "shipping_address": {
        "address1": "10 Downing Street Westminster London",
        "address2": "Oxford Street Westminster London",
        "address3": "Baker Street Westminster London",
        "pincode": "51524036",
        "city": "Westminster",
        "state": "Westminster",
        "country": "London",,
        "full_name": "Kevin Bob",
        "adddress_type": "Home",
        "address_category": "shipping"
      }
      },
      "merchant_metadata":{
        "key1":"DD",
        "key2":"XOF"
      }
    },
    "payments":[
      {
        "id":"v1-1111071924-aa-zzSkOA-cc-G",
        "status":"PROCESSED",
        "payment_amount":{
          "value":1100,
          "currency":"INR"
        },
        "payment_method":"CARD",
        "payment_option":{
          "card_data":{
            "card_type":"CREDIT",
            "network_name":"VISA",
            "issuer_name":"NONE",
            "card_category":"CONSUMER",
            "country_code":"IND",
            "token_txn_type":"ALT_TOKEN"
          }
        },
        "acquirer_data":{
          "approval_code":"000000",
          "acquirer_reference":"202456643801053",
          "rrn":"420145000226"
        },
        "capture_data":[
          {
            "merchant_capture_reference":"f31d8c60-0dc8-4788-a577-5ced930cc175",
            "capture_amount":{
              "value":1100,
              "currency":"INR"
            },
            "created_at":"2024-07-19T11:13:21.523Z"
          }
        ],
        "created_at":"2024-07-19T11:11:48.944Z",
        "updated_at":"2024-07-19T11:13:23.962Z"
      }
    ],
    "created_at":"2024-07-19T11:11:48.944Z",
    "updated_at":"2024-07-19T11:13:23.962Z"
  }
}
```


Refer to our [Capture Order API](/api/orders/capture-order) documentation to learn more.

### 2. Cancel Order

Use this API to cancel the payment against an order.

Shown below are the sample requests and sample response for a Cancel Order API.

```curl cURL - UAT
curl --request PUT \
  --url https://pluraluat.v2.pinepg.in/api/pay/v1/orders/{order_id}/cancel \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
  --header 'Request-Timestamp: 2026-06-01T00:00:00.000Z'
```
```curl cURL - PROD
curl --request PUT \
     --url https://api.pluralpay.in/api/pay/v1/orders/{order_id}/cancel \
     --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
  --header 'Request-Timestamp: 2026-06-01T00:00:00.000Z'
```
```json Sample Response
{
  "data":{
    "order_id":"v1-250124055307-aa-6OZ8sm",
    "merchant_order_reference":"53cf1451-4dfd-417d-a1c8-c8bd603d5200",
    "type":"CHARGE",
    "status":"CANCELLED",
    "challenge_url":"https://pluraluat.v2.pinepg.in/web/auth/landing/?token=S50f2FXi%2FYAGe2bLZEW%2FA2VHzXthz0m9igmtsP61ODtY5u4pR6RYB5IlJwK0%2Fuo%2FBs9",
    "merchant_id":"111163",
    "order_amount":{
      "value":1600000,
      "currency":"INR"
    },
    "pre_auth":false,
    "callback_url":"https://sample-callback-url",
    "failure_callback_url": "https://sample-failure-callback-url",
    "allowed_payment_methods":[
      "CARD",
      "UPI",
      "NETBANKING",
      "POINTS",
      "WALLET",
			"CREDIT_EMI"
    ],
    "purchase_details":{
      "customer":{
        "country_code":"91",
        "billing_address":{
          
        },
        "shipping_address":{
          
        },
        "is_edit_customer_details_allowed":false
      }
    },
    "payments":[
      {
        "id":"v1-250124055307-aa-6OZ8sm-ce-a",
        "merchant_payment_reference":"c7a7f778-b68f-462b-a6af-50698df12a4a",
        "status":"FAILED",
        "payment_amount":{
          "value":1550000,
          "currency":"INR"
        },
        "payment_method":"CREDIT_EMI",
        "offer_data":{
          "offer_details":{
            "id":"6",
            "name":"HDFC CC",
            "issuer_type":"CC_BANK",
            "priority":1,
            "tenure":{
              "tenure_id":"1",
              "name":"3 Months",
              "tenure_type":"MONTH",
              "tenure_value":3,
              "issuer_offer_parameters":[
                {
                  "program_type":"BANK_EMI",
                  "offer_id":"1803",
                  "offer_parameter_id":"72559"
                },
                {
                  "program_type":"MERCHANT_BANK_OFFER",
                  "offer_id":"1523",
                  "offer_parameter_id":"63566"
                }
              ],
              "details":[
                
              ],
              "discount":{
                "discount_type":"INSTANT",
                "amount":{
                  "currency":"INR",
                  "value":50000
                },
                "breakup":{
                  "merchant":{
                    
                  },
                  "issuer":{
                    
                  },
                  "brand":{
                    
                  },
                  "dealer":{
                    
                  }
                }
              },
              "auth_amount":{
                "currency":"INR",
                "value":1550000
              },
              "loan_amount":{
                "currency":"INR",
                "value":1550000
              },
              "total_discount_amount":{
                "currency":"INR",
                "value":50000
              },
              "net_payment_amount":{
                "currency":"INR",
                "value":1601952
              },
              "monthly_emi_amount":{
                "currency":"INR",
                "value":533984
              },
              "total_emi_amount":{
                "currency":"INR",
                "value":1601952
              },
              "interest_amount":{
                "currency":"INR",
                "value":51952
              },
              "interest_rate_percentage":20,
              "processing_fee_details":{
                "amount":{
                  "currency":"INR",
                  "value":19900
                }
              },
              "processing_fee_amount":{
                "currency":"INR",
                "value":19900
              },
              "emi_type":"STANDARD"
            }
          }
        },
        "error_detail":{
          "code":"INTERNAL_ERROR",
          "message":"Payment processor is unavailable"
        },
        "created_at":"2025-01-24T05:53:24.476Z",
        "updated_at":"2025-01-24T05:53:25.492Z"
      },
      {
        "id":"v1-250124055307-aa-6OZ8sm-ce-b",
        "merchant_payment_reference":"32e3ba62-bb95-41bb-be81-1b87ab96c0ed",
        "status":"PENDING",
        "payment_amount":{
          "value":1550000,
          "currency":"INR"
        },
        "payment_method":"CREDIT_EMI",
        "payment_option":{
          "card_data":{
            "card_type":"CREDIT",
            "network_name":"VISA",
            "issuer_name":"INTL HDQTRS-CENTER OWNED",
            "card_category":"Consumer",
            "country_code":"IND",
            "token_txn_type":"ALT_TOKEN",
            "save":false
          }
        },
        "acquirer_data":{
          "approval_code":"",
          "acquirer_reference":"",
          "rrn":"",
          "is_aggregator":true
        },
        "offer_data":{
          "offer_details":{
            "id":"6",
            "name":"HDFC CC",
            "issuer_type":"CC_BANK",
            "priority":1,
            "tenure":{
              "tenure_id":"1",
              "name":"3 Months",
              "tenure_type":"MONTH",
              "tenure_value":3,
              "issuer_offer_parameters":[
                {
                  "program_type":"BANK_EMI",
                  "offer_id":"1803",
                  "offer_parameter_id":"72559"
                },
                {
                  "program_type":"MERCHANT_BANK_OFFER",
                  "offer_id":"1523",
                  "offer_parameter_id":"63566"
                }
              ],
              "details":[
                
              ],
              "discount":{
                "discount_type":"INSTANT",
                "amount":{
                  "currency":"INR",
                  "value":50000
                },
                "breakup":{
                  "merchant":{
                    
                  },
                  "issuer":{
                    
                  },
                  "brand":{
                    
                  },
                  "dealer":{
                    
                  }
                }
              },
              "auth_amount":{
                "currency":"INR",
                "value":1550000
              },
              "loan_amount":{
                "currency":"INR",
                "value":1550000
              },
              "total_discount_amount":{
                "currency":"INR",
                "value":50000
              },
              "net_payment_amount":{
                "currency":"INR",
                "value":1601952
              },
              "monthly_emi_amount":{
                "currency":"INR",
                "value":533984
              },
              "total_emi_amount":{
                "currency":"INR",
                "value":1601952
              },
              "interest_amount":{
                "currency":"INR",
                "value":51952
              },
              "interest_rate_percentage":20,
              "processing_fee_details":{
                "amount":{
                  "currency":"INR",
                  "value":19900
                }
              },
              "processing_fee_amount":{
                "currency":"INR",
                "value":19900
              },
              "emi_type":"STANDARD"
            }
          }
        },
        "created_at":"2025-01-24T05:53:58.092Z",
        "updated_at":"2025-01-24T05:53:59.679Z"
      }
    ],
    "created_at":"2025-01-24T05:53:07.740Z",
    "updated_at":"2025-01-24T05:53:59.680Z",
    "integration_mode":"SEAMLESS",
    "payment_retries_remaining":8
  }
}
```

Refer to our [Cancel Order API](/api/orders/cancel-order) documentation to learn more.
