> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# StripeServiceImpl

> Calling public service methods through the REST API: stripeServiceImpl

<ResponseField name="beanId" type="string">
  The Spring bean identifier containing the service being called.

  stripeServiceImpl
</ResponseField>

<ResponseField name="scope" type="string" default="PROTOTYPE">
  Bean scope. Use PROTOTYPE for service calls.
</ResponseField>

<ResponseField name="functionName" type="string">
  The public service method name shown in the signature below.
</ResponseField>

<ResponseField name="args" type="object[]">
  The method argument array. Each argument is passed as an object with index 0, 1, and so on; the value must match the Java parameter type.
</ResponseField>

## Headers

```http theme={null}
POST /api/v1/bean/request
Content-Type: application/json
Lang-Context: en
Site-Context: my-site
Authorization: Bearer <token>
```

Send `Lang-Context` and `Site-Context` with every request. For protected methods, send the JWT in the `Authorization` header as `Bearer <token>`.

**Access:** ADMIN. **Bearer Token:** conditional for USER/ADMIN.

* GUEST — unauthenticated users; only whitelist services are available.
* USER — authentication is required; methods with USER checks are available.
* ADMIN — full access to public methods of all services.
* If a method checks a role internally, GUEST may receive null.

## Methods

<ResponseField name="init" type="void">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### init

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "init",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="isStripeKeysDefined" type="boolean">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### isStripeKeysDefined

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "isStripeKeysDefined",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="getCurrency" type="String">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getCurrency

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getCurrency",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="createIntent" type="String">
  | Argument              | Type                            | Description                 |
  | --------------------- | ------------------------------- | --------------------------- |
  | `paymentRequestAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### createIntent

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "createIntent",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="retrieveIntent" type="Map<String,Object>">
  | Argument          | Type     | Description                 |
  | ----------------- | -------- | --------------------------- |
  | `paymentIntentId` | `String` | Passed through `args[0].0`. |

  ### retrieveIntent

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "retrieveIntent",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="cancelIntent" type="String">
  | Argument          | Type     | Description                 |
  | ----------------- | -------- | --------------------------- |
  | `paymentIntentId` | `String` | Passed through `args[0].0`. |

  ### cancelIntent

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "cancelIntent",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="refundIntent" type="String">
  | Argument          | Type     | Description                 |
  | ----------------- | -------- | --------------------------- |
  | `paymentIntentId` | `String` | Passed through `args[0].0`. |

  ### refundIntent

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "refundIntent",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="chargeIntent" type="PaymentStatus">
  | Argument          | Type     | Description                 |
  | ----------------- | -------- | --------------------------- |
  | `paymentIntentId` | `String` | Passed through `args[0].0`. |

  ### chargeIntent

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "chargeIntent",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="obtain3DSecureLink" type="String">
  | Argument          | Type     | Description                 |
  | ----------------- | -------- | --------------------------- |
  | `paymentIntentId` | `String` | Passed through `args[0].0`. |

  ### obtain3DSecureLink

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "obtain3DSecureLink",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="changePaymentMethod" type="boolean">
  | Argument          | Type     | Description                 |
  | ----------------- | -------- | --------------------------- |
  | `paymentIntentId` | `String` | Passed through `args[0].0`. |
  | `paymentMethodId` | `String` | Passed through `args[1].1`. |

  ### changePaymentMethod

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "changePaymentMethod",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="chargeSepa" type="String">
  | Argument             | Type                            | Description                 |
  | -------------------- | ------------------------------- | --------------------------- |
  | `chargeRequestAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### chargeSepa

  Example JSON request object:

  ```json theme={null}
  {
      "orderId":  null,
      "paymentMethodId":  null,
      "productId":  null,
      "description":  null,
      "amount":  0,
      "currencyCode":  null,
      "iban":  null,
      "email":  null,
      "name":  null,
      "userName":  null,
      "tariff":  null,
      "number":  null,
      "exp":  null,
      "cvc":  null
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "chargeSepa",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="chargeCreditCard" type="String">
  | Argument             | Type                            | Description                 |
  | -------------------- | ------------------------------- | --------------------------- |
  | `chargeRequestAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### chargeCreditCard

  Example JSON request object:

  ```json theme={null}
  {
      "orderId":  null,
      "paymentMethodId":  null,
      "productId":  null,
      "description":  null,
      "amount":  0,
      "currencyCode":  null,
      "iban":  null,
      "email":  null,
      "name":  null,
      "userName":  null,
      "tariff":  null,
      "number":  null,
      "exp":  null,
      "cvc":  null
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "chargeCreditCard",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="chargeTariffSepa" type="void">
  | Argument             | Type                            | Description                 |
  | -------------------- | ------------------------------- | --------------------------- |
  | `chargeRequestAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### chargeTariffSepa

  Example JSON request object:

  ```json theme={null}
  {
      "orderId":  null,
      "paymentMethodId":  null,
      "productId":  null,
      "description":  null,
      "amount":  0,
      "currencyCode":  null,
      "iban":  null,
      "email":  null,
      "name":  null,
      "userName":  null,
      "tariff":  null,
      "number":  null,
      "exp":  null,
      "cvc":  null
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "chargeTariffSepa",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="chargeTariffCreditCard" type="void">
  | Argument             | Type                            | Description                 |
  | -------------------- | ------------------------------- | --------------------------- |
  | `chargeRequestAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### chargeTariffCreditCard

  Example JSON request object:

  ```json theme={null}
  {
      "orderId":  null,
      "paymentMethodId":  null,
      "productId":  null,
      "description":  null,
      "amount":  0,
      "currencyCode":  null,
      "iban":  null,
      "email":  null,
      "name":  null,
      "userName":  null,
      "tariff":  null,
      "number":  null,
      "exp":  null,
      "cvc":  null
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "chargeTariffCreditCard",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="cancelSubscriptionAfterActivePeriod" type="String">
  | Argument   | Type     | Description                 |
  | ---------- | -------- | --------------------------- |
  | `sellerId` | `String` | Passed through `args[0].0`. |

  ### cancelSubscriptionAfterActivePeriod

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "cancelSubscriptionAfterActivePeriod",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="cancelSubscriptionImmediately" type="String">
  | Argument   | Type     | Description                 |
  | ---------- | -------- | --------------------------- |
  | `sellerId` | `String` | Passed through `args[0].0`. |

  ### cancelSubscriptionImmediately

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "cancelSubscriptionImmediately",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getContractEndDate" type="Map<String, Object>">
  | Argument      | Type     | Description                 |
  | ------------- | -------- | --------------------------- |
  | `createdDate` | `String` | Passed through `args[0].0`. |
  | `pattern`     | `String` | Passed through `args[1].1`. |

  ### getContractEndDate

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getContractEndDate",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getContractEndDateFromTimestamp" type="Map<String, Object>">
  | Argument  | Type     | Description                 |
  | --------- | -------- | --------------------------- |
  | `created` | `String` | Passed through `args[0].0`. |
  | `pattern` | `String` | Passed through `args[1].1`. |

  ### getContractEndDateFromTimestamp

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getContractEndDateFromTimestamp",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="isTariffEquals" type="boolean">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `tariff` | `String` | Passed through `args[0].0`. |

  ### isTariffEquals

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "isTariffEquals",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getAmountByTariff" type="Map<String, String>">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `tariff` | `String` | Passed through `args[0].0`. |

  ### getAmountByTariff

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getAmountByTariff",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="createInvoice" type="Map<String,Object>">
  | Argument  | Type     | Description                 |
  | --------- | -------- | --------------------------- |
  | `orderId` | `String` | Passed through `args[0].0`. |

  ### createInvoice

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "createInvoice",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getInvoices" type="List<Invoice>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getInvoices

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getInvoices",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="getProducts" type="List<Product>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getProducts

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getProducts",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="createCustomer" type="String">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### createCustomer

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "createCustomer",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="deleteCustomer" type="void">
  | Argument   | Type     | Description                 |
  | ---------- | -------- | --------------------------- |
  | `sellerId` | `String` | Passed through `args[0].0`. |

  ### deleteCustomer

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "deleteCustomer",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removePaymentMethod" type="void">
  | Argument          | Type     | Description                 |
  | ----------------- | -------- | --------------------------- |
  | `paymentMethodId` | `String` | Passed through `args[0].0`. |

  ### removePaymentMethod

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removePaymentMethod",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getPaymentMethods" type="List<PaymentMethod>">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `type`   | `String` | Passed through `args[0].0`. |

  ### getPaymentMethods

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getPaymentMethods",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getPaymentMethod" type="Map<String, Object>">
  | Argument          | Type     | Description                 |
  | ----------------- | -------- | --------------------------- |
  | `paymentMethodId` | `String` | Passed through `args[0].0`. |

  ### getPaymentMethod

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getPaymentMethod",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getSubscription" type="Map<String,Object>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getSubscription

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getSubscription",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="calculateTaxRate" type="Map<String, Object>">
  | Argument         | Type     | Description                 |
  | ---------------- | -------- | --------------------------- |
  | `amount`         | `String` | Passed through `args[0].0`. |
  | `countryIsoCode` | `String` | Passed through `args[1].1`. |

  ### calculateTaxRate

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "calculateTaxRate",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="obtainAllTaxRates" type="Map<String, TaxRate>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### obtainAllTaxRates

  ```json theme={null}
  {
    "beanId": "stripeServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "obtainAllTaxRates",
    "args": []
  }
  ```
</ResponseField>
