# SAP Open Payment Framework
SAP Open Payment Framework is a service included in your SAP Commerce Cloud version 2 (CCV2) subscription. It enables you to integrate your preferred digital payment service providers (PSPs), without having to code, integrate, and deploy extensions to the commerce codebase.
---
## Supported features
- Integration using Flow supports all available card schemes.
- Post-purchase operations include void, capture, and refund.
- You receive webhooks for asynchronous confirmations.
---
## Before you start
Before you configure Checkout.com on your Open Payment Framework workbench, you must create a public and private key.
### Create a public API key
1. Sign in to the sandbox environment in the [Dashboard](https://dashboard.checkout.com).
2. Select _Developers_ in the left navigation bar and open the _Keys_ tab.
3. Select _Create a new key_.
4. Under _Type of key_, select _Public API key_.
5. Enter a description for the API key to help you identify what it's used for.
6. Select _Create key_.
7. Copy your public API key. You need to use it to configure the plugin.
> **Information**
>
> You can view your public API key in the Dashboard at any time.
### Create a secret API key
1. Sign in to the sandbox environment in the [Dashboard](https://dashboard.sandbox.checkout.com/).
2. Select _Developers_ in the left navigation bar and open the _Keys_ tab.
3. Select _Create a new key_.
4. Under _Type of key_, select _Secret API key_.
5. Enter a description for the API key to help you identify what it's used for.
6. Under _Scopes_, select _Default_.
7. Select the processing channel you want to use to process Open Payment Framework payments from the list.
8. Select _Create key_.
9. Copy your private API key securely. You need to use it to configure the plugin.
> **Note**
>
> For security reasons, you cannot view the private API key again after you've left the _Create a new key_ page. Ensure you copy the value securely before you exit or close the window.
The signature key and authorization header key are generated when you create a webhook for your business.
### Required SAP Commerce Cloud configuration
- You must provision the SAP identity authentication service (IAS) tenant.
- Use CCV2 subscription version `2211.35` or higher.
- Use Composable Storefront version `2211.35` or higher.
You cannot provision the SAP Open Payment Framework only in the Stage environment for testing. You must also provision at least one Dev environment.
---
## Configure the integration
To configure your Checkout.com integration with SAP Open Payment Framework, follow these steps:
1. Create a Checkout.com payment integration using your Open Payment Framework workbench.
2. Configure webhooks.
3. Create a Postman environment to connect to your workbench.
4. Add the required domains to the allowlist in your workbench.
### Create a payment integration
Follow the instructions at SAP – [Creating Payment Integration](https://help.sap.com/docs/OPEN_PAYMENT_FRAMEWORK/3580ff1b17144b8780c055bbb7c2bed3/20a64f954df1425391757759011e7e6b.html) to create a checkout.com payment integration in the Open Payment Framework workbench.
After creating the payment integration, under _General information_, copy the value in the _Notification URL_ field. You need to use this to configure your webhooks.
### Configure webhooks
Checkout.com communicates status updates for your payments through webhooks. To configure your SAP endpoint to receive webhooks:
1. Sign in to the [Dashboard](https://dashboard.checkout.com).
2. Select _Developers_ in the left navigation bar and open the _Webhooks_ tab.
3. Select _Create configuration_.
4. Enter a name for your webhook.
5. In the _Endpoint URL_ field, enter the _Notification URL_ from your Open Payment Framework workbench.
6. Under _Events_, select all the event checkboxes.
7. Under _Entities and processing channels_, select _All entities and processing channels_.
8. Select _Create webhook_.
### Configure a Postman environment
Create a new Postman environment to connect to your Open Payment Framework workbench:
1. Follow the instructions at Postman – [Crete an environment](https://learning.postman.com/docs/sending-requests/variables/managing-environments/#create-an-environment) to create a new environment.
2. Create the following variables, and set them to the specified values:
| Variable | Value |
| --- | --- |
| `token` | Follow the instructions at SAP – [Creating an external app](https://help.sap.com/docs/OPEN_PAYMENT_FRAMEWORK/8ccca5bb539a49258e924b467ee4e1c2/d927d21974fe4b368e063f72733bf0fe.html) and [Making authorized API calls](https://help.sap.com/docs/OPEN_PAYMENT_FRAMEWORK/8ccca5bb539a49258e924b467ee4e1c2/40c792e66e2942209dc853a43533d78d.html) to generate a JSON Web Token (JWT). Use the `access_token` value of your SAP external app.
Pass this value in the `Authorization` header as `Bearer `. |
| `root URL` | The BASE URL of your Open Payment Framework tenant. For example, if your workbench cockpit URL is:
`https://opf-iss-d0.uis.commerce.stage.context.cloud.sap/opf-workbench`
Then the root URL is:
`https://opf-iss-d0.uis.commerce.stage.context.cloud.sap`. |
| `accountGroupId` and `accountId` | These values identify the payment integration and payment configuration. You can find them as `integrationId` and `configurationId` in the top-left section of the _Configuration Details_ page in your Open Payment Framework workbench. Map these values as follows:
- `integrationId` – `accountGroupId`
- `configurationId` – `accountId` |
| `authentication_outbound_api_key_value_export_172` | The secret API key you created in the Checkout.com Dashboard.
- For sandbox, this value starts with `sk_sbox...`.
- For production, this value starts with `sk_...`. |
| `API key` | The public API key you created in the Checkout.com Dashboard.
- For sandbox, this value starts with `pk_sbox...`.
- For production, this value starts with `pk_...`. |
| `processing_channel_id` | The ID of the processing channel you selected when creating your API keys. |
| `authentication_inbound_hmac_signature_calculation_secret_export_177` | The webhook signature key generated when you created the webhook in the Checkout.com Dashboard. |
### Configure domain allowlist
Follow the instructions at SAP – [Adding Tenant-specific Domain to Allowlist](https://help.sap.com/docs/OPEN_PAYMENT_FRAMEWORK/3580ff1b17144b8780c055bbb7c2bed3/a6836485b4494cfaad4033b4ee7a9c64.html) to add the following domains:
- `api.sandbox.checkout.com` for sandbox
- `api.checkout.com` for production