Skip to main content

Test Data

You can test the payment using this information:

Visa / MasterCard​

  • 4508 7500 1574 1019
  • 2223 0000 0000 0007
  • 5453 0100 0000 9553
  • 5123 4500 0000 0008 You should try this number first, as it is the most reliable for testing.

Visa / MasterCard (Card Payments)​

  • CVC/CVV: Required

    • You can use any valid 3-digit value (e.g., 123)
  • Expiry Date:

    • Any future date, year 39 (e.g., 12/39)
  • Cardholder Name:

    • Any valid name

Bank Transfer (Sandbox only)​

Simulates a bank transfer arriving into virtual IBAN issued for a contract, so you can test the full bank transfer flow without moving real money.

Sandbox only

This endpoint is available in the sandbox environment only. It returns 404 in production.

Endpoint​

POST {{BaseUrl}}/apps/api/anb-escrow/test/simulate-payment

Headers

  • Authorization: Bearer {access_token} — the same token used for the contracts API
  • Content-Type: application/json

Request Body​

{
"externalContractId": "CNT-2609-00100021",
"amount": 1057.5,
"currency": "SAR",
"debitAccount": "0108057386290014",
"channel": "SARIE",
"orderingParty": "User name"
}
FieldTypeDescription
externalContractIdstringThe contract to fund. WePay resolves the account to credit
creditAccountstringThe account to credit. Optional when externalContractId is given
amountnumberAmount to transfer
currencystringAlways SAR
debitAccountstringFunded sandbox source account
channelstringTransfer channel
orderingPartystringOrdering party for the transfer

Test Account Details​

Pending sandbox values

The values below are placeholders and will be published once confirmed.

FieldTest ValueNotes
debitAccount0108057386290014Funded sandbox source account
channelSARIEAccepted channel value
orderingPartyUser nameAccepted ordering party value
currencySARConfirmed

Response​

{
"data": {
"paymentId": "2966020",
"sequenceNumber": "4734099856",
"transactionReferenceNumber": "2286540023649853647",
"creditAccount": "0108057386290014",
"debitAccount": "0108057386290014",
"channel": "SARIE",
"amount": 1057.5,
"status": "Processed",
"failureReason": null,
"externalContractId": "CNT-2609-00100021"
},
"message": "",
"status": 200,
"validationErrors": []
}

What to expect​

  1. Create a contract and open the checkout page.
  2. Select Bank Transfer to have account details issued. You will receive the bank_transfer.initiated webhook.
  3. Call simulate-payment with the contract ID and the expected amount.
  4. Once the simulated transfer is delivered, the events you receive depend on the amount you send: Exact amount: payment.completed. The contract moves to Escrow. More than the amount due: contract.payment.overpaid and payment.completed. The contract moves to Escrow, and a refund request is created automatically for the excess. Less than the amount due: contract.payment.underpaid. The contract stays unpaid, and a refund request is created automatically for the amount received. Send a second transfer for the remaining balance to receive refund_request.cancelled and payment.completed. For milestone contracts you receive the milestone.payment.completed, and the milestone status moves to Escrow.

To test mismatch handling, send an amount lower or higher than the expected total and watch for contract.payment.underpaid or contract.payment.overpaid.

See Bank Transfer Events for the full webhook sequence.