Skip to main content
POST
curl

Authorizations

x-api-key
string
header
required

Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is missing, wrong, revoked or expired; 403 means the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.

Body

application/json
amount_in_dollars
number
required

Amount to charge, in USD. Must be at least 50. Tax is added automatically at checkout based on the customer's billing address.

Required range: x >= 50
success_url
string<uri>

URL the hosted checkout redirects the customer to after a successful payment. Currently defaults to https://console.didit.me. Pass a working URL explicitly; the default host is unavailable. Append the literal placeholder {CHECKOUT_SESSION_ID} if you want the hosted checkout to substitute the session ID.

cancel_url
string<uri>

URL the hosted checkout redirects the customer to when they abort or close the Checkout window. Currently defaults to https://console.didit.me. Pass a working URL explicitly; the default host is unavailable.

Response

Hosted checkout session created. Redirect the user to checkout_session_url to complete payment.

checkout_session_id
string
required

Hosted checkout session identifier (e.g. cs_test_a1B2c3...). Useful for server-side reconciliation.

checkout_session_url
string<uri>
required

Single-use hosted payment page URL. Redirect the customer here to complete payment.