--- title: "Set up the OCC extension" description: "Set up the SAP Omni Commerce Connect (OCC) extension in the Adyen payments add-on." url: "https://docs.adyen.com/plugins/hybris/set-up-the-occ-extension" source_url: "https://docs.adyen.com/plugins/hybris/set-up-the-occ-extension.md" canonical: "https://docs.adyen.com/plugins/hybris/set-up-the-occ-extension" last_modified: "2019-07-01T14:57:00+02:00" language: "en" --- # Set up the OCC extension Set up the SAP Omni Commerce Connect (OCC) extension in the Adyen payments add-on. The Adyen payments add-on supports SAP Omni Commerce Connect (OCC) V2 through [com.adyen.v6.facades.AdyenCheckoutFacade](https://github.com/Adyen/adyen-hybris/blob/develop/adyenv6core/src/com/adyen/v6/facades/AdyenCheckoutFacade.java). With this integration, you can accept: * [Credit cards](/payment-methods/cards), including [shopper-present recurring payments](/online-payments/tokenization/make-token-payments) and [installments](/payment-methods/cards/credit-card-installments) * [Boleto](/payment-methods/boleto-bancario) The add-on supports the following methods: ### Return the stored cards associated with the shopping cart * OCC controller: `UsersController.getPaymentInfos` * Endpoint: GET `/{USER_ID}/paymentdetails` Internally, this calls the following method: ```js PaymentDetailsListWsDTO getPaymentDetails(String userId) throws IOException, ApiException; ``` ### Receive and store payment details * OCC controller: `CartsController.addPaymentDetails` * Endpoint: POST `/{CART_ID}/paymentdetails` Depending on the payment method, you may need to pass some additional parameters: * **Credit cards**: Encrypted cardholder data. For more information, refer to [Cards](/payment-methods/cards). * **Stored cards**: The `recurringDetailReference`, the `shopperReference`, and the encrypted CVC. For more information, refer to [Tokenization](/online-payments/tokenization). * **Installments**: The number of installments. For more information, refer to [Credit cards](/payment-methods/cards/credit-card-installments). * **Boleto**: The social security number. For more information, refer to [Boleto](/payment-methods/boleto-bancario). For example, to make an installments payment and store credit card details, submit a POST `/{CART_ID}/paymentdetails` request, providing: ```js { "encryptedCardNumber": "adyenjs_0_1_1 ...", "encryptedExpiryMonth": "adyenjs_0_1_1 ...", "encryptedExpiryYear": "adyenjs_0_1_1 ...", "encryptedSecurityCode": "adyenjs_0_1_1 ...", "installments": "10", "saveCardData": true, "accountHolderName": "ABC", "cardNumber": "4111111111111222", "expiryMonth": "03", "expiryYear": "2030", "cardType" : {"code": "visa"}, "adyenPaymentMethod": "adyen_cc", "billingAddress" : { "titleCode": "mr", "firstName": "Joao", "lastName": "Paulo", "line1": "Rua Luiz Fernandes", "town": "SJC", "postalCode": "12236750", "country": {"isocode": "BR"}, "shippingAddress": true, "region" : { "countryIso" : "BR", "isocode": "SP", "name": "Sao Paulo" } } } ``` Internally, this calls the following method: ```js PaymentDetailsWsDTO addPaymentDetails(PaymentDetailsWsDTO paymentDetails, DataMapper dataMapper); ``` ### Place an order using stored payment details After storing payment information using the above methods, you can place an order: * OCC controller: `OrdersController.placeOrder` * Endpoint: POST `/users/{USER_ID}/orders` Internally, this calls the following method: ```js OrderData authorisePayment(CartData cartData) throws Exception; ``` After a successful response from the Adyen API, the system registers the payment response on the cart/order level. It returns an instance of `OrderWSDTO` obtained from `OrderData` of the placed order. For Boleto, the response contains the URL to the PDF, the Base64 encoded data, the expiration date, and the due date. ## Set up the notification extension If you want to receive Adyen webhooks, add the following Adyen extension to the **config/localextensions.xml** file: ```xml ``` After you have added the notification extension, [set up webhooks in your Adyen Customer Area](/plugins/hybris/set-up-the-add-on#server-notification-settings). ## Next steps [required](/development-resources/test-cards-and-credentials/test-card-numbers) [Test your integration](/development-resources/test-cards-and-credentials/test-card-numbers) [Use our test card numbers to make test payments.](/development-resources/test-cards-and-credentials/test-card-numbers) [required](/plugins/hybris/go-live-checklist) [Configure your live account](/plugins/hybris/go-live-checklist) [Follow this checklist before you start accepting live payments.](/plugins/hybris/go-live-checklist)