Use Communications Server-Side Extensions to Access Buying and Billing APIs

In addition to using REST APIs for integration with external systems, you can use server-side extensions written in JavaScript in your communications storefront and self-care application based on your business scenarios. These extensions let you run critical code in a secure environment that can't

The communications storefront and self-care application uses an Oracle Commerce Cloud server-side extension to communicate with Oracle Identity Cloud Service. All the endpoints in the application use this server-side extension to generate the appropriate access tokens for accessing the Buying and Billing APIs. You can use these endpoints to generate access tokens based on your business needs.

Caution:

Don't modify this server-side extension.

You can use this server-side extension in your application for generating access tokens through these endpoints:

  • /v1/getAccessToken: The getAccessToken endpoint generates the access tokens for anonymous access. With this token, only the following endpoints can access the TMF APIs:

    • dx4cRetrieveProductOffering

    • dx4cListProductOfferings

    • dx4cRetrieveProductOfferingPrice

    • dx4cCreateShoppingCart

    • dx4cRetrieveShoppingCart

    • dx4cPatchShoppingCart

    • dx4cCreateIndividual

    • dx4cRetrieveProductLine

    • dx4cRetrieveCatalogs

    • dx4cRetrieveCategory

    • dx4cListCategory

  • /v1/getSubscriberAccessToken: The endpoint to generate the access tokens for signed-in users. You can access all the Buying and Billing APIs using this token.

  • /v1/getLogoutRequest: The endpoint to generate a SAML sign out request. The payload must contain a user name. You can use an optional boolean query parameter, Encode, with this endpoint. If this is set to true, the SAML sign out request that's returned will be base64 encoded.

You can also create server-side extensions for your application based on your business needs. For more information on developing new server-side extensions, refer to the Develop Server-Side Extensions topic in the Extending Oracle CX Commerce guide.