ProBuy Logo
PB

ProBuy Docs

Version 1.0

Testing Cards and Test Data

Use these test cards and customer data to thoroughly test your ProBuy integration in the sandbox environment. Test various approval and decline scenarios before going live.

Sandbox Environment Access

Development Environment

Supplier Portal

https://probuysupplierportaldev.z1.web.core.windows.net

API Base URL

https://devapi.probuy.dev

Getting Test API Token

1. Log in to the Supplier Portal (development)
2. Navigate to Integrations → API Tokens
3. Click "Create New Token"
4. Copy the token immediately (shown only once)

Approved Payment Test Cards

Use these cards to simulate successful payment approvals and various installment scenarios:

Card NumberScenarioResult
4111 1111 1111 1111Standard 3-installment approvalApproved
5555 5555 5555 44444-installment approvalApproved
3782 822463 100056-installment approvalApproved
6011 1111 1111 1117Instant approval (no verification delay)Approved
3056 9300 0902 0004Delayed approval (5 seconds)Approved

Declined Payment Test Cards

Test how your integration handles various decline scenarios:

Card NumberDecline ReasonResult
4000 0000 0000 0002Insufficient credit limitDeclined
4000 0000 0000 0010Card expiredDeclined
4000 0000 0000 0028Invalid CVVDeclined
4000 0000 0000 0036Fraud suspicionDeclined
4000 0000 0000 0044Do not honorDeclined
4000 0000 0000 0069Account not eligibleDeclined

Card Details for Testing

Use these standardized values for all test cards:

Expiration Date

  • Any future date: Use any month/year in the future (e.g., 12/28)
  • Expired card test: Use 01/20 for expired card scenario

CVV / CVC

  • Valid CVV: Any 3 digits (e.g., 123, 456, 789)
  • Amex CVV: Any 4 digits (e.g., 1234)
  • Invalid CVV test: Use 000 for CVV decline

Test Customer Data

Saudi Arabia (SA) Test Customers

Approved Customer

Email: [email protected]

First Name: Ahmed

Last Name: Al-Saud

Phone: +966501234567

National ID: 1234567890

Credit Limit: 50,000 SAR

Low Credit Customer

Email: [email protected]

First Name: Fahad

Last Name: Al-Qarni

Phone: +966507654321

National ID: 9876543210

Credit Limit: 500 SAR

Declined Customer

Email: [email protected]

First Name: Khalid

Last Name: Al-Mutairi

Phone: +966551234567

National ID: 5555555555

Status: Not eligible

United Arab Emirates (AE) Test Customers

Approved Customer

Email: [email protected]

First Name: Mohammed

Last Name: Al-Maktoum

Phone: +971501234567

Emirates ID: 784-1990-1234567-8

Credit Limit: 200,000 AED

High Value Customer

Email: [email protected]

First Name: Sultan

Last Name: Al-Nahyan

Phone: +971509876543

Emirates ID: 784-1985-7654321-9

Credit Limit: 500,000 AED

United States (US) Test Customers

Approved Customer

Email: [email protected]

First Name: John

Last Name: Smith

Phone: +14155551234

SSN: 123-45-6789

Credit Limit: $10,000 USD

Test Address Data

Saudi Arabia Addresses

{
"billingAddress": {
"line1": "123 King Fahd Road",
"line2": "Building 5, Apt 301",
"city": "Riyadh",
"state": "Riyadh Province",
"postalCode": "12345",
"countryCode": "SA"
},
"shippingAddress": {
"line1": "456 Olaya Street",
"line2": "Tower B, Office 1502",
"city": "Riyadh",
"state": "Riyadh Province",
"postalCode": "11564",
"countryCode": "SA"
}
}

UAE Addresses

{
"billingAddress": {
"line1": "789 Sheikh Zayed Road",
"line2": "Villa 12",
"city": "Dubai",
"state": "Dubai",
"postalCode": "00000",
"countryCode": "AE"
},
"shippingAddress": {
"line1": "321 Corniche Road",
"line2": "Marina Tower, Floor 45",
"city": "Abu Dhabi",
"state": "Abu Dhabi",
"postalCode": "00000",
"countryCode": "AE"
}
}

