Skip to main content
POST
Create charging key order

Authorizations

X-API-Key
string
header
required

API key for authentication

Path Parameters

userId
string
required

Body

application/json

This endpoint allows you to order a charging key for a specific user. To prevent duplicate orders, ordering charging keys for a single user is throttled to 1 order every 5 minutes. This is a safety measure to avoid accidental double-clicks on the order button, preventing the user from being charged twice. If the user exceeds this limit, a 429 - Too Many Requests HTTP response will be returned.

address
ChargingKeyOrderAddressRequest · object
required

Shipping address for the ordered charging key.

taxationCountry
string
required

Two-letter taxation country code

Maximum string length: 2
Example:

"SE"

paymentOptionId
string

Stripe payment option id. If not passed, a default one is used.

Example:

"STRIPE-6738556949187507"

Response

OK

Result returned after creating a charging key order.

id
string
required

Unique identifier of the created charging key order.

Example:

"9aE20Rmj0v"

state
enum<string>
required

Current lifecycle state of the charging key order.

Available options:
ORDER_FILLED,
ORDER_CANCELLED,
ORDER_PROCESSING,
ORDER_WAITING_3DS,
ORDER_PAYMENT_FAILED,
ORDER_REFUND_FAILED,
ORDER_REFUNDED,
ORDER_PLACED,
ORDER_PAID
Example:

"ORDER_PLACED"

clientSecret
string

If Stripe payment requires a 3DS authentication, this field will be populated with the clientSecret from Stripe, which should be sent back to client side Stripe SDK for user authentication.

Example:

"pi_1J5J9v3sZvKYlo2C5J9v2eZv"