Testing

Network User (Existing User MFA Scenario)

In order to test the /confirmUser endpoint, the scenario where you're creating a user that already exists in the Aeropay ecosystem, you'll need to unverify a user you've already created in sandbox. You can do so by using the DELETE /userMerchantVerification endpoint, which unverifies a user at your merchant.

Once unverified, you can proceed with calling POST /user (X-API-Version 1.1) with that user's details to test the /confirmUser flow.

Example Request

curl --request DELETE \
     --url https://api.sandbox-pay.aero.inc/userMerchantVerification \
     --header 'Content-Type: application/json' \
     --header 'accept: application/json' \
     --header 'authorizationToken: Bearer {{merchant token}}' \
     --data '
{
    "userId": "12973",
    "merchantId": "1522"
}
'

Example Response

{
    "success": true,
    "error": null,
    "message": "Success! User is unverified. You can re-authenticate this user.",
    "userId": "12973"
}

Rejected Transaction Scenarios

You may use the following key words when creating transactions in our sandbox environment to simulate a rejected transaction. To run an Exception Scenario transaction, run a regular POST /transaction with an extra ‘exceptionScenario’ value in the body. The transaction will produce the desired output exactly as it would happen if the transaction hit that error through its regular execution.

exceptionScenarioUse Case
delinquentTriggers an AP109 error code, invoked when a user has been rejected by Aeropay, likely due to outstanding declined payments or a bad bank account.
riskEngineTriggers an AP307 error code, invoked when our risk engine rejected a payment.
balanceInsufficientTriggers an AP302 error code, invoked when a user does not have sufficient funds to cover the payment total.

Example request

{
    "amount" : "5.00",
    "merchantId" : "931",
    "exceptionScenario": "delinquent"
}

Example response

{
    "success": false,
    "code": "AP109",
    "error": "We've detected delinquent activity on your account. Reach out to [email protected] to reactivate your account."
}