API Reference
Customers
Referral Groups
Create a group
POST
/
groups
curl --request POST \
--url https://api.kohortpay.com/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"customerId": "cus_IzkjlvAhdjzjht3",
"paymentIntentId": "pi_1JYLo8KerLxWZaQtys6ZQ1xR",
"orderId": "pi_1JYLo8KerLxWZaQtys6ZQ1xR",
"metadata": {
"order_id": "ord_1JYLo8KerLxWZaQtys6ZQ1xS"
},
"expiresAt": "2024-11-05T14:44:03.303Z",
"midExpireAt": "2024-11-05T14:44:00.805Z"
}'
{
"id": "ord_1234567890",
"shareId": "KHT-XXXXXXXX",
"livemode": true,
"organizationId": "org_1234567890",
"customerId": "cus_1234567890",
"creatorEmail": "[email protected]",
"status": "COMPLETED",
"metadata": {
"basket_id": "1JYLo8KerLxWZaQtys6ZQ1xS"
},
"expiresAt": "2021-07-22T00:00:00.000Z",
"midExpireAt": "2021-07-22T00:00:00.000Z",
"jMinus2ExpireAt": "2021-07-22T00:00:00.000Z",
"jPlus3StartAt": "2021-07-22T00:00:00.000Z",
"reminderEmailSent": "NOT_SENT",
"createdAt": "2021-07-22T00:00:00.000Z",
"createdBy": "usr_1234567890",
"updatedAt": "2021-07-22T00:00:00.000Z",
"updatedBy": "usr_1234567890",
"canceledAt": "2021-07-22T00:00:00.000Z",
"completedAt": "2021-07-22T00:00:00.000Z"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
201 - application/json
Group successfully created.
The response is of type object
.
curl --request POST \
--url https://api.kohortpay.com/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"customerId": "cus_IzkjlvAhdjzjht3",
"paymentIntentId": "pi_1JYLo8KerLxWZaQtys6ZQ1xR",
"orderId": "pi_1JYLo8KerLxWZaQtys6ZQ1xR",
"metadata": {
"order_id": "ord_1JYLo8KerLxWZaQtys6ZQ1xS"
},
"expiresAt": "2024-11-05T14:44:03.303Z",
"midExpireAt": "2024-11-05T14:44:00.805Z"
}'
{
"id": "ord_1234567890",
"shareId": "KHT-XXXXXXXX",
"livemode": true,
"organizationId": "org_1234567890",
"customerId": "cus_1234567890",
"creatorEmail": "[email protected]",
"status": "COMPLETED",
"metadata": {
"basket_id": "1JYLo8KerLxWZaQtys6ZQ1xS"
},
"expiresAt": "2021-07-22T00:00:00.000Z",
"midExpireAt": "2021-07-22T00:00:00.000Z",
"jMinus2ExpireAt": "2021-07-22T00:00:00.000Z",
"jPlus3StartAt": "2021-07-22T00:00:00.000Z",
"reminderEmailSent": "NOT_SENT",
"createdAt": "2021-07-22T00:00:00.000Z",
"createdBy": "usr_1234567890",
"updatedAt": "2021-07-22T00:00:00.000Z",
"updatedBy": "usr_1234567890",
"canceledAt": "2021-07-22T00:00:00.000Z",
"completedAt": "2021-07-22T00:00:00.000Z"
}