Testing
Use the following test cards and payment methods to test your Payr integration in the Sandbox environment.
Environment Configuration for Testing
Before testing, ensure you're using the sandbox environment URLs.
For Iframe Integration
Use the sandbox iframe URL when creating your iframe:
<iframe
src="https://sandbox.mypayr.co.uk/third-party?token={token}&session_id={session_id}"
width="100%"
height="700"
frameborder="0"
allow="payment"
></iframe>Important: Make sure to call the sandbox API (https://sandbox-api.mypayr.co.uk/thirdparty/user-login/) to get the token and session_id.
For SDK Integration
Configure the SDK to use the sandbox environment:
PAYR.init({
apiBaseUrl: 'https://sandbox-api.mypayr.co.uk',
authToken: tokenFromYourBackend,
container: '#payr-payment-form',
environment: 'sandbox', // Use sandbox for testing
debug: true // Optional: Enable verbose logging
});For complete environment configuration details, see Environments.
Test Cards
Successful Authentication (Frictionless)
These cards complete 3DS authentication without requiring a challenge.
Outcome: authenticated
Visa
4000000000002701
Frictionless authentication
Mastercard
5200000000002235
Frictionless authentication
AMEX
340000000002708
Frictionless authentication
Discover/Diners
6011000000002117
Frictionless authentication
JCB
3338000000000296
Frictionless authentication
CB (Visa)
4000000000004970
Frictionless authentication
CB (Mastercard)
5200000000004801
Frictionless authentication
Successful Authentication (Challenged)
These cards trigger a 3DS challenge during authentication. The customer will be prompted to complete the challenge successfully.
Outcome: authenticated (after successful challenge)
Visa
4000000000002503
Challenge required
Mastercard
5200000000002151
Challenge required
AMEX
340000000002534
Challenge required
Discover/Diners
6011000000002265
Challenge required
JCB
3338000000000569
Challenge required
CB (Visa)
4000000000004855
Challenge required
CB (Mastercard)
5200000000004074
Challenge required
Additional Card Details
When testing with the cards above, you can use the following details:
CVV: Any 3 digits (e.g.,
123), or 4 digits for AMEX cards (e.g.,1234)Expiry Date: Any future date (e.g.,
12/25)Cardholder Name: Any name
Alternative Payment Methods
Alipay & UnionPay
For Alipay and UnionPay testing:
Proceed with the payment flow as normal
You will be redirected to a test authorization screen
Mark the payment as "Authorized" on the redirect screen
This will simulate a successful transaction
WeChat Pay
For WeChat Pay testing:
Proceed with the payment flow as normal
Wait for 15 seconds
The payment status will automatically change to "Authorized"
This simulates a successful WeChat Pay transaction
Note: No manual action is required for WeChat Pay - the authorization happens automatically after 15 seconds.
Wallet Payments
Apple Pay
Sandbox Environment:
Use Safari on macOS or iOS device
Set up a Sandbox Apple ID in Settings
Add test cards to Wallet
Test on
https://localhostor your staging domain (after domain verification)
Production Environment:
Use real Apple ID with real cards
Test on your production domain (after domain verification)
For Apple Pay setup and domain verification, see Wallet Payments.
Google Pay
Sandbox Environment:
SDK automatically uses Google Pay TEST environment when
environment: 'sandbox'is setUse test card numbers in Google Pay
Available on Chrome desktop and Android
Production Environment:
SDK automatically uses Google Pay PRODUCTION environment when
environment: 'production'is setReal cards required
For Google Pay setup, see Wallet Payments.
Webhooks in Sandbox
When testing in the Sandbox environment, webhooks will be sent to your configured endpoint with the following events:
payment_success- Payment was completed successfullypayment_failed- Payment was declined or failedpayment_pending- Payment is awaiting confirmation
Make sure your webhook endpoint is configured in the Sandbox environment to receive test notifications.
Need Help?
If you encounter any issues during testing, contact support@mypayr.co.uk.
Last updated

