Use Dino purchase intents when you want a structured buy-online lifecycle instead of direct one-step spend calls.
#Endpoint flow
POST /v1/purchase-intents— create intentPOST /v1/purchase-intents/:id/authorize— run policy/approvalPOST /v1/purchase-intents/:id/issue-payment-credential— issue one-time exact-amount payment handleGET /v1/purchase-intents/:id— read current status
#Example: create
curl -sS -X POST "https://api.dino.id/v1/purchase-intents" \
-H "Authorization: Bearer YOUR_DINO_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"product_url": "https://example.com/products/demo-item",
"quantity": 1,
"currency": "usd",
"max_total_cents": 5000,
"buyer": {
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "+15551234567",
"address1": "123 Main St",
"city": "New York",
"province": "NY",
"postal_code": "10001",
"country": "US"
}
}'
#Example: authorize
curl -sS -X POST "https://api.dino.id/v1/purchase-intents/INTENT_ID/authorize" \
-H "Authorization: Bearer YOUR_DINO_KEY" \
-H "Content-Type: application/json" \
-d '{
"expected_total_cents": 4599,
"merchant_name": "example.com",
"reason": "Authorize online purchase"
}'
Authorization outcomes:
approveddeclinedneeds_approval
#Example: issue one-time exact-amount credential
curl -sS -X POST "https://api.dino.id/v1/purchase-intents/INTENT_ID/issue-payment-credential" \
-H "Authorization: Bearer YOUR_DINO_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider":"stripe_proxy_card",
"credential_mode":"one_time_exact_amount",
"ttl_seconds":900,
"merchant_lock":"example.com"
}'
Response fields include:
payment_credential_handleone_time_exact_amountapproved_amount_centscredential_expires_at
#Webhook events
Purchase-intent lifecycle events:
purchase_intent.createdpurchase_intent.authorizedpurchase_intent.needs_approvalpurchase_intent.declinedpurchase_intent.execution_startedpurchase_intent.completedpurchase_intent.failed
See Agent Spend Webhooks for signature verification and retry behavior.
#Suggested integration shape
Keep the model boundary narrow:
- create intent
- authorize intent
- read status
Then route execution through your adapter runtime using Dino-issued credential handles.