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).
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",
"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"
}
}