{ "opencollection": "1.0.0", "info": { "name": "Momence Public auth member-checkout API", "version": "2.0" }, "request": { "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "/api/v2/auth/authorize", "accessTokenUrl": "/api/v2/auth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "items": [ { "info": { "name": "member-checkout", "type": "folder" }, "items": [ { "info": { "name": "Get compatible memberships", "type": "http" }, "http": { "method": "POST", "url": "https://api.momence.com/api/v2/member/checkout/compatible-memberships", "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "/api/v2/auth/authorize", "accessTokenUrl": "/api/v2/auth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This endpoint will return list of bought memberships potentially compatible with specified checkout cart.\n\n**NOTE**: The endpoint also returns memberships that are incompatible which is indicated by the incompatibility field. This is so you can present user with a reason why the membership is not usable in this case.\n\n| Incompatibility | Description |\n| --- | --- |\n| session-membership-excluded | session is not included in specified membership |\n| session-bought-membership-will-expire | bought m" }, { "info": { "name": "Get prices", "type": "http" }, "http": { "method": "POST", "url": "https://api.momence.com/api/v2/member/checkout/prices", "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "/api/v2/auth/authorize", "accessTokenUrl": "/api/v2/auth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This endpoint should be used before calling checkout to fetch correct prices for every item. The checkout endpoint will reject any request that doesn't contain correct prices even when you're using memberships to pay." }, { "info": { "name": "Perform checkout", "type": "http" }, "http": { "method": "POST", "url": "https://api.momence.com/api/v2/member/checkout", "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "/api/v2/auth/authorize", "accessTokenUrl": "/api/v2/auth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Perform payment for specified items in the checkout cart. The endpoint will return list of purchased items.\n\n**NOTE**: Currently the endpoint only supports buying sessions with membership payment method.\n\n**NOTE:** You should call `/prices` endpoint to fetch correct prices for every item in the cart before calling this endpoint\n\n**NOTE:** You should call `/compatible-memberships` endpoint to fetch list of bought memberships that are potentially compatible with the cart before calling this endpoi" } ] } ], "bundled": true }