commercetools connector settings
Every setting of the Pay.com connector for commercetools, with its default.
The connector's settings are its deployment's configuration in commercetools Connect. Its service, event, and job applications each declare the same configuration. Give them the same values. The payment settings can also be changed in the Pay.com application in the Merchant Center, without a redeploy.
Pay.com account
These settings are secured configuration, which Connect stores encrypted:
| Setting | Description |
|---|---|
PAY_COM_SANDBOX_API_KEY | An sk-pay-com-sandbox- key you created in the Pay.com dashboard. |
PAY_COM_SANDBOX_WEBHOOK_SECRET | The signing secret of the sandbox webhook you added in the Pay.com dashboard, which sends events to the service's /webhooks/pay-com. |
PAY_COM_SANDBOX_WEBHOOK_SECRET_PREVIOUS | While you rotate the sandbox webhook secret, keep the old one here until the new one works, then remove it. |
PAY_COM_LIVE_API_KEY, PAY_COM_LIVE_WEBHOOK_SECRET, PAY_COM_LIVE_WEBHOOK_SECRET_PREVIOUS | The same for live, with an sk-pay-com-live- key. |
The Pay.com application's Connect with Pay.com section shows each environment's account, its key's last characters, and whether Pay.com accepts the key. When the environment PAY_COM_ENVIRONMENT picks has no key, it names the variable to set, for example "PAY_COM_ENVIRONMENT is live, but only a sandbox API key is saved. Enter PAY_COM_LIVE_API_KEY in the deployment's secured configuration, or set PAY_COM_ENVIRONMENT to sandbox." The not_configured error the connector returns to your storefront gives the same reason in its message, with reason set to not_connected, no_sandbox_key, or no_live_key.
Environment
PAY_COM_ENVIRONMENT picks the environment the connector takes payments in:
| Setting | Default | Description |
|---|---|---|
PAY_COM_ENVIRONMENT | sandbox | sandbox takes payments in your Pay.com sandbox with the sandbox key, through https://api.sandbox.pay.com/v1. live takes live payments with the live key, through https://api.pay.com/v1. |
Payment settings
The Pay.com application's Payment settings override these for every application within a minute. Anything not set there follows the deployment's configuration.
| In the Pay.com application | Configuration | Default | Description |
|---|---|---|---|
| Capture | PAY_COM_CAPTURE_MODE | automatic | Capture at once (automatic) charges when the customer pays. Authorize, capture once the order exists (after_order) authorizes, creates the order, then captures. Authorize only; capture on fulfilment or from the order (manual) places an authorization to capture before it expires. |
| Payment form | PAY_COM_PAYMENT_FORM | fields | Card fields and the shop's own method list (fields) shows secure card fields with your storefront's own list of the other payment methods, where the browser component is mounted with fields. Pay.com drop-in (dropin) shows every payment method in Pay.com's Universal checkout. See Checkout. |
| Saved cards for signed-in customers | PAY_COM_SAVED_CARDS | true | Signed-in customers can save cards and pay with them. Cards saved in the sandbox are offered only in the sandbox. With card fields, there's no option to save a card at checkout. A Recurring Order's card is saved without asking, for its later cycles, even with false. It then stays out of the customer's saved cards, even after you turn saved cards on. |
| Express checkout (Apple Pay, Google Pay) on the cart | PAY_COM_EXPRESS_CART | true | Express checkout buttons on the cart and the mini-cart. |
| Express checkout on product pages | PAY_COM_EXPRESS_PRODUCT | true | Express checkout buttons on product pages, which buy that one product. |
| Express checkout at the top of the checkout | PAY_COM_EXPRESS_CHECKOUT | true | Express checkout buttons at the top of the checkout, above the customer's details. The wallet collects the customer's email, addresses, and shipping method, and the order is placed from them, not from the checkout form. |
| Checkout fields the wallet can't fill | PAY_COM_EXPRESS_REQUIRED_FIELDS | Empty | The fields your storefront requires before an order, comma-separated, with custom.<name> for a custom field. Express checkout hides while one is listed that the wallet can't fill. The wallet fills the name, email, addresses, and shipping method. With phone listed, it also asks the customer for a phone number, and an express order without one is refused. On product pages, express checkout also hides for a required custom field of the cart's type. |
| Fields the shop fills itself | PAY_COM_EXPRESS_FILLABLE_FIELDS | Empty | Required fields that get a default or are set by an API Extension, so they don't hide express checkout. With phone listed here, the wallet doesn't ask for a phone number. |
Checkout
With card fields, the card is entered in secure Pay.com fields in your storefront's layout, next to a list of the cart's payment methods. A payment method that requires additional details (such as a BLIK code or bank) shows inputs for them. Payment methods that require unsupported custom fields are omitted from checkout.
The browser component falls back to Pay.com's Universal checkout if card fields aren't available, don't support any of the cart's payment methods, or when your storefront mounts it without fields. A Recurring Order whose first cycle costs nothing also uses Universal checkout.
Your storefront decides whether to display payment methods in one list or as separate options, and whether to list Apple Pay and Google Pay among them. When a customer selects a wallet, its button replaces your place-order button and pays with the details entered at checkout. See Mount the payment form.
Your payment methods
The Pay.com application's Your payment methods lists the payment methods your Pay.com account offers in the environment PAY_COM_ENVIRONMENT picks, and when they were read. When your storefront shows each payment method as an option of its own, each of them gets an option, shown when the cart's Pay.com session offers it. Apple Pay and Google Pay show when your account has them set up and the customer's browser can pay with them.
The connector reads the list once it has the environment's key, then once a day. After you change your methods in the Pay.com dashboard, click Refresh. If a read fails, the last list stays and the section says why. Until the list is first read, the methods other than the card, Apple Pay, and Google Pay are in the other option.
Orders and carts
These settings cover the orders the connector creates and the carts it locks:
| Setting | Default | Description |
|---|---|---|
PAY_COM_MERCHANT_RETURN_URL | Required | Where customers land after paying, unless the commercetools session names merchantReturnUrl. |
PAY_COM_REFERENCE_PREFIX | Empty | Shown in the Pay.com dashboard before the order number. Use a different prefix on each storefront that shares a Pay.com account. |
PAY_COM_ORDER_NUMBER_PREFIX | Empty | The prefix of the order numbers the connector makes, when the commercetools session has no futureOrderNumber. |
PAY_COM_CAPTURE_ON | Shipped,Delivered,Complete | The shipment states, and the order state Complete, that capture an authorized payment. |
PAY_COM_LOCK_CART | true | Locks the cart while it's being paid, which needs the manage_locked_carts scope. |
PAY_COM_PENDING_TIMEOUT_MINUTES | 120 | How long an attached, unpaid cart stays locked before the connector releases it. |
PAY_COM_SESSION_LIMIT | 20 | How many new payment sessions one visitor can start in 15 minutes. |
PAY_COM_ALLOWED_ORIGINS | * | The storefront origins allowed to call the service, comma-separated. |
commercetools
These settings connect the connector to your commercetools project:
| Setting | Default | Description |
|---|---|---|
CTP_PROJECT_KEY | Required | Your commercetools project's key. |
CTP_CLIENT_ID, CTP_CLIENT_SECRET | Required | An API client with manage_payments, manage_orders, manage_customers, view_sessions, manage_locked_carts, manage_key_value_documents, manage_payment_methods, manage_types, manage_states, manage_subscriptions, introspect_oauth_tokens, and view_shipping_methods, and manage_recurring_payment_jobs for Recurring Orders. The secret is secured configuration. |
CTP_AUTH_URL, CTP_API_URL, CTP_SESSION_URL, CTP_CHECKOUT_URL, CTP_CONNECT_URL | The europe-west1.gcp region's | Your project's region's Auth, API, Session, Checkout, and Connect URLs. |
CTP_JWKS_URL, CTP_JWT_ISSUER | The europe-west1.gcp region's | The Merchant Center's JWKS URL and JWT issuer, for the Pay.com application's calls. |
PAY_COM_SERVICE_URL | Empty | The service application's URL. Connect gives the service application its own URL. Set this for the event and job applications. |
PAY_COM_MC_APP_ENTRY_POINT | pay-com | The Pay.com application's entry point, whose View and Manage permissions the connector checks. |
The Pay.com application
These settings are the mc-app application's configuration:
| Setting | Default | Description |
|---|---|---|
CUSTOM_APPLICATION_ID | Required | The ID the Merchant Center gave the Pay.com application when you registered it. |
ENTRY_POINT_URI_PATH | pay-com | The application's entry point. Use the same value as PAY_COM_MC_APP_ENTRY_POINT. |
CLOUD_IDENTIFIER | gcp-eu | Your Merchant Center region (gcp-eu, gcp-us, gcp-au, aws-eu, or aws-us). |
PAY_COM_SERVICE_URL | Required | The connector's service application URL, which the application calls through the Merchant Center's proxy. |
Teams need the application's View permission to see it, and Manage to change settings, refresh your payment methods, register domains, and decide held payments.