# Models

## The coreErrorMessage object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}}}]}}}}
```

## The paymentModeRequest object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"paymentModeRequest":{"title":"paymentModeRequest","type":"object","required":["code","provider"],"properties":{"code":{"type":"string","description":"Indicates a code of a given method."},"active":{"type":"boolean","description":"Indicates whether a give mode is active."},"provider":{"allOf":[{"$ref":"#/components/schemas/provider"}],"description":"Indicates which provider should be used."},"configuration":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of configuration values for a particular gateway. Supported and required values for Spreedly: \n* `Spreedly/GatewayToken` - Indicates Spreedly gateway. Valid for `SPREEDLY`, `SPREEDLY_SAFERPAY`.\n* `Spreedly/EnvironmentKey` - Indicates Spreedly environment key. Valid for `SPREEDLY`, `SPREEDLY_SAFERPAY`.\n* `Spreedly/AccessSecret` - Indicates Spreedly access secret. Valid for `SPREEDLY`, `SPREEDLY_SAFERPAY`.\n* `Spreedly/PaymentMethodType` - Indicates payment method type, for example: paypal. Valid for `SPREEDLY`.\n* `Spreedly/RedirectURL` - Indicates a redirect URL where an end user should be redirected when a payment flow is finished. Usually it's a storefront URL. Valid for `SPREEDLY`.\n* `Spreedly/SignatureSecret` - Indicates a signature secret. The value is needed  for an offsite flow, when a confirmation callback is used. Valid for `SPREEDLY`.\n* `Spreedly/SCAProviderToken` - Indicates the Spreedly SCA (Strong Customer Authentication) provider token (3DS credit cart). Valid for `SPREEDLY`.\n* `Spreedly/ReceiverId` - Indicates the Spreedly Receiver identifier. Valid for `SPREEDLY_SAFERPAY`.\n* `Saferpay/BasicAuth` - Base64 encoded username and password of Saferpay account. Valid for `SPREEDLY_SAFERPAY`.\n* `Saferpay/CustomerId` - Saferpay customer ID. Valid for `SPREEDLY_SAFERPAY`.\n* `Saferpay/TerminalId` - Saferpay terminal ID. Valid for `SPREEDLY_SAFERPAY`.\n* `Saferpay/TestEnvironment` - Indicates if the configuration is done for test environment or a production one. If `true` then `https://test.saferpay.com` is used as a destination. Otherwise `https://www.saferpay.com` is used. Valid for `SPREEDLY_SAFERPAY`.\n* `Saferpay/RedirectUrl` - Indicates a redirect URL where an end user should be redirected when a payment flow is finished. Usually it's a storefront URL. Valid for `SPREEDLY_SAFERPAY`.\n* `Unzer/PaymentMethodType` - Indicates a payment method type. Currently supported value is `PAYLATER_INVOICE`. Valid for `UNZER`.\n* `Unzer/PublicKey` - Indicates a Unzer public key. Valid for `UNZER`.\n* `Unzer/PrivateKey` - Indicates a Unzer private key. Valid for `UNZER`.\n* `Unzer/CustomerType` - Indicates a customer type. Currently supported value is `B2C`. Valid for `UNZER`.\n  requestBodies: { }"}}},"provider":{"type":"string","enum":["INVOICE","CASH_ON_DELIVERY","SPREEDLY","SPREEDLY_SAFERPAY","UNZER"]}}}}
```

## The paymentMethodUpdateRequest object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"paymentMethodUpdateRequest":{"title":"paymentMethodUpdateRequest","type":"object","properties":{"active":{"type":"boolean","description":"Indicates whether a give mode is active."},"configuration":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of configuration values for a particular gateway. Supported and required values for Spreedly: \n* `Spreedly/GatewayToken` - Indicates Spreedly gateway. \n* `Spreedly/EnvironmentKey` - Indicates Spreedly environment key.\n* `Spreedly/AccessSecret` - Indicates Spreedly access secret.\n* `Spreedly/PaymentMethodType` - Indicates payment method type, for example: paypal.\n* `Spreedly/RedirectURL` - Indicates a redirect URL where an end user should be redirected when a payment flow is finished. Usually it's a storefront URL.\n* `Spreedly/SignatureSecret` - Indicates a signature secret. The value is needed  for an offsite flow, when a confirmation callback is used.\n* `Spreedly/SCAProviderToken` - Indicates the Spreedly SCA (Strong Customer Authentication) provider token (3DS credit cart).\n  requestBodies: { }"}}}}}}
```

