Vatly
Php

One-Off Products

Vatly PHP SDK - One-Off Products

One-off products are single-purchase items (not recurring subscriptions). Create them in the Vatly dashboard or through the API, then use them in checkouts. Live products are reviewed and approved by Vatly before they can be added to checkouts.

The One-Off Product Resource

Below you'll find all properties for the Vatly One-Off Product resource.

Properties

NameTypeDescription
idstringUnique identifier for the product (one_off_product_...).
namestringDisplay name of the product.
descriptionstring | nullDescription of the product.
basePriceMoneyThe price as a Money object — read ->value (decimal string) and ->currency (ISO 4217 code).
testmodeboolWhether this is a test product.
statusstringThe status: active (purchasable), pending (awaiting approval), or rejected.
createdAtstringCreation timestamp (ISO 8601).

Create a product

POST /v1/one-off-products

Create a one-off product. A product created with a live_ token starts in pending status and must be approved by Vatly before it can be added to checkouts; a product created with a test_ token is auto-approved (active) so you can trial checkout immediately.

Required attributes

NameTypeDescription
namestringDisplay name (3–255 characters).
descriptionstringDetailed description of the product.
basePricearrayPrice as ['value' => '299.00', 'currency' => 'EUR'].
productTypestringTax classification: saas or ebook.
$product = $vatly->oneOffProducts->create([
    'name' => 'Premium License',
    'description' => 'Lifetime access to all premium features',
    'basePrice' => ['value' => '299.00', 'currency' => 'EUR'],
    'productType' => 'saas',
]);

echo $product->id;      // one_off_product_...
echo $product->status;  // 'pending' (live) or 'active' (test)

Retrieve a product

GET /v1/one-off-products/:id

Retrieve a one-off product by its ID.

$product = $vatly->oneOffProducts->get('one_off_product_abc123');

echo $product->name;
echo $product->basePrice->value . ' ' . $product->basePrice->currency;

List all products

GET /v1/one-off-products

Retrieve a paginated list of all one-off products.

Optional attributes

NameTypeDescription
limitintegerThe number of products to return (default: 10, max: 100).
startingAfterstringA cursor for pagination.
$products = $vatly->oneOffProducts->list();

foreach ($products as $product) {
    echo $product->name . ': ' . $product->basePrice->value . ' ' . $product->basePrice->currency;
}
Copyright © 2026