PPylon Developers
ApiPayments

Create payment session

Creates a new payment session for an order. Returns client secret for Stripe integration.

POST
/api/v1/payments/sessions
AuthorizationBearer <token>

Enter your bearer token from the Pylon Auth API.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/payments/sessions" \  -H "Content-Type: application/json" \  -d '{    "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",    "reservationId": null,    "totalAmount": 0.1,    "currency": "string",    "buyerEmail": "string"  }'
{
  "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459",
  "intentId": "9b966aba-7d18-4a93-b6a8-43845b096776",
  "clientSecret": "string",
  "totalAmount": 0.1,
  "discountAmount": 0.1,
  "creditAmount": 0.1,
  "netAmount": 0.1,
  "expiresAt": "2019-08-24T14:15:22Z"
}
{
  "code": "string",
  "message": "string"
}