pub struct CreateIntent {Show 16 fields
pub intent: String,
pub max_amount: Option<i64>,
pub currency: Option<String>,
pub context: Option<Value>,
pub require_payment_link: Option<bool>,
pub sign_in_agent: Option<bool>,
pub sign_in_hint: Option<SignInHint>,
pub sign_in_link: Option<bool>,
pub metadata: Option<HashMap<String, String>>,
pub customer: Option<String>,
pub country: Option<String>,
pub end_user_ip: Option<String>,
pub webhook_url: Option<String>,
pub input_ttl_seconds: Option<u32>,
pub secrets: Option<Vec<String>>,
pub shops: Option<Vec<String>>,
}Expand description
Parameters for POST /intents. Build with CreateIntent::new.
Fields§
§intent: StringWhat to buy or book, in natural language.
max_amount: Option<i64>Spending cap in cents; the intent fails rather than exceed it.
currency: Option<String>§context: Option<Value>Structured details: addresses, names, loyalty numbers.
require_payment_link: Option<bool>Always return a payment link instead of paying from the balance.
sign_in_agent: Option<bool>When the shop wants the payer signed in and asks for a phone number or
email and then a code: let the agent sign them in itself, asking for
each value in requires_input (true, the default), or never
(false). Takes effect only where OpenIntents has agent sign-in on
for your key.
sign_in_hint: Option<SignInHint>The payer’s phone number or email for signing in, so the agent need not ask for it.
sign_in_link: Option<bool>When the shop wants the payer signed in and the agent does not sign
them in itself: wait in requires_login with a sign-in link for them
(true, the default), or fail with login_required (false).
metadata: Option<HashMap<String, String>>§customer: Option<String>A customer of your account to buy for: their balance and browser profile.
country: Option<String>The country its browser goes out from (ISO 3166-1 alpha-2, lowercase).
Left out, the payer’s last country, one inferred from end_user_ip,
or the default is used; see country_source on the intent.
end_user_ip: Option<String>The address your end user is browsing from, to infer country from.
webhook_url: Option<String>Where this intent’s own events go, signed with the webhook_secret
the create response alone carries.
input_ttl_seconds: Option<u32>How long a question to the payer may wait for an answer, in seconds.
secrets: Option<Vec<String>>Handles (sec_...) of the stored secrets the purchase may use.
shops: Option<Vec<String>>The shops (registrable domains) you let the purchase fill secrets on.