curl --request POST \
  --url https://api.dots.dev/api/v2/payment-intents \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 123,
  "currency": "usd",
  "confirm": true,
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "payment_method_types": [
    "card"
  ],
  "setup_future_usage": "on_session",
  "metadata": true,
  "transfer_data": {
    "destination_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "application_fee_amount": 1
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 1,
  "currency": "usd",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "initialized",
  "transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "metadata": {},
  "client_secret": "<string>"
}

Authorizations

Authorization
string
headerrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
amount
integer
required

Amount in cents

currency
enum<string>
required

Currency of the payment. Currently only usd is supported.

Available options:
usd
confirm
boolean
default: false

Set to true to attempt to confirm this payment intent immediately. Defaults to false.

user_id
string

ID of a Dots user making this payment.

customer_id
string

ID of a Dots payment_customer making this payment.

description
string

An arbitrary string attached to the object. Often useful for displaying to users.

payment_method_id
string

ID of the payment method to attach to this payment intent.

payment_method_types
enum<string>[]

Currently only card is supported.

Available options:
card
setup_future_usage
enum<string>
Available options:
on_session
metadata
boolean

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

transfer_data
object
application_fee_amount
integer

Amount in cents to transfer to the application's wallet as a platform fee.

Response

200 - application/json
id
string
required
amount
integer
required

Amount in cents

currency
enum<string>
required
Available options:
usd
user_id
string
status
enum<string>
Available options:
initialized,
created,
requires_payment_method,
requires_confirmation,
requires_action,
processing,
succeeded,
requires_capture,
canceled,
failed
transfer_id
string
payment_method_id
string
metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

client_secret
string

Only availble on payment intent creation.