What PAYSTRAX Handles
With COPYandPAY, PAYSTRAX manages the complex parts so you can focus on your business.
- Apple Pay certificates
- Apple Merchant ID
- Payment token encryption and decryption
- Domain registration in BIP
- PCI DSS compliance scope
- Google Pay gateway integration
How It Works
COPYandPAY follows a simple three-step flow. Your server creates a checkout session, the widget handles the payment UI, and your server retrieves the result.
Step 1
Server creates checkout
Step 2
Widget loads on page
Step 3
Get payment status
Create a Checkout Session
Server-side – POST /v1/checkouts
Your server sends a POST request to /v1/checkouts with the amount, currency, and payment type. The response contains a checkoutId that you pass to the widget on your front end.
For the full server-side implementation (authentication, request format, and response handling), follow the COPYandPAY integration guide.
Load the Payment Widget
Client-side – embed the widget script with your checkoutId
On your checkout page, configure wpwlOptions for Apple Pay and Google Pay, then load the widget script with your checkoutId. The widget renders the payment buttons automatically. See the Widget Configuration section below for the exact code.
Get the Payment Status
Server-side – GET /v1/checkouts/{checkoutId}/payment
After the customer completes the payment, the widget redirects to your shopperResultUrl. Your server then sends a GET request to /v1/checkouts/{checkoutId}/payment to retrieve the final result. Check result.code for the outcome.
Full details on result codes: Result Codes Reference.
Apple Pay Setup
Request Domain Verification File
PAYSTRAX provides the file – no Apple account needed
Contact PAYSTRAX to receive the Apple Pay domain verification file. The file is named apple-developer-merchantid-domain-association. We will either send it to you directly or provide a download link.
Host the Verification File
Place the file at the required URL on your domain
Host the file so it is accessible at:https://[your-domain]/.well-known/apple-developer-merchantid-domain-association
Configure your web server to serve the file with the correct MIME type:
# Serve the Apple Pay verification file correctly
<Files "apple-developer-merchantid-domain-association">
ForceType application/octet-stream
</Files>location /.well-known/apple-developer-merchantid-domain-association {
default_type application/octet-stream;
}Send Domain to PAYSTRAX
We register it in BIP and Apple verifies your domain
Once the file is hosted, send your domain name (e.g. checkout.yourstore.com) to PAYSTRAX. We will register it in our system and trigger Apple’s domain verification.
Google Pay Setup
Register with Google Pay Business Console
Get your Google Merchant ID
Go to pay.google.com/business/console, create a Business Profile, and register your website domain.
After registration, your Google Merchant ID will be visible in the console. You will need this ID for the widget configuration.
Configure wpwlOptions.googlePay
Add environment and merchant IDs to the widget
See the full Widget Configuration section below for the complete code example.
Request Production Access
Submit your integration for Google review
After testing in TEST mode, request production access from Google through the Google Pay Business Console. Approval typically takes 1-3 business days. Once approved, switch the environment to "PRODUCTION" in your widget configuration.
Widget Configuration
This is the only code you need on your checkout page. Configure wpwlOptions before loading the widget script. Replace the placeholder values with your own identifiers.
<!-- Configure BEFORE loading the widget script -->
<script>
var wpwlOptions = {
locale: "en",
style: "plain",
// Apple Pay configuration
applePay: {
version: 14,
displayName: "Your Store Name",
total: { label: "Your Store" },
checkAvailability: "canMakePayments",
style: {
"button-style": "black",
"button-type": "buy"
}
},
// Google Pay configuration
googlePay: {
environment: "PRODUCTION",
merchantId: "YOUR_GOOGLE_MERCHANT_ID",
gatewayMerchantId: "YOUR_ENTITY_ID",
merchantName: "Your Store Name",
allowedCardNetworks: ["MASTERCARD", "VISA"],
allowedCardAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"],
buttonColor: "black",
buttonType: "buy"
}
};
</script>
<!-- Load the payment widget with your checkoutId -->
<script src="https://eu-prod.oppwa.com/v1/paymentWidgets.js?checkoutId={checkoutId}"></script>
<!-- Payment form - the widget renders inside this element -->
<form action="result.html"
class="paymentWidgets"
data-brands="APPLEPAY GOOGLEPAY VISA MASTER AMEX"></form>Testing
Apple Pay Testing
Use Apple sandbox environment
Set up a sandbox environment following Apple’s sandbox testing guide. You will need a sandbox Apple ID with test cards configured.
Google Pay Testing
Use TEST environment mode
Set environment: "TEST" in wpwlOptions.googlePay. In TEST mode, you can use your own card or Google’s test card suite. No real charges are made.
Quick Reference Checklist
Apple Pay
- Request verification file from PAYSTRAX
- Host at /.well-known/apple-developer-merchantid-domain-association
- Configure MIME type (
application/octet-stream) - Send domain(s) to PAYSTRAX for registration
- Add
APPLEPAYtodata-brands - Configure
wpwlOptions.applePay - Test in Safari with sandbox Apple ID
Google Pay
- Register at pay.google.com/business/console
- Get your Google Merchant ID
- Wait for Google domain approval (1-3 days)
- Configure
environment,merchantId,gatewayMerchantId - Add
GOOGLEPAYtodata-brands - Test with
environment: "TEST" - Request production access from Google
Webhooks
Webhooks notify your server about payment events in real time. PAYSTRAX registers the webhook URL on your behalf – you provide the endpoint.
Setup
Provide your webhook URL and notification email to PAYSTRAX
Send your webhook endpoint URL and a notification email address to PAYSTRAX. We will register the URL in our system so that payment notifications are delivered to your server automatically.
For the full webhook specification (payload format, authentication, and event types), see the Webhooks documentation.
Refunds and Reversals
PAYSTRAX supports both reversals (cancellations) and refunds. The type used depends on when the request is made relative to the daily settlement cut-off.
Timing and Cut-Off
24-hour window ending at 22:30 UTC
Refunds and reversals are initiated through the Backoffice or via the API. For full details, see the Backoffice operations guide.