Hands In
Group Payment

Reconcile Group Payments

Learn how to reconcile and track payments associated with a Group Payment Session using the Hands In API.

Get Markdown

๐Ÿ“Š Reconcile a Group Payment Session

When multiple customers contribute to a group payment, each payment is tracked individually. To support reconciliation, Hands In provides a referenceId that can be used to identify and trace payments across systems.

By default, any payment made under a group payment session will have a referenceId formatted as:

{groupPaymentId}_{customerId}

Where:

  • groupPaymentId is the unique ID of the group payment session.
  • customerId associated with the participant in the group who the payment is for.

๐Ÿงพ Using referenceId for Group Payments

When creating a group payment session, you may pass a custom referenceId. This value will be prefixed to all payment referenceIds for a particular group order, allowing you to easily match incoming payments with your system records.

Example Create Request with referenceId

curl --request POST \
  --url https://api.sandbox.handsin.com/v1/group-payments \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --header "x-api-key: <your-api-key>" \
  --data '{
    "idempotencyKey": "example_unique_idempotency_key",
    "referenceId": "YOUR_UNIQUE_MERCHANT_ORDER_REF",
    "amountMoney": {
      "amount": 2000,
      "currency": "GBP"
    },
    "customer": {
      "firstName": "Example",
      "email": "example@handsin.com"
    },
    "lineItemParams": [
      {
        "item": {
          "name": "Example LineItem",
          "amountMoney": {
            "amount": 1000,
            "currency": "GBP"
          }
        },
        "quantity": 2
      }
    ],
    "splitType": "BY_ITEM"
  }'
const url = "https://api.sandbox.handsin.com/v1/group-payments";

const payload = {
  idempotencyKey: "example_unique_idempotency_key",
  referenceId: "YOUR_UNIQUE_MERCHANT_ORDER_REF",
  amountMoney: {
    amount: 2000,
    currency: "GBP",
  },
  customer: {
    firstName: "Example",
    email: "example@handsin.com",
  },
  lineItemParams: [
    {
      item: {
        name: "Example LineItem",
        amountMoney: {
          amount: 1000,
          currency: "GBP",
        },
      },
      quantity: 2,
    },
  ],
  splitType: "BY_ITEM",
};

try {
  const response = await fetch(url, {
    method: "POST",
    headers: {
      Accept: "application/json",
      "Content-Type": "application/json",
      "x-api-key": "<your-api-key>",
    },
    body: JSON.stringify(payload),
  });

  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error("Request failed:", error.message);
}
import requests

url = "https://api.sandbox.handsin.com/v1/group-payments"
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "x-api-key": "<your-api-key>"
}
payload = {
    "idempotencyKey": "example_unique_idempotency_key",
    "referenceId": "YOUR_UNIQUE_MERCHANT_ORDER_REF",
    "amountMoney": {
        "amount": 2000,
        "currency": "GBP"
    },
    "customer": {
        "firstName": "Example",
        "email": "example@handsin.com"
    },
    "lineItemParams": [
        {
            "item": {
                "name": "Example LineItem",
                "amountMoney": {
                    "amount": 1000,
                    "currency": "GBP"
                }
            },
            "quantity": 2
        }
    ],
    "splitType": "BY_ITEM"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

Now any payments made into this group payment session will have the following referenceId - YOUR_UNIQUE_MERCHANT_ORDER_REF_{customerId}

where YOUR_UNIQUE_MERCHANT_ORDER_REF is the value you passed in to the referenceId field when creating the group payment

๐Ÿ” Look Up Payments Via Your Merchant Dashboard


Using the table column 'reference Id' - You can search and filter your payments by your system's referenceId directly from your Hands In Payments Dashboard

In the example above, 3 payments out of many payments were found, with the following referenceId's:

Card #Example Reference ID
1YOUR_UNIQUE_MERCHANT_ORDER_REF_CUSTOMER-1
2YOUR_UNIQUE_MERCHANT_ORDER_REF_CUSTOMER-2
3YOUR_UNIQUE_MERCHANT_ORDER_REF_CUSTOMER-3

โœ… That's it โ€” you've learned how to use referenceId to help reconcile payments from a group payment session using your dashboard.

โžก๏ธ For real-time reconciliation and tracking of events, we recommend setting up webhook notifications to receive updates as they happen.
Alternatively, API integrations can poll the group payment session and fetch each payment for that session using the values from the group payment's memberPayments field and in conjunction with the retrieve payment endpoint

On this page