## The provider object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"provider":{"type":"string","enum":["INVOICE","CASH_ON_DELIVERY","SPREEDLY","SPREEDLY_SAFERPAY","UNZER"]}}}}
```

## The paymentModeResponse object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"paymentModeResponse":{"title":"paymentModeResponse","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."},"active":{"type":"boolean","description":"Indicates whether a give mode is active."},"provider":{"allOf":[{"$ref":"#/components/schemas/provider"}],"description":"Indicates which provider should be used."},"configuration":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of configuration values for a particular gateway. Supported and required values for Spreedly: \n* `Spreedly/GatewayToken` - Indicates Spreedly gateway.\n* `Spreedly/EnvironmentKey` - Indicates Spreedly environment key.\n* `Spreedly/AccessSecret` - Indicates Spreedly access secret.\n* `Spreedly/PaymentMethodType` - Indicates payment method type, for example: paypal.\n* `Spreedly/RedirectURL` - Indicates a redirect URL where an end user should be redirected when a payment flow is finished. Usually it's a storefront URL.\n* `Spreedly/SignatureSecret` - Indicates a signature secret. The value is needed  for an offsite flow, when a confirmation callback is used."}}},"provider":{"type":"string","enum":["INVOICE","CASH_ON_DELIVERY","SPREEDLY","SPREEDLY_SAFERPAY","UNZER"]}}}}
```

## The paymentModesResponse object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"paymentModesResponse":{"title":"paymentModesResponse","type":"array","items":{"$ref":"#/components/schemas/paymentModeResponse"}},"paymentModeResponse":{"title":"paymentModeResponse","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."},"active":{"type":"boolean","description":"Indicates whether a give mode is active."},"provider":{"allOf":[{"$ref":"#/components/schemas/provider"}],"description":"Indicates which provider should be used."},"configuration":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of configuration values for a particular gateway. Supported and required values for Spreedly: \n* `Spreedly/GatewayToken` - Indicates Spreedly gateway.\n* `Spreedly/EnvironmentKey` - Indicates Spreedly environment key.\n* `Spreedly/AccessSecret` - Indicates Spreedly access secret.\n* `Spreedly/PaymentMethodType` - Indicates payment method type, for example: paypal.\n* `Spreedly/RedirectURL` - Indicates a redirect URL where an end user should be redirected when a payment flow is finished. Usually it's a storefront URL.\n* `Spreedly/SignatureSecret` - Indicates a signature secret. The value is needed  for an offsite flow, when a confirmation callback is used."}}},"provider":{"type":"string","enum":["INVOICE","CASH_ON_DELIVERY","SPREEDLY","SPREEDLY_SAFERPAY","UNZER"]}}}}
```

## The paymentModeFrontendResponse object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}}}
```

## The paymentModesFrontendResponse object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"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."}}}}}}
```

## The initializePaymentRequest object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"initializePaymentRequest":{"title":"initializePaymentRequest","type":"object","properties":{"order":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of an order for which the payment should be authorized."}}},"paymentModeId":{"type":"string","description":"Identifier of a payment mode configured in the payment-gateway service for a given tenant."},"creditCardToken":{"type":"string","description":"Indicates a payment method token, usually generated on a frontend site, when an user provides a credit card information."}}}}}}
```

## The authorizeFrontendPaymentRequest object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"authorizeFrontendPaymentRequest":{"title":"authorizeFrontendPaymentRequest","allOf":[{"$ref":"#/components/schemas/initializePaymentRequest"},{"type":"object","properties":{"threeDSToken":{"type":"string","description":"Contains a token generated during the 3DS authentication process."},"browserInfo":{"type":"string","description":"Holds information related to the user's web browser."},"clientIP":{"type":"string","description":"Stores the IP address of the client or user making the request."}}}]},"initializePaymentRequest":{"title":"initializePaymentRequest","type":"object","properties":{"order":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of an order for which the payment should be authorized."}}},"paymentModeId":{"type":"string","description":"Identifier of a payment mode configured in the payment-gateway service for a given tenant."},"creditCardToken":{"type":"string","description":"Indicates a payment method token, usually generated on a frontend site, when an user provides a credit card information."}}}}}}
```

## The authorizePaymentRequest object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"authorizePaymentRequest":{"title":"authorizePaymentRequest","allOf":[{"$ref":"#/components/schemas/authorizeFrontendPaymentRequest"},{"type":"object","properties":{"amountToAuthorize":{"type":"number","description":"Amount that should be authorized."},"currency":{"type":"string","description":"Currency for the amount that should be authorized."}}}]},"authorizeFrontendPaymentRequest":{"title":"authorizeFrontendPaymentRequest","allOf":[{"$ref":"#/components/schemas/initializePaymentRequest"},{"type":"object","properties":{"threeDSToken":{"type":"string","description":"Contains a token generated during the 3DS authentication process."},"browserInfo":{"type":"string","description":"Holds information related to the user's web browser."},"clientIP":{"type":"string","description":"Stores the IP address of the client or user making the request."}}}]},"initializePaymentRequest":{"title":"initializePaymentRequest","type":"object","properties":{"order":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of an order for which the payment should be authorized."}}},"paymentModeId":{"type":"string","description":"Identifier of a payment mode configured in the payment-gateway service for a given tenant."},"creditCardToken":{"type":"string","description":"Indicates a payment method token, usually generated on a frontend site, when an user provides a credit card information."}}}}}}
```

