Hands In Docs
APIV2

Complete a group payment

POST
/group-payments/{groupPaymentId}/complete

Authorization

AuthorizationBearer <token>

Merchant JWT bearer token

In: header

Scope: group-payments.delete

Path Parameters

groupPaymentId*string

A unique identifier for the group payment object.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/group-payments/string/complete" \  -H "Content-Type: application/json" \  -d '{    "idempotencyKey": "string"  }'
{
  "merchantId": "string",
  "id": "string",
  "ownerId": "string",
  "status": "APPROVED",
  "memberIds": [
    "string"
  ],
  "invited": [
    "string"
  ],
  "isDynamicPricingEnabled": false,
  "memberPayments": {
    "property1": "string",
    "property2": "string"
  },
  "splitAllocation": 4,
  "splitType": "EQUAL",
  "customAllocation": {
    "property1": {
      "amount": 100,
      "currency": "AED"
    },
    "property2": {
      "amount": 100,
      "currency": "AED"
    }
  },
  "itemAllocation": {
    "property1": [
      {
        "itemId": "string",
        "quantity": 0.1
      }
    ],
    "property2": [
      {
        "itemId": "string",
        "quantity": 0.1
      }
    ]
  },
  "lineItems": [
    {
      "item": {
        "metaData": {
          "property1": "string",
          "property2": "string"
        },
        "referenceId": "string",
        "description": "string",
        "imageUrls": [
          "https://www.randomurl.com"
        ],
        "attributes": {
          "size": "xs",
          "color": "blue"
        },
        "sku": "string",
        "amountMoney": {
          "amount": 100,
          "currency": "AED"
        },
        "name": "string",
        "id": "string"
      },
      "quantity": 0,
      "subtotalMoney": {
        "amount": 100,
        "currency": "AED"
      },
      "totalMoney": {
        "amount": 100,
        "currency": "AED"
      }
    }
  ],
  "checkoutId": "string",
  "totalMoney": {
    "amount": 100,
    "currency": "AED"
  },
  "amountMoney": {
    "amount": 100,
    "currency": "AED"
  },
  "approvedMoney": {
    "amount": 100,
    "currency": "AED"
  },
  "capturedMoney": {
    "amount": 100,
    "currency": "AED"
  },
  "refundedMoney": {
    "amount": 100,
    "currency": "AED"
  },
  "refundIds": [
    "string"
  ],
  "shippingAddress": {
    "addressLines": {
      "addressLine1": "string",
      "addressLine2": "string",
      "addressLine3": "string"
    },
    "name": "string",
    "city": "string",
    "country": "AF",
    "postalCode": "string",
    "organization": "string",
    "sublocality": "string"
  },
  "requireShipping": true,
  "expirationDate": "2019-08-24T14:15:22Z",
  "statementDescriptionIdentifier": "string",
  "pageOptions": {
    "successUrl": "https://www.randomurl.com",
    "approvedUrl": "https://www.randomurl.com",
    "cancelUrl": "https://www.randomurl.com",
    "expireUrl": "https://www.randomurl.com",
    "style": {
      "palette": {
        "primary": {
          "lighter": "string",
          "light": "string",
          "main": "string",
          "dark": "string",
          "darker": "string",
          "contrastText": "string"
        },
        "secondary": {
          "lighter": "string",
          "light": "string",
          "main": "string",
          "dark": "string",
          "darker": "string",
          "contrastText": "string"
        },
        "error": {
          "lighter": "string",
          "light": "string",
          "main": "string",
          "dark": "string",
          "darker": "string",
          "contrastText": "string"
        },
        "warning": {
          "lighter": "string",
          "light": "string",
          "main": "string",
          "dark": "string",
          "darker": "string",
          "contrastText": "string"
        },
        "info": {
          "lighter": "string",
          "light": "string",
          "main": "string",
          "dark": "string",
          "darker": "string",
          "contrastText": "string"
        },
        "success": {
          "lighter": "string",
          "light": "string",
          "main": "string",
          "dark": "string",
          "darker": "string",
          "contrastText": "string"
        },
        "mode": "light",
        "grey": {
          "50": "string",
          "100": "string",
          "200": "string",
          "300": "string",
          "400": "string",
          "500": "string",
          "600": "string",
          "700": "string",
          "800": "string",
          "900": "string",
          "A100": "string",
          "A200": "string",
          "A400": "string",
          "A700": "string"
        }
      },
      "typography": {
        "h1": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "h2": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "h3": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "h4": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "h5": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "h6": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "subtitle1": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "subtitle2": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "body1": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "body2": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "caption": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "button": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        },
        "overline": {
          "fontSize": "string",
          "fontWeight": "string",
          "lineHeight": "string",
          "letterSpacing": "string",
          "fontFamily": "string"
        }
      },
      "components": {
        "button": {
          "styleOverrides": {
            "root": {
              "property1": null,
              "property2": null
            }
          }
        }
      },
      "fontFamily": "string"
    }
  },
  "note": "string",
  "referenceId": "string",
  "metaData": {
    "property1": "string",
    "property2": "string"
  },
  "url": "string",
  "autocomplete": true,
  "source": "string",
  "message": "string",
  "airlineData": {
    "market": "string",
    "iataCode": "st",
    "countryCode": "string",
    "address": "string",
    "tickets": [
      {
        "issueDate": "2019-08-24T14:15:22Z",
        "ticketNumber": "string",
        "passenger": {
          "code": "string",
          "countryCode": "string",
          "title": "string",
          "firstName": "string",
          "middleName": "string",
          "lastName": "string",
          "email": "string",
          "phoneNumber": "string",
          "ageCategory": "BABY"
        },
        "legs": [
          {
            "flightNumber": "string",
            "departureAirportCode": "string",
            "arrivalAirportCode": "string",
            "serviceClassCode": "st",
            "carrierCode": "st",
            "departureDate": "2019-08-24T14:15:22Z",
            "departureTime": "string",
            "arrivalDate": "2019-08-24T14:15:22Z",
            "arrivalTime": "string",
            "couponNumber": "string",
            "fareBasisCode": "string"
          }
        ]
      }
    ]
  },
  "enablePartialPayment": false,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "batch": {
    "failed": [
      {
        "errorMessage": "string",
        "errorCode": "string",
        "gatewayName": "square",
        "gatewayId": "string",
        "paymentId": "string"
      }
    ],
    "failedCount": 0.1,
    "successful": [
      {
        "merchantId": "string",
        "id": "string",
        "status": "APPROVED",
        "isDynamicPricingEnabled": false,
        "totalMoney": {
          "amount": 100,
          "currency": "AED"
        },
        "amountMoney": {
          "amount": 100,
          "currency": "AED"
        },
        "approvedMoney": {
          "amount": 100,
          "currency": "AED"
        },
        "refundedMoney": {
          "amount": 100,
          "currency": "AED"
        },
        "capturedMoney": {
          "amount": 100,
          "currency": "AED"
        },
        "refundIds": [
          "string"
        ],
        "expirationDate": "2019-08-24T14:15:22Z",
        "customerId": "string",
        "onBehalfOf": "string",
        "lineItems": [
          {
            "item": {
              "metaData": {
                "property1": "string",
                "property2": "string"
              },
              "referenceId": "string",
              "description": "string",
              "imageUrls": [
                "https://www.randomurl.com"
              ],
              "attributes": {
                "size": "xs",
                "color": "blue"
              },
              "sku": "string",
              "amountMoney": {
                "amount": 100,
                "currency": "AED"
              },
              "name": "string",
              "id": "string"
            },
            "quantity": 0,
            "subtotalMoney": {
              "amount": 100,
              "currency": "AED"
            },
            "totalMoney": {
              "amount": 100,
              "currency": "AED"
            }
          }
        ],
        "groupPaymentId": "string",
        "multiCardId": "string",
        "cardDetails": {
          "card": {
            "id": "string",
            "cardBrand": "string",
            "country": "AF",
            "mask": "string",
            "last4": "string",
            "expMonth": 0,
            "expYear": 0,
            "cardholderName": "string",
            "fingerprint": "string",
            "bin": "string"
          },
          "cvvStatus": "CVV_ACCEPTED",
          "avsStatus": "AVS_ACCEPTED",
          "authResultCode": "string",
          "verificationResults": "SUCCESS",
          "threeDSecure": {
            "eci": "string",
            "xid": "string",
            "cavv": "string",
            "threeDSVersion": "string",
            "directoryResponse": "string",
            "authenticationResponse": "string",
            "transStatusReason": "string",
            "cardHolderInfo": "string",
            "threeDSTransactionId": "string"
          }
        },
        "shippingAddress": {
          "addressLines": {
            "addressLine1": "string",
            "addressLine2": "string",
            "addressLine3": "string"
          },
          "name": "string",
          "city": "string",
          "country": "AF",
          "postalCode": "string",
          "organization": "string",
          "sublocality": "string"
        },
        "billingAddress": {
          "addressLines": {
            "addressLine1": "string",
            "addressLine2": "string",
            "addressLine3": "string"
          },
          "name": "string",
          "city": "string",
          "country": "AF",
          "postalCode": "string",
          "organization": "string",
          "sublocality": "string"
        },
        "statementDescriptionIdentifier": "string",
        "description": "string",
        "referenceId": "string",
        "metaData": {
          "property1": "string",
          "property2": "string"
        },
        "autocomplete": true,
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z",
        "gatewayVersion": 0.1,
        "gatewayId": "string",
        "gatewayName": "square",
        "gatewayPaymentId": "string",
        "airlineData": {
          "market": "string",
          "iataCode": "st",
          "countryCode": "string",
          "address": "string",
          "tickets": [
            {
              "issueDate": "2019-08-24T14:15:22Z",
              "ticketNumber": "string",
              "passenger": {
                "code": "string",
                "countryCode": "string",
                "title": "string",
                "firstName": "string",
                "middleName": "string",
                "lastName": "string",
                "email": "string",
                "phoneNumber": "string",
                "ageCategory": "BABY"
              },
              "legs": [
                {
                  "flightNumber": "string",
                  "departureAirportCode": "string",
                  "arrivalAirportCode": "string",
                  "serviceClassCode": "st",
                  "carrierCode": "st",
                  "departureDate": "2019-08-24T14:15:22Z",
                  "departureTime": "string",
                  "arrivalDate": "2019-08-24T14:15:22Z",
                  "arrivalTime": "string",
                  "couponNumber": "string",
                  "fareBasisCode": "string"
                }
              ]
            }
          ]
        },
        "internalReferenceId": "string"
      }
    ],
    "successfulCount": 0.1,
    "count": 0.1,
    "type": "PAYMENT"
  }
}
{
  "http_status_code": 100,
  "moreInfo": "https://www.randomurl.com",
  "name": "string",
  "detail": "string",
  "instance": "/pets/dogs/123",
  "property1": null,
  "property2": null
}