Commas
App · 19 actions
Create checkout links and read products, subscribers, payments and invoices.
Actions
| Action | What it does |
|---|---|
| Create a one-time checkout session | Create a payment link for a one-time purchase. |
| Delete a checkout session | Permanently deactivate a checkout session and its payment link. |
| Get a checkout session | Read checkout settings and the checkout’s numeric product ID. |
| Get a discount code | Read a discount code’s terms, expiration and usage. |
| Get a transaction | Read the details of one payment by its public transaction ID. |
| Get an invoice | Read line items, totals and activity for an invoice. |
| Get the next invoice number | Read the next available sequence number for a new invoice. |
| List customer payment methods | Read payment methods saved by a customer. |
| List customers | Find customers by name, email or phone number. |
| List discount codes | Read discount codes and their usage. |
| List invoices | Read invoices by status or issue and due dates. |
| List payment products | Read payment products and their checkout links. |
| List subscribers | Read subscribers and optionally filter by product. |
| List subscriptions for a checkout | Read subscriptions from a checkout session. |
| List subscriptions for a product | Read subscribers to a product by its numeric ID. |
| List transactions | Read recorded payments and net proceeds for your products. |
| List transactions for a checkout | Read payments recorded for a checkout session. |
| List transactions for a product | Read payments recorded against the product’s numeric ID. |
| List webhook subscriptions | Read active and inactive webhook registrations. |
Create a one-time checkout session
Create a payment link for a one-time purchase.
Inputs
- Title
titletextRequired - The product name customers see at checkout.
- Description
descriptiontext - A short product description for customers.
- Amount Cents
amount_centsnumberRequired - The purchase price in cents. For example, enter 2500 for $25.00.At least 100.
- Type
typetextRequired - Whether this link may be used once or repeatedly.One of:
onetime_non_reusable(Onetime non reusable),onetime_reusable(Onetime reusable). - Expiration Date
expiration_datedate - The date the payment link stops accepting payments.
- Success Url
success_urltext - The page to show after a successful payment.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"checkout_session_id": "example",
"payment_link": "example",
"product_id": "example"
},
"message": "example",
"request_id": "example",
"status": "example"
}
}Delete a checkout session
Permanently deactivate a checkout session and its payment link.
Inputs
- Session Id
session_idtextRequired - The session id.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": [
{}
],
"message": "example",
"request_id": "example",
"status": "example"
}
}Get a checkout session
Read checkout settings and the checkout’s numeric product ID.
Inputs
- Session Id
session_idtextRequired - The session id.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"amount_cents": 1,
"expiration_date": "example",
"product": {
"description": "example",
"id": 1,
"title": "example"
},
"subscription": {},
"success_url": "example",
"type": "example"
},
"message": "example",
"request_id": "example",
"status": "example"
}
}Get a discount code
Read a discount code’s terms, expiration and usage.
Inputs
- Discount Code
discount_code_idtextRequired - The discount code id.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"code": "example",
"description": "example",
"duration": "example",
"expiry": "example",
"id": "example",
"type": "example",
"usable_number": 1,
"usage_count": 1,
"value": "example"
},
"message": "example",
"request_id": "example",
"status": "example"
}
}Get a transaction
Read the details of one payment by its public transaction ID.
Inputs
- Transaction Id
transaction_idtextRequired - The transaction id.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"amount": 1,
"fan": {
"email": "example",
"id": "example",
"name": "example"
},
"fee_amount": 1,
"id": 1,
"net_amount": 1,
"product": {
"description": "example",
"id": "example",
"payment_link": "example",
"price": "example",
"title": "example"
},
"refunds": [
{}
],
"transaction_date": "example"
},
"message": "example",
"request_id": "example",
"status": "example"
}
}Get an invoice
Read line items, totals and activity for an invoice.
Inputs
- Invoice
invoice_idtextRequired - The invoice id.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"currency": "example",
"dueDate": "example",
"id": "example",
"invoiceNo": "example",
"issueDate": "example",
"publicId": "example",
"status": "example",
"total": 1
},
"message": "example",
"request_id": "example",
"status": "example"
}
}Get the next invoice number
Read the next available sequence number for a new invoice.
Inputs
None.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {},
"message": "example",
"request_id": "example",
"status": "example"
}
}List customer payment methods
Read payment methods saved by a customer.
Inputs
- Customer
customer_idnumberRequired - A customer from List customers.At least 1.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {},
"message": "example",
"request_id": "example",
"status": "example"
}
}List customers
Find customers by name, email or phone number.
Inputs
- Search
searchtext - A name, email address or phone number to search for.
- Page
pagenumber - Which page of results to read.At least 1.
- Per Page
per_pagenumber - How many results to return per page.From 1 to 100.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"customers": [
{
"email": "example",
"id": 1,
"last_transaction_date": "example",
"name": "example",
"total_spent": "example",
"total_transactions": 1
}
],
"pagination": {
"current_page": 1,
"has_more": true,
"per_page": 1,
"total_items": 1,
"total_pages": 1
}
},
"message": "example",
"request_id": "example",
"status": "example"
}
}List discount codes
Read discount codes and their usage.
Inputs
- Search
searchtext - Search by code, discount or product title.
- Page
pagenumber - Which page of results to read.At least 1.
- Per Page
per_pagenumber - How many results to return per page.From 1 to 100.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"current_page": 1,
"data": [
{
"code": "example",
"description": "example",
"duration": "example",
"expiry": "example",
"id": "example",
"type": "example",
"usable_number": 1,
"usage_count": 1,
"value": "example"
}
],
"last_page": 1,
"total": 1
},
"message": "example",
"request_id": "example",
"status": "example"
}
}List invoices
Read invoices by status or issue and due dates.
Inputs
- Status
statustext - Only include invoices with this payment status.One of:
pending,paid,paid_off_platform(Paid off platform),canceled,overdue. - Search
searchtext - Part of an invoice number or recipient name.
- Start Date
start_datedate - Earliest issue date.
- End Date
end_datedate - Latest issue date.
- Due After
due_afterdate - Earliest due date.
- Due Before
due_beforedate - Latest due date.
- Limit
limitnumber - How many invoices to return.At least 1.
- Offset
offsetnumber - How many invoices to skip.At least 0.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"invoices": [
{
"currency": "example",
"dueDate": "example",
"id": "example",
"invoiceNo": "example",
"issueDate": "example",
"publicId": "example",
"status": "example",
"total": 1
}
],
"total": 1
},
"message": "example",
"request_id": "example",
"status": "example"
}
}List payment products
Read payment products and their checkout links.
Inputs
- Page
pagenumber - Which page of results to read.At least 1.
- Per Page
per_pagenumber - How many results to return per page.From 1 to 100.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"current_page": 1,
"data": [
{
"description": "example",
"id": "example",
"payment_link": "example",
"price": "example",
"title": "example"
}
],
"last_page": 1,
"total": 1
},
"message": "example",
"request_id": "example",
"status": "example"
}
}List subscribers
Read subscribers and optionally filter by product.
Inputs
- Product
product_idtext - A payment product to filter by.
- Page
pagenumber - Which page of results to read.At least 1.
- Per Page
per_pagenumber - How many results to return per page.From 1 to 100.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"pagination": {
"current_page": 1,
"has_more": true,
"per_page": 1,
"total_items": 1,
"total_pages": 1
},
"subscribers": [
{
"customer": {},
"id": 1,
"product": {
"description": "example",
"id": "example",
"payment_link": "example",
"price": "example",
"title": "example"
},
"subscription": {
"created_at": "example",
"id": 1,
"payment_frequency": "example",
"status": "example",
"updated_at": "example"
}
}
]
},
"message": "example",
"request_id": "example",
"status": "example"
}
}List subscriptions for a checkout
Read subscriptions from a checkout session.
Inputs
- Session Id
session_idtextRequired - The session id.
- Page
pagenumber - Which page of results to read.At least 1.
- Per Page
per_pagenumber - How many results to return per page.From 1 to 100.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"pagination": {
"current_page": 1,
"has_more": true,
"per_page": 1,
"total_items": 1,
"total_pages": 1
},
"subscriptions": [
{
"created_at": "example",
"id": 1,
"payment_frequency": "example",
"status": "example",
"updated_at": "example"
}
]
},
"message": "example",
"request_id": "example",
"status": "example"
}
}List subscriptions for a product
Read subscribers to a product by its numeric ID.
Inputs
- Product Id
product_idnumberRequired - The numeric product ID returned by Get a checkout session.At least 1.
- Page
pagenumber - Which page of results to read.At least 1.
- Per Page
per_pagenumber - How many results to return per page.From 1 to 100.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"pagination": {
"current_page": 1,
"has_more": true,
"per_page": 1,
"total_items": 1,
"total_pages": 1
},
"subscriptions": [
{
"created_at": "example",
"id": 1,
"payment_frequency": "example",
"status": "example",
"updated_at": "example"
}
]
},
"message": "example",
"request_id": "example",
"status": "example"
}
}List transactions
Read recorded payments and net proceeds for your products.
Inputs
- Product
product_idtext - A payment product to filter by.
- Page
pagenumber - Which page of results to read.At least 1.
- Per Page
per_pagenumber - How many results to return per page.From 1 to 100.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"pagination": {
"current_page": 1,
"has_more": true,
"per_page": 1,
"total_items": 1,
"total_pages": 1
},
"transactions": [
{
"amount": 1,
"fan": {
"email": "example",
"id": "example",
"name": "example"
},
"fee_amount": 1,
"id": 1,
"net_amount": 1,
"product": {
"description": "example",
"id": "example",
"payment_link": "example",
"price": "example",
"title": "example"
},
"refunds": [
{}
],
"transaction_date": "example"
}
]
},
"message": "example",
"request_id": "example",
"status": "example"
}
}List transactions for a checkout
Read payments recorded for a checkout session.
Inputs
- Session Id
session_idtextRequired - The session id.
- Page
pagenumber - Which page of results to read.At least 1.
- Per Page
per_pagenumber - How many results to return per page.From 1 to 100.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"pagination": {
"current_page": 1,
"has_more": true,
"per_page": 1,
"total_items": 1,
"total_pages": 1
},
"transactions": [
{
"amount": 1,
"fan": {
"email": "example",
"id": "example",
"name": "example"
},
"fee_amount": 1,
"id": 1,
"net_amount": 1,
"product": {
"description": "example",
"id": "example",
"payment_link": "example",
"price": "example",
"title": "example"
},
"refunds": [
{}
],
"transaction_date": "example"
}
]
},
"message": "example",
"request_id": "example",
"status": "example"
}
}List transactions for a product
Read payments recorded against the product’s numeric ID.
Inputs
- Product Id
product_idnumberRequired - The numeric product ID returned by Get a checkout session.At least 1.
- Page
pagenumber - Which page of results to read.At least 1.
- Per Page
per_pagenumber - How many results to return per page.From 1 to 100.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": {
"pagination": {
"current_page": 1,
"has_more": true,
"per_page": 1,
"total_items": 1,
"total_pages": 1
},
"transactions": [
{
"amount": 1,
"fan": {
"email": "example",
"id": "example",
"name": "example"
},
"fee_amount": 1,
"id": 1,
"net_amount": 1,
"product": {
"description": "example",
"id": "example",
"payment_link": "example",
"price": "example",
"title": "example"
},
"refunds": [
{}
],
"transaction_date": "example"
}
]
},
"message": "example",
"request_id": "example",
"status": "example"
}
}List webhook subscriptions
Read active and inactive webhook registrations.
Inputs
None.
Outputs
dataobject- The response from Commas.
Example output
{
"data": {
"data": [
{
"event_types": [
"example"
],
"id": "example",
"is_active": true,
"webhook_url": "example"
}
],
"message": "example",
"request_id": "example",
"status": "example"
}
}