## The initializePaymentResponse object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"initializePaymentResponse":{"title":"initializePaymentResponse","type":"object","properties":{"successful":{"type":"boolean","description":"Indicates if the authorization process finished with success."},"paymentTransactionId":{"type":"string","description":"Unique payment transaction identifier. "},"authorizationToken":{"type":"string","description":"Authorization token"},"externalPaymentRedirectURL":{"type":"string","description":"Indicates a URL address where a user should be redirected in order to finish the authorization process."},"externalPaymentHttpMethod":{"type":"string","description":"Indicates a HTTP Method which should be used in order to finish the authorization process."},"externalPaymentParameters":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of additional parameters that may be needed in order to complete the authorization flow. "}}}}}}
```

## The authorizePaymentResponse object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"authorizePaymentResponse":{"title":"authorizePaymentResponse","allOf":[{"$ref":"#/components/schemas/initializePaymentResponse"},{"type":"object","properties":{"requiresExternalPayment":{"type":"boolean","description":"Indicates if a redirect to an external site is required in order to finish the authorization flow."}}}]},"initializePaymentResponse":{"title":"initializePaymentResponse","type":"object","properties":{"successful":{"type":"boolean","description":"Indicates if the authorization process finished with success."},"paymentTransactionId":{"type":"string","description":"Unique payment transaction identifier. "},"authorizationToken":{"type":"string","description":"Authorization token"},"externalPaymentRedirectURL":{"type":"string","description":"Indicates a URL address where a user should be redirected in order to finish the authorization process."},"externalPaymentHttpMethod":{"type":"string","description":"Indicates a HTTP Method which should be used in order to finish the authorization process."},"externalPaymentParameters":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of additional parameters that may be needed in order to complete the authorization flow. "}}}}}}
```

## The captureRequest object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"captureRequest":{"title":"captureRequest","type":"object","properties":{"amount":{"type":"number","description":"Amount that should be captured. The amount should not be greater than amount that was authorized."},"currency":{"type":"string","description":"Currency for the amount that should be captured."}}}}}}
```

## The commonPaymentResponse object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"commonPaymentResponse":{"title":"commonPaymentResponse","type":"object","properties":{"successful":{"type":"boolean","description":"Indicates if the operation finished with success or not."},"message":{"type":"string","description":"In case of failed operation, the field provides error details."}}}}}}
```

## The refundRequest object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"refundRequest":{"title":"refundRequest","type":"object","properties":{"amount":{"type":"number","description":"Amount that should be refunded. The amount should not be greater than amount that was captured."},"currency":{"type":"string","description":"Currency for the amount that should be refunded."},"captureId":{"type":"string","description":"Capture identifier. The value is mandatory only if there were more captures for a payment and the refund should be related to a specific capture. In another case the value can be skipped and the capture related to the payment will be chosen automatically."}}}}}}
```

## The paymentTransactionResponse object

```json
{"openapi":"3.0.0","info":{"title":"Payment-Gateway Service","version":"0.0.1"},"components":{"schemas":{"paymentTransactionResponse":{"title":"paymentTransactionResponse","type":"object","properties":{"id":{"type":"string","description":"A unique identifier of a payment transaction."},"provider":{"$ref":"#/components/schemas/provider","description":"Indicates which provider should be used."},"paymentInformation":{"type":"object","description":"Information related to a payment mode.","properties":{"paymentMode":{"type":"string","description":"A unique identifier of a payment mode configured for the tenant."},"creditCardToken":{"type":"string","description":"Token of the credit card."},"cardHolderName":{"type":"string","description":"Name of the card holder."},"payByLinkURL":{"type":"string","description":"URL for pay-by-link payment flow."},"iban":{"type":"string","description":"International Bank Account Number."},"bic":{"type":"string","description":"Bank Identifier Code (SWIFT)."},"sepaMandateReference":{"type":"string","description":"SEPA mandate reference."}}},"entries":{"type":"array","description":"List of transaction entries representing payment events.","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of a payment transaction entry."},"createdDate":{"type":"string","format":"date-time","description":"Timestamp when the event happened."},"type":{"type":"string","description":"Event type.","enum":["INITIALIZATION","AUTHORIZATION","CAPTURE","REFUND","CANCEL","AUTHORIZATION_START","AUTHORIZATION_CALLBACK"]},"successful":{"type":"boolean","description":"Indicates if the event completed successfully."},"amount":{"type":"object","properties":{"amount":{"type":"number","description":"Amount related to the event."},"currency":{"type":"string","description":"ISO currency code."}}},"summary":{"type":"string","description":"Summary of the event."},"remoteRequest":{"type":"string","description":"Serialized request body sent to payment provider."},"remoteResponse":{"type":"string","description":"Serialized response body from payment provider."},"remoteToken":{"type":"string","description":"Remote token returned by payment provider."},"additionalInfo":{"type":"object","description":"Additional info about the transaction.","additionalProperties":true}}}}}},"provider":{"type":"string","enum":["INVOICE","CASH_ON_DELIVERY","SPREEDLY","SPREEDLY_SAFERPAY","UNZER"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references-1/readme/api-reference-24/models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
