Products and prices
Keep your catalog in your system and send products with your own reference, or manage them in the Commerce tab, with every price kept as a version.
Your catalog can stay where it is. Send product data with your own reference and Pay.com keeps its copy in sync, so you never maintain the same products in two places. Or create and edit products in the Commerce tab, if that's easier.
Send products with your reference
Send the product's data in the request, with your own reference for it, the way customer_reference_id works for customers. Pay.com finds the product by that reference, or creates it, and keeps its own copy, mapped from what you sent.
When you send different data for a reference Pay.com already has, it updates its copy. The latest data wins.
On a checkout session, send each product in line_items[].price_data.product_data, alongside its price. The response names the product and price Pay.com found or created, and the price version the customer pays. Amounts are in the smallest currency unit, so 1999 is $19.99 USD.
curl https://api.sandbox.pay.com/v1/checkout \
-u ':sk-pay-com-sandbox-…' \
-H "Content-Type: application/json" \
-H "idempotency-key: $(uuidgen)" \
-d '{
"mode": "payment",
"customer_reference_id": "cust-jane-doe-001",
"line_items": [
{
"price_data": {
"currency": "usd",
"unit_amount": 1999,
"product_data": {
"reference": "brand-kit",
"name": "Brand kit",
"tax_code": "txcd_10000000"
}
},
"quantity": 1
}
]
}'{
"id": "cs_691218322858614784",
"resource": "checkout_session",
"mode": "payment",
"status": "open",
"url": "https://checkout.pay.com/a/Pd8sF4vLq1Hy",
"amount": 1999,
"currency": "usd",
"line_items": [
{
"product": "prod_691180270883479552",
"price": "prc_691180274607050752",
"price_version": 1,
"name": "Brand kit",
"quantity": 1,
"unit_amount": 1999,
"amount_subtotal": 1999,
"amount_total": 1999
}
]
}You can also create products and prices with POST /v1/products and POST /v1/prices, and update them with PATCH /v1/products/{product_id} and PATCH /v1/prices/{price_id}.
Prices are kept as versions
A changed price is a new version. Past orders keep the price they were sold at, and a live subscription moves to a new price only after its customer gets a price-change notice.
A price keeps its prc_ ID across versions, and version numbers them. An inline price is found by its own reference, or by its currency and schedule when it has none. A different unit_amount or tax behavior adds a version, and the same data reuses the current one. Orders, invoices, and subscription items record the price_version they were sold at.
To move a live subscription to a new version, schedule a price change with PATCH /v1/subscriptions/{subscription_id} and price_change. Until the change takes effect, the subscription records the scheduled amount and date in price_change, and the last day to cancel before it in next_payment.cancel_by.
Products managed in your system
Products you send with your reference appear in the Commerce tab as managed by your system, alongside your reference. They can't be edited there, so your system stays the source of truth. In the API, these products have managed_by set to api.
When Pay.com sells
When Pay.com sells as the merchant of record, a product that first reaches Pay.com in a request is screened immediately, and a person reviews it afterward. A product that fails screening is refused, or you sell it as yourself where the seller rules allow. The product's review_status shows where its review stands. See Merchant of record.