Building blocks for group payments

Pay By Group makes it easy to accept payment from a group of customers online - in your app or on your site. Get integrated quickly by reviewing the Sample Scenarios, and select from our range of API (back-end) and JavasScript Library (front-end) integration tools.

Get Started    

1. Javascript Library

This section will walk you through creating a basic “Split the Cost” button that gives your customers an option to split any item on your site. It is the fastest way to add the Pay By Group option to your website or app by only making a front-end change. This method can usually be implemented easily using an A/B testing framework such as Optimizely or Qubit.

You can see the full JS Library reference here.

  1. Start by adding Pay By Group’s JavaScript library in the footer on your site.

  2. Create a button placeholder by adding this code wherever you want the button to be displayed:

<div
     class="pbg-button"
     data-payload='{"product":{"name":"Trip to Vegas","description":"Product description","costType":"total","costs":[{"amount":{"amountCents":100000,"currencyCode":"USD"},"minSlots":2,"maxSlots":8}]},"payments":[{"percentage":100,"dueDeadline":"2018-05-23T04:26:19.555Z"}]}' />

Example of Pay By Group Checkout button:

  1. Any clicks on the button will present an overlaid iframe on your site for the customer to create their group purchase.

  2. As long as you pass in all the required info as the payload data, you are done creating a purchase with Pay By Group. From this point on, Pay By Group does its magic of inviting and reminding group members to pay for and complete the purchase, while enabling you to treat this like a single-payer order.