Skip to main content
POST
/
v3
/
chargers
/
{charger}
/
licenses
/
payment-intent
Create Payment Intent
curl --request POST \
  --url https://app.plugchoice.com/api/v3/chargers/{charger}/licenses/payment-intent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "product": "<string>"
}
'
{
  "payment_intent": "<string>",
  "ephemeral_key": "<string>",
  "customer": "<string>",
  "publishable_key": "<string>",
  "license": 123,
  "pending_invoice_item": true
}
Creates a Stripe payment intent for purchasing a charger license. If the authenticated user’s current team is an active partner, the license cost is added as a pending invoice item on their partner subscription instead.
charger
string
required
The UUID of the charger.
product
string
required
The SKU of the product to purchase. Must be a valid product SKU from the products catalog.

Standard payment response

Response

payment_intent
string
The Stripe PaymentIntent ID (e.g., pi_XXXX).
ephemeral_key
string
The Stripe ephemeral key for client-side confirmation (e.g., ek_test_XXXX).
customer
string
The Stripe Customer ID (e.g., cus_XXXX).
publishable_key
string
The Stripe publishable key for client-side use (e.g., pk_test_XXXX).

Partner billing response

When the user’s team is an active partner, the response differs:
license
integer
The ID of the created license.
pending_invoice_item
boolean
Always true when billed through the partner subscription.