CartAI Payment API
The Payment API from CartAI — 3 operation(s) for payment.
The Payment API from CartAI — 3 operation(s) for payment.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/cartai-ai:cartai-ai-payment-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: CartAI Payment API
version: 1.0.0
description: ''
servers:
- url: https://api.cartai.ai
tags:
- name: Payment
paths:
/payment/session:
post:
summary: Create Payment Session
tags:
- Payment
operationId: create_payment_session
description: Creates a hosted payment session that generates a secure URL for embedding in your web application. The session initiates Visa Intelligent Commerce or Mastercard Agent Pay based on the customer's card. Share the returned URL with the customer to complete payment.
parameters:
- in: header
name: x-api-key
schema:
type: string
required: true
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- email
- price
- purpose
properties:
email:
type: string
format: email
description: Customer's email address
price:
type: string
description: Payment amount in USD
purpose:
type: string
description: Description of what the payment is for (e.g. agent name or product)
examples:
Example:
summary: Example
value:
email: customer@example.com
price: '700'
purpose: Carol's Purchase Agent
responses:
'200':
description: Payment session created successfully
content:
application/json:
schema:
type: object
properties:
status:
type: string
code:
type: integer
message:
type: string
data:
type: object
properties:
url:
type: string
description: Hosted payment URL to embed in your web application. Starts Visa Intelligent Commerce or Mastercard Agent Pay based on the customer's card.
sessionId:
type: string
mode:
type: string
enum:
- production
- test
created_at:
type: string
format: date-time
authorization:
type: object
properties:
price:
type: string
currency:
type: string
purpose:
type: string
expiry:
type: string
format: date-time
examples:
Success:
summary: Success
value:
status: success
code: 200
message: Payment session created successfully
data:
url: https://wallet.cartai.ai?token=<jwt_token>&type=bt&mode=p
sessionId: 019ed477-7954-7d92-8884-d442d1f91549
mode: production
created_at: '2026-06-17T07:24:20.497354'
authorization:
price: '700'
currency: USD
purpose: Carol's Purchase Agent
expiry: '2026-06-24T07:20:32.875162+00:00'
'400':
description: Bad Request
/payment/session/{sessionId}:
delete:
summary: Delete Payment Session
tags:
- Payment
operationId: delete_payment_session
description: Deletes an existing payment session. Once deleted, the hosted payment URL stops working and payment credentials can no longer be retrieved for the session.
parameters:
- in: path
name: sessionId
schema:
type: string
required: true
description: The sessionId returned by Create Payment Session
- in: header
name: x-api-key
schema:
type: string
required: true
responses:
'200':
description: Payment session deleted successfully
content:
application/json:
schema:
type: object
properties:
status:
type: string
code:
type: integer
message:
type: string
examples:
Success:
summary: Success
value:
status: success
code: 200
message: Payment session deleted successfully
'400':
description: Bad Request
'404':
description: Payment session not found
/payment/session/credentials:
post:
summary: Get Payment Credentials
tags:
- Payment
operationId: get_payment_credentials
description: Retrieves a scoped payment credential for a session the customer has authorized. The credential is an agentic PAN from Visa Intelligent Commerce or Mastercard Agent Pay, or a card from the customer's Stripe Link wallet. It is limited to the approved amount and merchant. The customer's real card number is never returned. Optionally pass the merchant URL to get a credential for a specific merchant.
parameters:
- in: header
name: x-api-key
schema:
type: string
required: true
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- sessionId
properties:
sessionId:
type: string
description: The sessionId returned by Create Payment Session
merchantUrl:
type: string
description: Optional. Website URL of the merchant the credentials will be used on
examples:
Example:
summary: Example
value:
sessionId: 01a1d3ad-e7d9-7981-8a1e-c0a1b9ec65c1
merchantUrl: https://saltiebeauty.com
SessionOnly:
summary: Without merchantUrl
value:
sessionId: 01a1d3ad-e7d9-7981-8a1e-c0a1b9ec65c1
responses:
'200':
description: Payment credentials retrieved successfully
content:
application/json:
schema:
type: object
properties:
status:
type: string
code:
type: integer
message:
type: string
data:
type: object
properties:
type:
type: string
description: Credential type (e.g. "card")
info:
type: object
properties:
cardNumber:
type: string
description: Card number
cvv:
type: string
description: Card verification value
expiryMonth:
type: string
description: Two-digit expiry month
expiryYear:
type: string
description: Four-digit expiry year
examples:
Success:
summary: Success
value:
status: success
code: 200
message: Payment credentials retrieved and securely delivered
data:
type: card
info:
cardNumber: '4242424242424242'
cvv: '234'
expiryMonth: '04'
expiryYear: '2027'
'400':
description: Bad Request
x-readme: {}