Manage Orders

Learn how you can manage your orders with Plural.

Plural APIs provide the below-listed actions to manage your orders.

1. Manage Orders when pre-auth is true.

  • Capture Order: Use this API to capture the payment against an order. You can use this API only when the order status is authorized.
  • Cancel Order: Use this API to cancel the payment against an order. You can use this API only when the order status is authorized.
  • Get Order by Order ID: Use this API to retrieve the specific order using the order_id.
  • Get Order by Merchant Reference ID: Use this API to retrieve the specific order using the merchant_order_reference_id.

2. Manage Orders when pre-auth is false

  • Get Order by Order ID: Use this API to retrieve the specific order using the order_id.
  • Get Order by Merchant Order Reference ID: Use this API to retrieve the specific order using the merchant_oder_reference_id.

1. Capture Order

Use this API to capture the payment against an order. You can use this API only when the order status is authorized.

Use the below endpoint to capture the payment against an order.

PUT: https://pluraluat.v2.pinepg.in/api/pay/v1/orders/{order_id}/capture
PUT: https://api.pluralpay.in/api/pay/v1/orders/{order_id}/capture

Shown below is a sample request and sample response for a Capture Order API.

{
  "merchant_capture_reference": "merchant-capture-ref-r4y",
  "capture_amount": {
    "value": 1100,
    "currency": "INR"
  }
}
{
  "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,
    "purchase_details": {
      "customer": {
        "email_id": "[email protected]",
        "first_name": "Kevin",
        "last_name": "Bob",
        "customer_id": "232323",
        "mobile_number": "9876543210",
        "billing_address": {
          "address1": "H.No 15, Sector 17",
          "address2": "",
          "address3": "",
          "pincode": "61232112",
          "city": "CHANDIGARH",
          "state": "PUNJAB",
          "country": "INDIA"
        },
        "shipping_address": {
          "address1": "H.No 15, Sector 17",
          "address2": "string",
          "address3": "string",
          "pincode": "144001123",
          "city": "CHANDIGARH",
          "state": "PUNJAB",
          "country": "INDIA"
        }
      },
      "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:11:48.944147Z",
        "updated_at": "2024-07-19T11:13:23.962461Z"
      }
    ],
    "created_at": "2024-07-19T11:11:48.944147Z",
    "updated_at": "2024-07-19T11:13:23.962461Z"
  }
}

Refer to our Capture Order API documentation for more information.


2. Cancel Order

Use this API to cancel the payment against an order. You can use this API only when the order status is authorized.

Use the below endpoint to cancel the payment against an order.

PUT: https://pluraluat.v2.pinepg.in/api/pay/v1/orders/{order_id}/cancel
PUT: https://api.pluralpay.in/api/pay/v1/orders/{order_id}/cancel

Shown below is a sample response for a Cancel Order API.

{
  "data": {
    "order_id": "v1-5757575757-aa-hU1rUd",
    "merchant_order_reference": "2177120b-3be1-4330-a15f-53ce14d19841",
    "type": "CHARGE",
    "status": "CANCELLED",
    "merchant_id": "123456",
    "order_amount": {
      "value": 50000,
      "currency": "INR"
    },
    "pre_auth": true,
    "purchase_details": {
      "customer": {
        "email_id": "[email protected]",
        "first_name": "Kevin",
        "last_name": "Bob",
        "customer_id": "232323",
        "mobile_number": "9876543210",
        "billing_address": {
          "address1": "H.No 15, Sector 17",
          "address2": "",
          "address3": "",
          "pincode": "61232112",
          "city": "CHANDIGARH",
          "state": "PUNJAB",
          "country": "INDIA"
        },
        "shipping_address": {
          "address1": "H.No 15, Sector 17",
          "address2": "",
          "address3": "",
          "pincode": "144001123",
          "city": "CHANDIGARH",
          "state": "PUNJAB",
          "country": "INDIA"
        }
      },
      "merchant_metadata": {
        "key1": "DD",
        "key2": "XOF"
      }
    },
    "payments": [
      {
        "id": "v1-2711071924-aa-VxIzq1-cc-Z",
        "status": "CANCELLED",
        "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": "202456644249243",
          "rrn": "420123000239"
        },
        "created_at": "2024-07-19T11:27:55.664651Z",
        "updated_at": "2024-07-19T11:28:52.487287Z"
      }
    ],
    "created_at": "2024-07-19T11:27:55.664651Z",
    "updated_at": "2024-07-19T11:28:52.487287Z"
  }
}

