POST /v1/integrations/stripe/{familyId}/payment-sessions

Path parameters

  • familyId string Required

    Family ID

application/json

Body

Request for creating a payment session

  • amount integer Required

    Amount

  • transactionId string | null

    Transaction ID

Responses

  • 200 application/json

    successful operation

    Hide response attributes Show response attributes object
    • paymentIntent object Required
      Hide paymentIntent attributes Show paymentIntent attributes object
      • id string Required

        Payment Intent Id

      • clientSecret string Required

        Payment Intent Client Secret

      • amount integer Required

        Payment Intent Amount

      • status string Required

        Values are canceled, processing, requires_action, requires_capture, requires_confirmation, requires_payment_method, or succeeded.

      • paymentMethod object Required
        Hide paymentMethod attributes Show paymentMethod attributes object
        • id string Required

          Stripe ID

        • type string Required

          Values are acss_debit, affirm, afterpay_clearpay, alipay, amazon_pay, au_becs_debit, bacs_debit, bancontact, blik, boleto, card, card_present, cashapp, customer_balance, eps, fpx, giropay, grabpay, ideal, interac_present, klarna, konbini, link, mobilepay, multibanco, oxxo, p24, paynow, paypal, pix, promptpay, revolut_pay, sepa_debit, sofort, swish, twint, us_bank_account, wechat_pay, or zip.

        • isDefault boolean Required

          Is default

        • data object Required

          One of:
      • charge object Required
        Hide charge attributes Show charge attributes object
        • id string Required

          Payment Intent Id

        • amount integer Required

          Payment Intent Amount

        • amountCaptured integer

          Payment Intent Amount Captured

        • amountRefunded integer

          Payment Intent Amount Refunded

        • currency string Required

          Payment Intent Currency

        • refunded boolean Required

          Payment Intent Refunded

        • refunds array[object] Required
          Hide refunds attributes Show refunds attributes object
          • id string Required

            Payment Intent Id

          • amount integer Required

            Refund Amount

          • currency string Required

            Currency

          • status string Required

            Values are pending, requires_action, canceled, succeeded, or failed.

          • createdAt string(date) Required

            Created at

    • customerSession object Required
      Hide customerSession attributes Show customerSession attributes object
      • customerId string

        Customer Id

      • clientSecret string Required

        Customer Session Client Secret

    • ephemeralKey object Required
      Hide ephemeralKey attributes Show ephemeralKey attributes object
      • id string Required

        Ephemeral Key Id

      • secret string Required

        Ephemeral Key Secret

      • associatedObjectId string Required

        Associated Object Id

      • associatedObjectType string Required

        Associated Object Type

  • 403 application/json

    Not authorized

    Hide response attributes Show response attributes object

    Error schema

    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

  • 404 application/json

    Not found

    Hide response attributes Show response attributes object

    Error schema

    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

POST /v1/integrations/stripe/{familyId}/payment-sessions
curl \
 --request POST 'https://api.classmanager.io/v1/integrations/stripe/fml_123123123123/payment-sessions' \
 --header "Content-Type: application/json" \
 --data '{"amount":1999,"transactionId":"trn_xxxxxxxxxxxxxxx"}'
Request examples
{
  "amount": 1999,
  "transactionId": "trn_xxxxxxxxxxxxxxx"
}
Response examples (200)
{
  "paymentIntent": {
    "id": "pm_1234567890",
    "clientSecret": "pm_1234567890_secret_xxxxxxxx",
    "amount": 1999,
    "status": "canceled",
    "paymentMethod": {
      "id": "pm_123456789",
      "type": "acss_debit",
      "isDefault": true,
      "data": {
        "brand": "amex",
        "country": "US",
        "expiryMonth": 12,
        "expiryYear": 2023,
        "cardNumber": "************4242",
        "last4": "4242"
      }
    },
    "charge": {
      "id": "pm_1234567890",
      "amount": 1999,
      "amountCaptured": 1999,
      "amountRefunded": 1999,
      "currency": "usd",
      "refunded": false,
      "refunds": [
        {
          "id": "pm_1234567890",
          "amount": 1999,
          "currency": "usd",
          "status": "pending",
          "createdAt": "2023-12-05"
        }
      ]
    }
  },
  "customerSession": {
    "customerId": "cus_1234567890",
    "clientSecret": "cs_1234567890_secret_xxxxxxxx"
  },
  "ephemeralKey": {
    "id": "ephkey_xxxxxxxx",
    "secret": "ek_xxxxxxxx",
    "associatedObjectId": "cus_xxxxxxxx",
    "associatedObjectType": "customer"
  }
}
Response examples (403)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}
Response examples (404)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}