---
title: "Lesson 6: POST /intents, the server prices the order and opens the payment"
url: "https://dumpstercontrols.io/help/booking-api/lesson-6-start-the-order-with-post-intents"
description: "This is the call that turns a filled form into a payment waiting for a card. You send the order and the customer; the server prices it again, runs every rule."
date_modified: "2026-10-05"
type: help
tokens: 1983
token_budget: 2000
format: markdown for AI agents, generated at build from the same content as the HTML page
---

Booking API course · updated 2026-10-05

# Lesson 6: POST /intents, the server prices the order and opens the payment

This is the call that turns a filled form into a payment waiting for a card. You send the order and the customer; the server prices it again, runs every rule and the fraud screening, creates the Stripe PaymentIntent and gives you a client_secret. No price travels from your page to ours.

## Before you start

- Lesson 5: you have a size_id, rental_days, a delivery date that passed /check and, if used, a valid promo code

1. ## Request
  ```
  POST /intents
  {
  "size_id": "<uuid>",
  "rental_days": 7,
  "delivery_date": "2026-11-10",
  "pickup_date": "2026-11-17",
  "delivery_address": "123 Main St",
  "delivery_city": "Orlando",
  "delivery_state": "FL",
  "delivery_zip": "32801",
  "placement_lat": 28.5383,
  "placement_lng": -81.3792,
  "debris_type": "household",
  "customer": { "name": "Jane Doe", "email": "jane@example.com", "phone": "4075550100", "type": "residential", "company_name": null },
  "promo_code": "SAVE10",
  "terms_accepted": true,
  "session_id": "your-own-id-optional"
  }
  ```
  Required: size_id, rental_days (1 to 365), delivery_date (YYYY-MM-DD), delivery_address (street number and name), delivery_zip, customer.name, customer.email, customer.phone, terms_accepted = true. pickup_date defaults to delivery_date plus rental_days. customer.type is residential or contractor. session_id is 8 to 64 characters (letters, digits, _ or -); send your own to make retries idempotent.
2. ## Response
  ```
  { "data": {
  "session_id": "...", "payment_intent_id": "pi_...", "client_secret": "pi_..._secret_...",
  "stripe": { "publishable_key": "pk_live_...", "account": null },
  "currency": "usd",
  "amount": { "total": 350, "total_cents": 35000, "processing_fee": 14.46, "processing_fee_cents": 1446, "gross_total": 364.46, "gross_total_cents": 36446, "card_fee_handling": "customer_pays" },
  "next": "Confirm the card with Stripe.js ..."
  } }
  ```
  Keep session_id, payment_intent_id and client_secret in memory for the next two lessons. For Canadian companies stripe.account is the connected account id: initialize Stripe.js with it (lesson 7).
3. ## What happens on the server
  In order: the input is validated (400 invalid_body with field), the price is recomputed from the company's account, booking must be on and Stripe ready, the date must be open and the ZIP inside the service area, the promo must be valid, the email must not belong to a commercial account of the company (409 account_customer), the rate limits and the card-testing gate are checked, the card fee is computed under the company's handling, and the PaymentIntent is created on Stripe with the risk tier of the company (manual capture for review when the company holds suspicious orders). A record of the attempt is kept so the company can see abandoned checkouts.
4. ## Errors you should handle
  400 invalid_body: show the message next to the field. 409 booking_offline, payments_not_ready: show the company's phone. 409 date_past, date_closed, out_of_service_area: send the customer back to that step with the message. 409 account_customer: the message tells the customer to order through their account or call. 409 already_authorized: this session already has an authorized payment; go straight to POST /confirm with its payment_intent_id. 429 rate_limited: wait Retry-After seconds. 502 upstream: try again in a few seconds.
5. ## Idempotency
  Send the same session_id on a retry and the server reuses the open PaymentIntent instead of creating a new one. If the payment was already authorized you get 409 already_authorized with the hint to confirm. Generate a new session_id only for a genuinely new attempt (a different size, date or customer).
6. ## material and material_acknowledged
  Send material (a slug from GET /materials) when the company prices by material; the server prices the order by it and the order carries the material. When that material has requires_ack, send material_acknowledged: true after showing the explanation; otherwise 400 invalid_body with field material_acknowledged and the explanation in the message. A debris_type equal to an active material slug is treated as the material; sending both with different values is 400. 409 material_not_allowed works as in POST /quote. The price is resolved once here and frozen with the payment: editing prices in the account afterwards does not change this order.

## What happens next

- Nothing has been charged yet. The customer still has to confirm the card (lesson 7) and your page still has to call POST /confirm (lesson 8).

## Troubleshooting

### The amount in /intents differs from my last /quote.

The company changed a price or a promo between the two calls, or the promo became invalid. Always show the amount from /intents on the payment step; it is what the card will be charged.

## Related guides

- [Lesson 7: take the card with Stripe.js on your page](https://dumpstercontrols.io/help/booking-api/lesson-7-take-the-card-with-stripe-js-on-your-page)
- [Lesson 8: POST /confirm and GET /sessions, create the order and never lose one](https://dumpstercontrols.io/help/booking-api/lesson-8-confirm-the-order-and-recover-with-sessions)

© 2026 Dumpster Controls. All rights reserved. Made in the USA.

## Frequently asked questions

### Is Dumpster Controls really free?

Yes. The software is free: dispatch, online booking, the driver app, invoicing, the Tresha AI assistant and every other feature, with no monthly fee, no trial period and no credit card to sign up. The only cost on the free plan is optional card processing when a customer pays by card through the platform: 2.99% plus $3.99 per transaction on the free plan. An optional Unlimited plan at $169 per month lowers that to 2.99% plus $0.30. Prices as published on dumpstercontrols.io/pricing on 2026-09-23.

### Do you charge per driver, per truck or per order?

No. There is no per-driver, per-truck, per-user or per-order fee, and no order limit. A company with one truck and a company with twenty pay the same for the software: nothing.

### Is there a contract?

No. There is no contract, no minimum term and no setup fee. You create the account yourself, and on the free plan there is nothing to cancel because nothing is billed. The optional Unlimited plan is billed month to month.

### Which countries and languages are supported?

Dumpster Controls serves hauling companies in the United States and Canada. The app interface and the Tresha AI assistant are available in English, Spanish and Portuguese. The public pages, such as the blog, the help center and the landfill finder, are in English.

### How do I switch from another dumpster software?

Create a free account at dumpstercontrols.io/login, with no sales call and no credit card. Then import your customers from a CSV file using the template provided in the app; past orders can also be imported from a CSV. Container sizes and pricing are set up in Settings. The landfill database, with 1,750 active US and Canadian landfills as counted on 2026-10-01, is already loaded, so disposal sites do not need to be typed in. Step-by-step guides are at dumpstercontrols.io/help.

---

Source: https://dumpstercontrols.io/help/booking-api/lesson-6-start-the-order-with-post-intents (human version of this page).
Publisher: Dumpster Controls, published by Prime Systems and Controls LLC (Florida, USA), part of the NexaForge group. Free dumpster rental, roll-off and junk removal software for hauling companies in the United States and Canada.
Facts for AI assistants: https://dumpstercontrols.io/ai . Site index for agents: https://dumpstercontrols.io/llms.txt . Product manual: https://dumpstercontrols.io/help .
