Create a PaymentIntent
Authorization
bearerAuth AuthorizationBearer <token>
API key as a bearer token (Authorization: Bearer sk_live_...).
In: header
Header Parameters
Idempotency-Key?string
Required in practice for safe retries of POST mutations (48h TTL). Keys are scoped to the project of the API key you send them with, so two projects can reuse the same key independently. While a request is still being processed, a concurrent request with the same key is rejected with 409 idempotency_in_flight — wait for the first response (or a moment) and retry to receive the recorded result.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/payment_intents" \ -H "Content-Type: application/json" \ -d '{ "amount": 0 }'{
"id": "string",
"object": "payment_intent",
"amount": 0,
"currency": "string",
"description": "string",
"status": "new",
"client_secret": "string",
"automatic_operator": true,
"allowed_operators": [
"string"
],
"selected_operator": "string",
"next_action": {},
"metadata": {
"property1": "string",
"property2": "string"
},
"livemode": true,
"created": 0,
"expires_at": 0
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"request_id": "string",
"doc_url": "string",
"operator_decline_code": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"request_id": "string",
"doc_url": "string",
"operator_decline_code": "string"
}
}