UriComponentsBuilder.fromHttpUrl(properties.getUrl())
.path(properties.getSavedPaymentMethodsUri())
.toUriString();
In order for BillingService to communicate with resource tier services, hook points known as "providers" are needed to interact.
Default out-of-box providers are implemented to communicate with Broadleaf resource tier services.
Provider used to retrieve payment methods for a given user. It is used to retrieve up-to-date payment methods against which to bill for a subscription. All methods are retrieved instead of just one to increase chances of billing attempts' success.
The default implementation, ExternalSavedPaymentMethodExecutionProvider, interacts with Broadleaf’s PaymentTransactionServices to retrieve the payment methods.
ExternalSavedPaymentMethodExecutionProviderProperties defines the properties needed to configure ExternalSavedPaymentMethodExecutionProvider.
These include:
broadleaf.billing.savedpaymentmethodprovider.url: The base url for an external payment transaction service.
broadleaf.billing.savedpaymentmethodprovider.saved-payment-methods-uri: The context path for basic CRUD operations on saved payment methods.
broadleaf.billing.savedpaymentmethodprovider.service-client: The service client to use when calling payment transaction services. Default is "billingclient".
broadleaf.billing.savedpaymentmethodprovider.user-id-chunk-size: Sets the number of userIds used in a single request to retrieve saved payment methods.
broadleaf.billing.savedpaymentmethodprovider.page-size: Informs the page size of the request to retrieve saved payment methods.
UriComponentsBuilder.fromHttpUrl(properties.getUrl())
.path(properties.getSavedPaymentMethodsUri())
.toUriString();
Provider used to execute transactions and retrieve their results. It is chiefly used by the Billing Job to process payments. Results lookup is useful to recover from some payment failures.
The default implementation, ExternalPaymentTransactionExecutionProvider, interacts with Broadleaf’s PaymentTransactionServices to execute the transactions.
ExternalPaymentTransactionExecutionProviderProperties defines the properties needed to configure ExternalPaymentTransactionExecutionProvider.
These include:
broadleaf.billing.paymenttransactionprovider.url: The base url for an external payment transaction service.
broadleaf.billing.paymenttransactionprovider.saved-payment-methods-uri: The context path for basic CRUD operations on saved payment methods.
broadleaf.billing.paymenttransactionprovider.service-client: The service client to use when calling payment transaction services. Default is "billingclient".
broadleaf.billing.paymenttransactionprovider.authorize-and-capture-uri: The URI path for executing an authorize and capture transaction.
broadleaf.billing.paymenttransactionprovider.saved-payment-method-transaction-result-uri: The URI path for looking up transaction results for a saved payment method.
broadleaf.billing.paymenttransactionprovider.payments-uri: The URI path for basic CRUD operations on payments and basic transaction executions on payments.
broadleaf.billing.paymenttransactionprovider.refund-uri: The URI path for refund transaction executions.
broadleaf.billing.paymenttransactionprovider.refund-result-uri: The URI path for looking up transaction results for a refund.
UriComponentsBuilder.fromHttpUrl(properties.getUrl())
.path(properties.getSavedPaymentMethodsUri())
.path(properties.getSavedPaymentMethodTransactionResultUri())
.toUriString();
Provider to interface with the Catalog Service about Entitlement entities. This is used in the Billing side of the service to retrieve mappings of product information (specifically SKUs) to entitlement codes.
The default implementation, ExternalCatalogEntitlementProvider, is designed to interact with Broadleaf’s Monolith Catalog endpoints to support legacy functionality.
ExternalCatalogEntitlementProviderProperties defines the properties needed to configure ExternalCatalogEntitlementProvider.
These include:
broadleaf.billing.catalogentitlementprovider.catalog-service-url: The base url for an external catalog service.
broadleaf.billing.catalogentitlementprovider.sku-entitlements-mappings-uri: The context path to a Sku-to-Entitlement mappings endpoint.
broadleaf.billing.catalogentitlementprovider.service-client: The service client to use when calling entitlement. Default is "billingclient".
UriComponentsBuilder.fromHttpUrl(properties.getUrl())
.path(properties.getSkuEntitlementMappingsUri())
.toUriString();
Provider to interface with Entitlement entities. This is used in the subscription flows to perform CRUD operations on Entitlements, such as grant and modify them. Separately, it is used to revoke entitlements as well.
The default implementation, ExternalEntitlementProvider, is designed to interact with Broadleaf’s EntitlementServices.
It is responsible for granting entitlements, modifying them, and revoking them as necessary.
ExternalEntitlementProviderProperties defines the properties needed to configure ExternalEntitlementProvider.
These include:
broadleaf.billing.entitlementprovider.url: The base url for an external entitlement service.
broadleaf.billing.entitlementprovider.entitlements-uri: The context path to an entitlements endpoint.
broadleaf.billing.entitlementprovider.revoke-entitlements-uri: The context path to revoking entitlements.
broadleaf.billing.entitlementprovider.service-client: The service client to use when calling entitlement. Default is "billingclient".
UriComponentsBuilder.fromHttpUrl(properties.getUrl())
.path(properties.getEntitlementsUri())
.toUriString();