Refer to our Cancel Order API documentation for more information.


3. Get Order by Order ID

Use this API to retrieve the order by order ID.

Use the below endpoint to retrieve the order.

GET: https://pluraluat.v2.pinepg.in/api/pay/v1/orders/{order_id}
GET: https://api.pluralpay.in/api/pay/v1/orders/{order_id}

Shown below is a sample response for a Get Order by Order ID API.

{
  "data": {
    "order_id": "v1-5757575757-aa-hU1rUd",
    "merchant_order_reference": "2177120b-3be1-4330-a15f-53ce14d19841",
    "type": "CHARGE",
    "status": "CANCELLED",
    "merchant_id": "123456",
    "order_amount": {
      "value": 50000,
      "currency": "INR"
    },
    "pre_auth": true,
    "purchase_details": {
      "customer": {
        "email_id": "[email protected]",
        "first_name": "Kevin",
        "last_name": "Bob",
        "customer_id": "232323",
        "mobile_number": "9876543210",
        "billing_address": {
          "address1": "H.No 15, Sector 17",
          "address2": "",
          "address3": "",
          "pincode": "61232112",
          "city": "CHANDIGARH",
          "state": "PUNJAB",
          "country": "INDIA"
        },
        "shipping_address": {
          "address1": "H.No 15, Sector 17",
          "address2": "",
          "address3": "",
          "pincode": "144001123",
          "city": "CHANDIGARH",
          "state": "PUNJAB",
          "country": "INDIA"
        }
      },
      "merchant_metadata": {
        "key1": "DD",
        "key2": "XOF"
      }
    },
    "payments": [
      {
        "id": "v1-2711071924-aa-VxIzq1-cc-Z",
        "status": "CANCELLED",
        "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": "202456644249243",
          "rrn": "420123000239"
        },
        "created_at": "2024-07-19T11:27:55.664651Z",
        "updated_at": "2024-07-19T11:28:52.487287Z"
      }
    ],
    "created_at": "2024-07-19T11:27:55.664651Z",
    "updated_at": "2024-07-19T11:28:52.487287Z"
  }
}

Refer to our Get Order by Order ID API documentation for more information.


4. Get Order by Merchant Order Reference

Use this API to retrieve the order by merchant order reference.

Use the below endpoint to retrieve the order by merchant order reference.

GET: https://pluraluat.v2.pinepg.in/api/pay/v1/orders/reference/{merchant_order_reference}
GET: https://api.pluralpay.in/api/pay/v1/orders/reference/{merchant_order_reference}

Shown below is a sample response for a Get Order by Merchant Order Reference API.

{
  "data": {
    "order_id": "v1-4405071524-aa-qlAtAf",
    "merchant_order_reference": "112345",
    "type": "CHARGE",
    "status": "CREATED",
    "merchant_id": "104359",
    "order_amount": {
      "value": 1100,
      "currency": "INR"
    },
    "pre_auth": false,
    "purchase_details": {
      "customer": {
        "email_id": "[email protected]",
        "first_name": "Kevin",
        "last_name": "Bob",
        "customer_id": "123456",
        "mobile_number": "9876543210",
        "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"
        },
        "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"
        }
      },
      "merchant_metadata": {
        "key1": "DD",
        "key2": "XOF"
      }
    },
    "payments": [],
    "created_at": "2024-07-15T05:44:51.174263Z",
    "updated_at": "2024-07-15T05:44:51.174455Z"
  }
}

Refer to our Get Order by Merchant Order Reference ID API documentation for more information