COPYandPAY FAQ

How long is the checkout.id valid for

The checkout.id expires after 30 minutes.

Does COPYandPAY support 3-D Secure

Yes, the COPYandPAY payment forms has 3-D Secure built in. To activate 3-D Secure, Peach Payments configures the merchant account and a user must enter an enrolled card. Refer to the 3-D Secure Guide for more details.

What languages does the payment form support

By default there are 25: English, German, French, Spanish, Italian, Dutch, Danish, Finnish, Swedish, Turkish, Japanese, Slovenian, Portuguese, Polish, Czech, Hungarian, Bulgarian, Romanian, Russian, Chinese, Greek, Norwegian, Slovak, Arabic, and Korean. But you can change the text value of the labels to anything you choose using the wpwlOptions API.

What happens if a shopper closes their browser

When a shopper closes their browser after selecting a payment method but before completing the payment, they create reconciliation challenges because your platform does not receive the final payment status. To resolve this, Peach Payments calls the shopperResultUrl automatically if no call occurs in 29 minutes. This action enables your platform to request the final status and confirm that the payment was not processed. The gateway also sends a notification to the store, prompting a status check before the checkout ID expires, but after the shopper clicks the Pay Now button in the payment widget.

If you call POST /checkouts/{id}/payment but not GET /checkouts/{id}/payment, Peach Payments sends a GET request to the shopperResultUrl with a resourcePath parameter, prompting you to call GET /checkouts/{id}/payment. The same process applies to /checkouts/{id}/registration.

📘

The baseUrl must end in a /, for example, https://sandbox-card.peachpayments.com/.

Does COPYandPAY support responsive web design

Yes, COPYandPAY supports responsive design.

Which browsers do COPYandPAY support

See the Supported browsers section for more information.

Can I use COPYandPAY as a stand-alone widget

Yes.

Why should I use COPYandPAY and not my own forms

COPYandPAY was the first certified PCI 3 SAQ-A compliant payment form solution available in the market. It offers a variety of versatile features, while being easy to integrate on a web page with two code lines. Multiple use cases are available and supported at the same time. Find further information in the Customisation and Advanced options sections.

COPYandPAY looks nice and simple, but I've got my own shop designs; how can I adapt COPYandPAY to my design

See the Customisation section.

Input fields in the widget generate their own HTML form tag

The COPYandPAY widget might load in an existing form tag (checkout), which is then no longer valid HTML code. Thus the fields are not submitted. Make sure to remove the extra widget and payment via credit card should work.

How can I validate the cardholder name

You can use the below JavaScript in the COPYandPAY customisation:

var wpwlOptions = {
style:"card", 
onBeforeSubmitCard: function(e){ 
var holder = $('.wpwl-control-cardHolder').val(); 
if (holder.trim().length < 2){ 
$('.wpwl-control-cardHolder').addClass('wpwl-has-error').after('<div class="wpwl-hint wpwl-hint-cardHolderError">Invalid card holder</div>'); 
return false; 
} 
return true; 
} 
} 

My payment form needs more information; how can I add my own text, messages, and fields to COPYandPAY

See the Advanced options section.

How do I add CSP for COPYandPAY

The following is an example of the minimum required CSP for COPYandPAY for the live environment.

📘

For sandbox testing, use the https://sandbox-card.peachpayments.com domain name.

<html>
    <head>
        <meta http-equiv="Content-Security-Policy" 
              content="
                       style-src 'self' https://card.peachpayments.com 'unsafe-inline' ;
                       frame-src 'self' https://card.peachpayments.com;
                       script-src 'self' https://card.peachpayments.com 'nonce-${NONCE_ID}' ;
                       connect-src 'self' https://card.peachpayments.com;
                       img-src 'self' https://card.peachpayments.com;
                       ">
                       
        <script src="https://card.peachpayments.com/v1/paymentWidgets.js?checkoutId=${CHECKOUT_ID}"></script>
        <script nonce="${NONCE_ID}">
            var wpwlOptions = {
                style:"card",
            }
        </script>
    </head>
    <body>
        <form action="${SHOPPER_RESULT_URL}"
              data-brands="VISA MASTER"
        ></form>
    </body>
</html>

In case the payment method provides an inline integration (for example, no redirect), to work appropriately, COPYandPAY might require extra resources to load on the page. In that case, you may need to add further domains in addition to those reported above.

As an example, below is the CSP header to load the PayPal inline integration via COPYandPAY:

<html>
    <head>
        <meta http-equiv="Content-Security-Policy" 
              content="
                       style-src 'self' https://card.peachpayments.com 'unsafe-inline' ;
                       frame-src 'self' https://card.peachpayments.com https://*.paypal.com;
                       script-src 'self' https://card.peachpayments.com https://*.paypal.com 'nonce-${NONCE_ID}' ;
                       connect-src 'self' https://card.peachpayments.com https://*.paypal.com;
                       img-src 'self' https://card.peachpayments.com  https://*.paypal.com https://*.paypalobjects.com;
                       ">
                       
        <script src="https://card.peachpayments.com/v1/paymentWidgets.js?checkoutId=${CHECKOUT_ID}"></script>
        <script nonce="${NONCE_ID}">
            var wpwlOptions = {
                inlineFlow: ['PAYPAL'],
                style:"card",
            }
        </script>
    </head>
    <body>
        <form action="${SHOPPER_RESULT_URL}"
              data-brands="VISA MASTER PAYPAL"
        ></form>
    </body>
</html>