Checkout Sessions

Create a checkout session

Creates a hosted checkout session for a customer to purchase a product plan, or to top up credits (purpose: "credit_topup", which skips productRef). Returns a session ID and checkout URL for redirect.

post/v1/sdk/checkout-sessions

Request body

customerRefstring required
planRefstring
productRefstring
purpose'credit_topup'
returnUrlstring

Response

Checkout session created

checkoutUrlstring required

Full checkout URL based on backend configuration (ready to redirect customer)

sessionIdstring required

Checkout session ID/token

Example response

{
  "checkoutUrl": "https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788",
  "sessionId": "e3f1c2d4b6a89f001122334455667788"
}

Changes

Changed in 4 of the 27 revisions of this API.237

    • the request property's maxLength was set to 20

      request-property-max-length-set

    • the request property's maxLength was set to 20

      request-property-max-length-set

    • the request property's maxLength was set to 20

      request-property-max-length-set

    • the endpoint scheme security SecretKey was added to the API

      api-security-added

    • the endpoint scheme security bearer was removed from the API

      api-security-removed

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • the request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • added the new optional request property

      new-optional-request-property

    • the request property became optional

      request-property-became-optional

    • the response property became required for the status

      response-property-became-required

    • the response property became required for the status

      response-property-became-required

    This revision also has 44 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added

    This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog