Customer Portal

Crear url de Customer Portal Session

Changed on

Genera una url de corta duración que deja al Customer ya autenticado en el Customer Portal.

Se usa para llevar a un Customer al portal sin pedirle un código de acceso: la url lleva un token de un solo uso que vence 5 minutos después de emitido.

Sin flow_path, la url apunta al panel principal del portal (/dashboard). flow_path permite abrir otra ruta: acepta una ruta relativa, que se resuelve sobre el portal de la organización, o una url completa, que debe pertenecer a alguno de los portales de la organización.

post/customer-portal-sessions

Request

  • Base URL
    https://api.trytoku.com
  • URL
    https://api.trytoku.com/customer-portal-sessions
  • Auth
    API key in header x-api-key

Headers

x-account-keystring

Llave de API de una Account, para operar sobre esa Account en lugar de la principal.

Request body

customerinteger required
flow_pathstring

Response

Successful Response

customerstring required

Id público del Customer al que pertenece el enlace.

expires_atinteger required

Vencimiento del token, en segundos desde el epoch (UTC).

urlstring required

Url del portal con el token de acceso ya incorporado.

Changes

    • breaking

      request body became required

    • breaking

      the request property type changed from string to integer

    • breaking

      removed the media type application/json for the response with the status

    • breaking

      removed the success response with the status

    • warning

      deleted the header request parameter x-api-key

    • info

      api operation id payment-portal-session removed and replaced with create_session_handler

    • info

      api tag Customer Portal added

    • info

      endpoint deprecated

    • info

      added the new optional header request parameter x-account-key

    • info

      the request property default value cus_abc123 was removed

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the success response with the status