Creates and manages public purchasing opportunities.
A purchase intent describes what may be bought and can produce an order when a buyer accepts it. It is distinct from the resulting order: update or cancel the intent before acceptance, then use the Orders API for payment and fulfillment state.
Summary
Functions
Stops a Buy link from creating new orders immediately. Cancellation is an explicit merchant action and is distinct from time-driven expiry. Repeating cancellation for an already inactive intent returns its current state, but a single-use intent that already created an order cannot be canceled. This operation supports idempotency. Reuse the same Idempotency-Key and request body when retrying an uncertain request.
Creates a controlled, shareable Buy link for a catalog product without requiring you to build a product page, cart, or checkout UI. The returned sale_... ID becomes https://pages.inttegro.com/buy/{purchase_intent_id}. An order is created only when a customer checks out from that link. This operation supports idempotency. Reuse the same Idempotency-Key and request body when retrying an uncertain request.
Resolves the offer behind a hosted Buy link using only its opaque ID. Public lookup requires no API key and returns active or expired intents; canceled and used single-use intents are returned as not found. When the owning application authenticates the request, lookup is application-scoped, returns all lifecycle states, and may include recent activity.
Lists purchase intents for the authenticated application, newest first. Pagination is numbered. The response page.size is the number of records actually returned, not the requested limit, and no total count or next-page token is included.
Changes quantity bounds or expiry without changing what an already-shared Buy link sells. reactivate: true clears cancellation state and any existing elapsed expiry. Product, price, usage mode, and variant selection remain immutable after creation. This operation supports idempotency. Reuse the same Idempotency-Key and request body when retrying an uncertain request.
Functions
@spec cancel( Inttegro.Client.t(), Inttegro.PurchaseIntents.CancelRequest.t(), keyword() ) :: {:ok, Inttegro.PurchaseIntents.PurchaseIntent.t()} | {:error, Exception.t()}
Stops a Buy link from creating new orders immediately. Cancellation is an explicit merchant action and is distinct from time-driven expiry. Repeating cancellation for an already inactive intent returns its current state, but a single-use intent that already created an order cannot be canceled. This operation supports idempotency. Reuse the same Idempotency-Key and request body when retrying an uncertain request.
Parameters
client— an authenticatedInttegro.Client.request— aInttegro.PurchaseIntents.CancelRequestcontaining the operation input.options— request options such as:idempotency_keyand additional:headers.
Returns
Returns {:ok, Inttegro.PurchaseIntents.PurchaseIntent.t()} when Inttegro accepts and decodes the operation. Returns
{:error, exception} for API, transport, or decoding failures. A successful API response can
still describe an asynchronous resource that has not reached its terminal state.
Example
request = Inttegro.PurchaseIntents.CancelRequest.new!(request_attributes)
case Inttegro.PurchaseIntents.cancel(client, request) do
{:ok, result} -> result
{:error, error} -> {:error, error}
end
@spec create( Inttegro.Client.t(), Inttegro.PurchaseIntents.CreateRequest.t(), keyword() ) :: {:ok, Inttegro.PurchaseIntents.PurchaseIntent.t()} | {:error, Exception.t()}
Creates a controlled, shareable Buy link for a catalog product without requiring you to build a product page, cart, or checkout UI. The returned sale_... ID becomes https://pages.inttegro.com/buy/{purchase_intent_id}. An order is created only when a customer checks out from that link. This operation supports idempotency. Reuse the same Idempotency-Key and request body when retrying an uncertain request.
Parameters
client— an authenticatedInttegro.Client.request— aInttegro.PurchaseIntents.CreateRequestcontaining the operation input.options— request options such as:idempotency_keyand additional:headers.
Returns
Returns {:ok, Inttegro.PurchaseIntents.PurchaseIntent.t()} when Inttegro accepts and decodes the operation. Returns
{:error, exception} for API, transport, or decoding failures. A successful API response can
still describe an asynchronous resource that has not reached its terminal state.
Example
request = Inttegro.PurchaseIntents.CreateRequest.new!(request_attributes)
case Inttegro.PurchaseIntents.create(client, request) do
{:ok, result} -> result
{:error, error} -> {:error, error}
end
@spec lookup( Inttegro.Client.t(), Inttegro.PurchaseIntents.LookupRequest.t(), keyword() ) :: {:ok, Inttegro.PurchaseIntents.PurchaseIntent.t()} | {:error, Exception.t()}
Resolves the offer behind a hosted Buy link using only its opaque ID. Public lookup requires no API key and returns active or expired intents; canceled and used single-use intents are returned as not found. When the owning application authenticates the request, lookup is application-scoped, returns all lifecycle states, and may include recent activity.
Parameters
client— an authenticatedInttegro.Client.request— aInttegro.PurchaseIntents.LookupRequestcontaining the operation input.options— request options such as:idempotency_keyand additional:headers.
Returns
Returns {:ok, Inttegro.PurchaseIntents.PurchaseIntent.t()} when Inttegro accepts and decodes the operation. Returns
{:error, exception} for API, transport, or decoding failures. A successful API response can
still describe an asynchronous resource that has not reached its terminal state.
Example
request = Inttegro.PurchaseIntents.LookupRequest.new!(request_attributes)
case Inttegro.PurchaseIntents.lookup(client, request) do
{:ok, result} -> result
{:error, error} -> {:error, error}
end
@spec page(Inttegro.Client.t(), Inttegro.PurchaseIntents.PageRequest.t(), keyword()) :: {:ok, Inttegro.PurchaseIntents.Page.t()} | {:error, Exception.t()}
Lists purchase intents for the authenticated application, newest first. Pagination is numbered. The response page.size is the number of records actually returned, not the requested limit, and no total count or next-page token is included.
Parameters
client— an authenticatedInttegro.Client.request— aInttegro.PurchaseIntents.PageRequestcontaining the operation input.options— request options such as:idempotency_keyand additional:headers.
Returns
Returns {:ok, Inttegro.PurchaseIntents.Page.t()} when Inttegro accepts and decodes the operation. Returns
{:error, exception} for API, transport, or decoding failures. A successful API response can
still describe an asynchronous resource that has not reached its terminal state.
Example
request = Inttegro.PurchaseIntents.PageRequest.new!(request_attributes)
case Inttegro.PurchaseIntents.page(client, request) do
{:ok, result} -> result
{:error, error} -> {:error, error}
end
@spec update( Inttegro.Client.t(), Inttegro.PurchaseIntents.UpdateRequest.t(), keyword() ) :: {:ok, Inttegro.PurchaseIntents.PurchaseIntent.t()} | {:error, Exception.t()}
Changes quantity bounds or expiry without changing what an already-shared Buy link sells. reactivate: true clears cancellation state and any existing elapsed expiry. Product, price, usage mode, and variant selection remain immutable after creation. This operation supports idempotency. Reuse the same Idempotency-Key and request body when retrying an uncertain request.
Parameters
client— an authenticatedInttegro.Client.request— aInttegro.PurchaseIntents.UpdateRequestcontaining the operation input.options— request options such as:idempotency_keyand additional:headers.
Returns
Returns {:ok, Inttegro.PurchaseIntents.PurchaseIntent.t()} when Inttegro accepts and decodes the operation. Returns
{:error, exception} for API, transport, or decoding failures. A successful API response can
still describe an asynchronous resource that has not reached its terminal state.
Example
request = Inttegro.PurchaseIntents.UpdateRequest.new!(request_attributes)
case Inttegro.PurchaseIntents.update(client, request) do
{:ok, result} -> result
{:error, error} -> {:error, error}
end