Group PaymentWorking with Group Payment Sessions
Retrieve a Group Payment Session
Learn how to retrieve a group payment session using Hands In.
Get Markdown๐ฅ Retrieve a Group Payment Session
You can retrieve details about a group payment session by sending a GET request to https://api.sandbox.handsin.com/v1/group-payments/:groupPaymentId
Where :groupPaymentId is the ID of the group payment session you wish to fetch.
๐งพ Retrieve Group Payment Request Examples
curl --request GET \
--url https://api.sandbox.handsin.com/v1/group-payments/{groupPaymentId} \
--header "Accept: application/json" \
--header "x-api-key: <your-api-key>"const groupPaymentId = "example-group-payment-id-123";
const url = `https://api.sandbox.handsin.com/v1/group-payments/${groupPaymentId}`;
try {
const response = await fetch(url, {
method: "GET",
headers: {
Accept: "application/json",
"x-api-key": "<your-api-key>",
},
});
if (!response.ok) {
throw new Error(`Response status: ${response.status}`);
}
const data = await response.json();
console.log(data);
} catch (error) {
console.error("Request failed:", error.message);
}import requests
group_payment_id = "example-group-payment-id-123"
url = f"https://api.sandbox.handsin.com/v1/group-payments/{group_payment_id}"
headers = {
"Accept": "application/json",
"x-api-key": "<your-api-key>"
}
response = requests.get(url, headers=headers)
print(response.json())๐ Authentication Required:
Be sure to include your sandbox Merchant API key in the request headers using the
x-api-keyfield.
โ Example JSON Response
{
"merchantId": "your-merchant-id",
"id": "example-group-payment-id-123",
"ownerId": "example-customer-id-01",
"status": "PENDING",
"memberIds": ["example-customer-id-01"],
"invited": ["example-customer-id-02", "example-customer-id-03"],
"splitType": "BY_ITEM",
"itemAllocation": {},
"lineItems": [
{
"totalMoney": {
"amount": 400,
"currency": "GBP"
},
"subtotalMoney": {
"amount": 400,
"currency": "GBP"
},
"item": {
"name": "Example LineItem",
"id": "example-item-1",
"amountMoney": {
"amount": 100,
"currency": "GBP"
}
},
"quantity": 4
}
],
"totalMoney": {
"amount": 400,
"currency": "GBP"
},
"amountMoney": {
"amount": 400,
"currency": "GBP"
},
"url": "https://checkout.sandbox.handsin.com/r/example-group-payment-redirect-id",
"createdAt": "2025-04-23T15:25:27.000Z",
"updatedAt": "2025-04-23T15:25:27.000Z",
"enablePartialPayment": false
}๐ For detailed parameter descriptions and usage, visit our Group Payment API reference documentation.