# Payment mode   frontend

## Retrieving all the payment modes

> Retrieves a list of configured payment modes for a given tenant with publicly available properties (excluding all secrets, signatures etc). \
> The endpoint should be used by a frontend application to fetch all the possible payment methods configured for a particular tenant. \
> No scope is required.<br>

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"tags":[{"name":"Payment mode - frontend"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"payment-gateway.paymentmodes_read":"Needed for reading payment modes by a tenant employee.","payment-gateway.paymentmodes_manage":"Needed to manage payment modes by a tenant employee.","payment-gateway.authorize_manage":"Needed to perform a payment authorization flow by a tenant employee.","payment-gateway.capture_manage":"Needed to perform a payment capture flow by a tenant employee.","payment-gateway.refund_manage":"Needed to perform a payment refund flow by a tenant employee.","payment-gateway.cancel_manage":"Needed to perform a payment cancel flow by a tenant employee.","payment-gateway.paymenttransactions_read":"Needed to read all transaction details by a tenant employee."}}}}},"responses":{"paymentModesStorefrontResponse":{"description":"Payment modes configured in the payment-gateway service for a given tenant that returns only properties publicly available. ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentModesFrontendResponse"}}}},"common_response_Unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}}},"schemas":{"paymentModesFrontendResponse":{"title":"paymentModesFrontendResponse","type":"array","items":{"$ref":"#/components/schemas/paymentModeFrontendResponse"}},"paymentModeFrontendResponse":{"title":"paymentModeFrontendResponse","type":"object","properties":{"id":{"type":"string","description":"Indicates an autogenerated identifier of a given payment method."},"code":{"type":"string","description":"Indicates a code of a given method."},"integrationType":{"type":"string","enum":["OFFSITE","EXTERNAL","SEPA","TOKENIZED"],"description":"Indicates a type of the mode integration."},"paymentMethodType":{"type":"string","description":"The field is specific for the Spreedly integration. Example values: credit_card, sprel, paypal."},"environmentKey":{"type":"string","description":"The field is specific for the Spreedly integration and it indicates a Spreedly environment used for the mode configuration."},"scaProviderToken":{"type":"string","description":"The field is specific for the Spreedly integration. Strong Customer Authentication token."},"javascriptUrl":{"type":"string","description":"The field is specific for the Tokenization integration."},"publicKey":{"type":"string","description":"The field is specific for the Unzer integration."},"threatMetrixId":{"type":"string","description":"The field is specific for the Unzer integration."},"receiverId":{"type":"string","description":"The field is specific for the Saferpay integration."}}}}},"paths":{"/payment-gateway/{tenant}/paymentmodes/frontend":{"get":{"summary":"Retrieving all the payment modes","tags":["Payment mode - frontend"],"responses":{"200":{"$ref":"#/components/responses/paymentModesStorefrontResponse"},"401":{"$ref":"#/components/responses/common_response_Unauthorized_401"}},"operationId":"GET-payment-gateway-list-payment-modes-frontend","description":"Retrieves a list of configured payment modes for a given tenant with publicly available properties (excluding all secrets, signatures etc). \nThe endpoint should be used by a frontend application to fetch all the possible payment methods configured for a particular tenant. \nNo scope is required.\n"}}}}
```

## Retrieving a single payment mode

> Retrieves a single payment mode for a given tenant with publicly available properties (excluding all secrets, signatures etc). \
> The endpoint should be used by a frontend application to fetch a payment method configuration for a particular tenant. \
> No scope is required.<br>

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"tags":[{"name":"Payment mode - frontend"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"payment-gateway.paymentmodes_read":"Needed for reading payment modes by a tenant employee.","payment-gateway.paymentmodes_manage":"Needed to manage payment modes by a tenant employee.","payment-gateway.authorize_manage":"Needed to perform a payment authorization flow by a tenant employee.","payment-gateway.capture_manage":"Needed to perform a payment capture flow by a tenant employee.","payment-gateway.refund_manage":"Needed to perform a payment refund flow by a tenant employee.","payment-gateway.cancel_manage":"Needed to perform a payment cancel flow by a tenant employee.","payment-gateway.paymenttransactions_read":"Needed to read all transaction details by a tenant employee."}}}}},"responses":{"paymentModesStorefrontResponse":{"description":"Payment modes configured in the payment-gateway service for a given tenant that returns only properties publicly available. ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentModesFrontendResponse"}}}},"common_response_Unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"common_response_NotFound_404":{"description":"Not found. The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/coreErrorMessage"}}}}},"schemas":{"paymentModesFrontendResponse":{"title":"paymentModesFrontendResponse","type":"array","items":{"$ref":"#/components/schemas/paymentModeFrontendResponse"}},"paymentModeFrontendResponse":{"title":"paymentModeFrontendResponse","type":"object","properties":{"id":{"type":"string","description":"Indicates an autogenerated identifier of a given payment method."},"code":{"type":"string","description":"Indicates a code of a given method."},"integrationType":{"type":"string","enum":["OFFSITE","EXTERNAL","SEPA","TOKENIZED"],"description":"Indicates a type of the mode integration."},"paymentMethodType":{"type":"string","description":"The field is specific for the Spreedly integration. Example values: credit_card, sprel, paypal."},"environmentKey":{"type":"string","description":"The field is specific for the Spreedly integration and it indicates a Spreedly environment used for the mode configuration."},"scaProviderToken":{"type":"string","description":"The field is specific for the Spreedly integration. Strong Customer Authentication token."},"javascriptUrl":{"type":"string","description":"The field is specific for the Tokenization integration."},"publicKey":{"type":"string","description":"The field is specific for the Unzer integration."},"threatMetrixId":{"type":"string","description":"The field is specific for the Unzer integration."},"receiverId":{"type":"string","description":"The field is specific for the Saferpay integration."}}},"coreErrorMessage":{"anyOf":[{"type":"object","properties":{"code":{"type":"integer","description":"HTTP Status code."},"timestamp":{"type":"string","description":"Indicates a timestamp when the error occurred."},"message":{"type":"string","description":"Error message."}}},{"type":"object","properties":{"type":{"type":"string","description":"HTTP error type."},"status":{"type":"integer","description":"HTTP Status code."},"message":{"type":"string","description":"Error message."},"moreInfo":{"type":"string","description":"URL which additional information."},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","description":"Detailed message."}}}}}}]}}},"paths":{"/payment-gateway/{tenant}/paymentmodes/frontend/{id}":{"get":{"summary":"Retrieving a single payment mode","tags":["Payment mode - frontend"],"responses":{"200":{"$ref":"#/components/responses/paymentModesStorefrontResponse"},"401":{"$ref":"#/components/responses/common_response_Unauthorized_401"},"404":{"$ref":"#/components/responses/common_response_NotFound_404"}},"operationId":"GET-payment-gateway-retrieve-payment-mode-frontend","description":"Retrieves a single payment mode for a given tenant with publicly available properties (excluding all secrets, signatures etc). \nThe endpoint should be used by a frontend application to fetch a payment method configuration for a particular tenant. \nNo scope is required.\n"}}}}
```