Test Order Amounts

Test various order amounts to verify installment calculations and eligibility:

Amount (SAR)Installment OptionsTest Purpose
300.003 installments onlyMinimum eligible amount
1,500.003, 4, or 6 installmentsStandard order amount
5,000.003, 4, 6, or 12 installmentsHigh-value order
50,000.00All options availableMaximum test amount
100.00None (too low)Below minimum threshold

Complete Test Checkout Example

Here's a complete example with test data for creating a checkout:

{
"orderReferenceId": "TEST-ORD-1234567890",
"orderNumber": "TEST-ORDER-12345",
"currency": "SAR",
"totalAmount": 1500.00,
"taxAmount": 225.00,
"shippingAmount": 0.00,
"discountAmount": 0.00,
"consumer": {
"email": "[email protected]",
"firstName": "Ahmed",
"lastName": "Al-Saud",
"phoneNumber": "+966501234567"
},
"billingAddress": {
"line1": "123 King Fahd Road",
"line2": "Building 5, Apt 301",
"city": "Riyadh",
"state": "Riyadh Province",
"postalCode": "12345",
"countryCode": "SA"
},
"shippingAddress": {
"line1": "123 King Fahd Road",
"line2": "Building 5, Apt 301",
"city": "Riyadh",
"state": "Riyadh Province",
"postalCode": "12345",
"countryCode": "SA"
},
"items": [
{
"name": "Test Product 1",
"description": "Premium test item",
"sku": "TEST-SKU-001",
"quantity": 2,
"unitPrice": 600.00,
"totalAmount": 1200.00,
"imageUrl": "https://via.placeholder.com/300"
},
{
"name": "Test Product 2",
"sku": "TEST-SKU-002",
"quantity": 1,
"unitPrice": 300.00,
"totalAmount": 300.00
}
],
"countryCode": "SA",
"locale": "ar-SA",
"merchantUrls": {
"successUrl": "yourapp://payment/success",
"failureUrl": "yourapp://payment/failure",
"cancelUrl": "yourapp://payment/cancel",
"webhookUrl": "https://yourserver.com/webhooks/probuy"
},
"metadata": {
"testMode": "true",
"testScenario": "standard_approval"
}
}

Testing Workflow

1. Test Successful Flow

  • • Use approved test card (4111 1111 1111 1111)
  • • Use approved test customer data
  • • Verify checkout session created successfully
  • • Complete payment in checkout screen
  • • Verify success callback received
  • • Check webhook notification received

2. Test Decline Scenarios

  • • Test each decline reason card
  • • Verify appropriate error messages shown
  • • Confirm failure callback handled correctly
  • • Check that order is not fulfilled

3. Test Edge Cases

  • • Test with minimum order amount (300 SAR)
  • • Test with maximum order amount
  • • Test cancellation flow
  • • Test network timeouts and retries
  • • Test with various installment options

Development Environment Details

Development API Endpoints

API Base URL: https://devapi.probuy.dev

Supplier Portal: https://probuysupplierportaldev.z1.web.core.windows.net

Company Portal: http://localhost:5174 (local development)

Swagger Documentation: https://devapi.probuy.dev/swagger/index.html

Development Environment Limitations

  • • No real money is processed
  • • Webhooks sent to public URLs only (no localhost) - use webhook.site for testing
  • • Rate limits: 100 requests per minute
  • • Test data may be reset periodically
  • • Email notifications disabled (check supplier portal dashboard)

Best Practices

Always Use Unique Order IDs

Use timestamps or UUIDs in test order IDs to avoid conflicts: TEST-ORD-1761990858778

Test All Decline Scenarios

Don't just test successful flows. Ensure your app handles declines gracefully with proper error messages.

Verify Server-Side

Always verify payment status on your backend using the API. Never trust client-side success callbacks alone.

Use Metadata for Tracking

Add metadata to your test checkouts to identify which test scenario they represent.

Next Steps