Create a Checkout Session
users
transfers
payout-links
payments
payment-intents
payment-customers
checkout-sessions
accounts-payable
- GETList all vendors
- POSTCreate a vendor
- GETGet vendor details
- DELDelete a vendor
- GETList all payment methods for a vendor
- POSTCreate a payment method for a vendor
- GETGet vendor payment method details
- DELDelete a vendor payment method
- GETList all payables
- POSTCreate a payable
- POSTCreate a payable from a file
- GETGet payable details
- PATCHUpdate a payable
- POSTUpload file to the payable
- DELDelete file from the payable
- POSTCancel a payable
- POSTSubmit a payable for approval
- POSTApprove a payable
- POSTReject a payable
- POSTPay a payable
- GETList all approval policies
- POSTCreate an approval policy
- DELDelete an approval policy
- PATCHUpdate priority of an approval policy
- GETList all approvers for api app
apps
- GETList all Apps
- POSTCreate an App
- GETRetrieve an App
- GETRetrieve an App's Compliance Information
- PUTUpdate an App's Compliance Information
- GETGet App ACH Account
- PUTAdd App ACH Account
- POSTDeposit Funds into App Wallet
- POSTWithdraw Funds From App Wallet
- POSTRefresh compliance flow
- POSTUpdate an application's settings
payment-methods
Create a Checkout Session
Create a Checkout Session link to accept a payment.
curl --request POST \
--url https://api.dots.dev/api/v2/checkout-sessions \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"line_items": [
{
"price_data": {
"currency": "usd",
"amount": 123,
"product_data": {
"name": "<string>",
"description": "<string>",
"images": [
"<string>"
],
"metadata": {}
}
},
"quantity": 123
}
],
"customer_email": "jsmith@example.com",
"client_reference_id": "<string>",
"success_url": "<string>",
"cancel_url": "<string>",
"mode": "payment",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_in": 10800,
"metadata": {}
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "open",
"payment_intent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"success_url": "<string>",
"cancel_url": "<string>",
"checkout_session_url": "<string>",
"client_reference_id": "<string>",
"expiry": "2023-11-07T05:31:56Z",
"metadata": {},
"line_items": [
{
"quantity": 123,
"price_id": "<string>"
}
],
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_email": "jsmith@example.com",
"amount_total": 123
}
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Body
application/json
Response
200 - application/json
OK
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.dots.dev/api/v2/checkout-sessions \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"line_items": [
{
"price_data": {
"currency": "usd",
"amount": 123,
"product_data": {
"name": "<string>",
"description": "<string>",
"images": [
"<string>"
],
"metadata": {}
}
},
"quantity": 123
}
],
"customer_email": "jsmith@example.com",
"client_reference_id": "<string>",
"success_url": "<string>",
"cancel_url": "<string>",
"mode": "payment",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_in": 10800,
"metadata": {}
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "open",
"payment_intent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"success_url": "<string>",
"cancel_url": "<string>",
"checkout_session_url": "<string>",
"client_reference_id": "<string>",
"expiry": "2023-11-07T05:31:56Z",
"metadata": {},
"line_items": [
{
"quantity": 123,
"price_id": "<string>"
}
],
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_email": "jsmith@example.com",
"amount_total": 123
}