# Quotes API: Sandbox Testing source: https://developer.mastercard.com/cross-border-services/documentation/testing/quotes-api/index.md ## Sandbox Testing {#sandbox-testing} You can make API calls to the Sandbox server from your application code using the [tutorials](https://developer.mastercard.com/cross-border-services/documentation/tutorials/index.md), which involves creating a Mastercard Developers project and using the Sandbox keys to generate the required Authorization Header. Tip: During the onboarding process, Mastercard will assign a registered partner ID to test in the higher environments (MTF Test and Production). This partner ID will not be able to access the sandbox environment, but the customer can still access sandbox by using the non-registered partner ID. Any correctly formatted partner ID can be used in the sandbox. As a best practice, use the first 15 digits of your institution's name (alphanumeric and/or special characters, no spaces) as the Partner_ID. For testing in sandbox, please use unique transaction_reference on each run. Note: The sandbox does not return parameters unique to a specific Customer; such as pricing, limits, and corridor-specific data requirements, but allows you to test general call structure and responses outside of the production environment. After sandbox testing is completed, Customers meeting the eligibility requirements will be assigned a project manager to do integrated testing in the test environment that has been configured to include requested receiving corridors, current foreign exchange rates, and fixed and variable fees specific to the Customer. ### Test cases {#test-cases} The Sandbox server returns simulated, static responses. You can use the following test cases to produce specific responses. | Status | Test Case | Action | |--------------------------------------------|-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Success | Forward Quote with fees included | 1. Send Quote using 'transaction_reference' number starting with '08' and Ends with 'ACFQ' 2. Make sure to pass the quoterequest.quote_type.forward object with fees-included =true in the request. | | Success | Forward Quote without sender and recipient account URIs including 2 additional data fields (701 and 7260) | 1. Send Quote using 'transaction_reference' number starting with '08' and Ends with 'AOCFQ' 2. Make sure to pass the quoterequest.quote_type.forward object with fees-included =true in the request. | | Success | Forward Quote with fees not included | 1. Send Quote using 'transaction_reference' number starting with '08' and Ends with 'ACFQ' 2. Make sure to pass the quoterequest.quote_type.forward object with fees-included =false in the request. | | Success | Reverse Quote | 1. Send Quote using 'transaction_reference' number starting with '08' and Ends with 'ACRQ' 2. Make sure to pass the quoterequest.quote_type.reverse object in the request. | | Success | Reverse Quote without sender and recipient account URIs including 2 additional data fields (701 and 7260) | 1. Send Quote using 'transaction_reference' number starting with '08' and Ends with 'AOCRQ' 2. Make sure to pass the quoterequest.quote_type.reverse object in the request. | | Rejected with Specific Error | Quote - responds with specific error code | Send a Quote using 'transaction_reference' number starting with '1' and ending with the desired error code. For example: Transaction reference '1XXXXXXXX130105' will REJECT quote and return 130105 error code in response. | | Rejected - Can be successfully resubmitted | 150001 System Error: Quote is resubmitted successfully | 1. Send a Quote using 'transaction_reference' number starting with '22S' and ends with '501'. For example: Transaction reference '22SXXXXXXXXXX501' will REJECT payment and return 150001 error code in the quote response. 2. Resubmit the initial quote using the same 'transaction_reference' and same input parameters. Transaction will be processed with status "Success." | | Rejected - Resubmitted request rejected | 150001 System Error: Quote is resubmitted with different parameters and rejected | 1. Send a Quote using 'transaction_reference' number starting with starting with '22S' and ends with '501'. For example: Transaction reference '22SXXXXXXXXXX501' will REJECT payment and return 150001 error code in the payment response. 2. Resubmit the quote using the same 'transaction_reference' with different input parameters; like different value for sender_account_uri. Transaction will be rejected with 82000 error code. | | Rejected | Forward Quote without sender and recipient account URIs including 1 additional data field 701 | 1. Send a Quote using 'transaction_reference' number starting with '2' and ending with 092000. For example: Transaction reference '2XXXXXXXX092000' will REJECT quote and return 092000 error code and source "Additional Data-7260-Beneficiary payment instrument" in the response. | ### Sandbox Test cases for Wires {#sandbox-test-cases-for-wires} The Sandbox server returns simulated, static responses. For customers who are interested or enabled to instruct wire transactions, can use the following test cases to produce specific responses. | Status | Test Case | Action | |--------------------------------------------|-----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Success | Forward Quote with fees included for BANKWIRE | 1. Send Quote using 'transaction_reference' number starting with '08' and Ends with 'ACFQ' 2. Make sure to pass the quoterequest.quote_type.forward object with fees-included =true in the request. 3. Provide Additional fields '701' with Recipient country and '7260' with 'BANKWIRE'. | | Success | Forward Quote with fees not included for BANKWIRE | 1. Send Quote using 'transaction_reference' number starting with '08' and Ends with 'ACFQ' 2. Make sure to pass the quoterequest.quote_type.forward object with fees-included =false in the request. 3. Provide Additional fields '701' with Recipient country and '7260' with 'BANKWIRE'. | | Success | reverse Quote for BANKWIRE | 1. Send Quote using 'transaction_reference' number starting with '08' and Ends with 'ACRQ' 2. Make sure to pass the quoterequest.quote_type.reverse object in the request. 3. Provide Additional fields '701' with Recipient country and '7260' with 'BANKWIRE' | | Rejected with Specific Error | Quote - responds with specific error code for BANKWIRE | Send a Quote using 'transaction_reference' number starting with '1' and ending with the desired error code and provide Additional fields '701' with Recipient country and '7260' with 'BANKWIRE'. For example: Transaction reference '1XXXXXXXX130105' will REJECT quote and return 130105 error code in response. | | Rejected - Can be successfully resubmitted | 150001 System Error: Quote is resubmitted successfully for BANKWIRE | 1. Send a Quote using 'transaction_reference' number starting with '22S' and ends with '501' and provide Additional fields '701' with Recipient country and '7260' with 'BANKWIRE'. For example: Transaction reference '22SXXXXXXXXXX501' will REJECT payment and return 150001 error code in the quote response. 2. Resubmit the initial quote using the same 'transaction_reference' and same input parameters. Transaction will be processed with status "Success." | | Rejected - Resubmitted request rejected | 150001 System Error: Quote is resubmitted with different parameters and rejected for BANKWIRE | 1. Send a Quote using 'transaction_reference' number starting with starting with '22S' and ends with '501' and provide Additional fields '701' with Recipient country and '7260' with 'BANKWIRE'. For example: Transaction reference '22SXXXXXXXXXX501' will REJECT payment and return 150001 error code in the payment response. 2. Resubmit the quote using the same 'transaction_reference' with different input parameters; like different value for sender_account_uri. Transaction will be rejected with 82000 error code. | ## Sample Request {#sample-request} ### Request with Sender and Recipient URI fields: {#request-with-sender-and-recipient-uri-fields} * XML * JSON ```XML 07-DXF-CA-UERTYGH2909202wfnvpobv00734_8 tel:+25406005 tel:+254069832 105.65 USD USA P2P GBP ``` ```JSON { "quoterequest": { "transaction_reference": "07-DXF-CA-UERTYGH2909202wfnvpobv00734_8", "sender_account_uri": "tel:+25406005", "recipient_account_uri": "tel:+254069832", "payment_amount": { "amount": "105.15", "currency": "USD" }, "payment_origination_country": "USA", "payment_type": "P2P", "quote_type": { "forward": { "receiver_currency": "GBP" } } } } ``` ### Request without Sender and Recipient Account URI: {#request-without-sender-and-recipient-account-uri} * XML * JSON ```XML 07-DXF-CA-UERTYGH2909202wfnvpobv00734_8 105.65 USD USA P2P GBP 701 USA 7260 CARD ``` ```JSON { "quoterequest": { "transaction_reference": "07-DXF-CA-UERTYGH2909202wfnvpobv00734_8", "payment_amount": { "amount": "105.15", "currency": "USD" }, "payment_origination_country": "USA", "payment_type": "P2P", "quote_type": { "forward": { "receiver_currency": "GBP" } }, "additional_data": { "data_field": [ { "name": "701", "value": "USA" }, { "name": "7260", "value": "CARD" } ] } } } ``` ### Request for BANKWIRE: {#request-for-bankwire} * XML * JSON ```XML 07-DXF-CA-UERTYGH2909202wfnvpobv00734_8 tel:+25406005 ban:45678993;bic=UNBECNSHXXX 105.65 USD USA P2P USD 701 CHN 7260 BANKWIRE ``` ```JSON { "quoterequest": { "transaction_reference": "07-DXF-CA-UERTYGH2909202wfnvpobv00734_8", "sender_account_uri": "tel:+25406005", "recipient_account_uri": "ban:45678993;bic=UNBECNSHXXX", "payment_amount": { "amount": "105.15", "currency": "USD" }, "payment_origination_country": "USA", "payment_type": "P2P", "quote_type": { "forward": { "receiver_currency": "USD" } }, "additional_data": { "data_field": [ { "name": "701", "value": "CHN" }, { "name": "7260", "value": "BANKWIRE" } ] } } } ``` ## Sample Response {#sample-response} ### Successful Response: {#successful-response} * XML * JSON ```XML 07-LKS-HT-XBMTYU2909202wfnvpobv931455_2 P2P pen_40000796299942448699062004 proposal true USD 5.25 GBP 82.63 USD 110.50 2019-09-09T02:12:11.750-05:00 list 2 851 456 813 123 3.7833456828 ``` ```JSON { "quote": { "transaction_reference": "07-LKS-HT-XBMTYU2909202wfnvpobv931455_2", "payment_type": "P2P", "proposals": { "proposal": { "id": "pen_40000796299942448699062004", "resource_type": "proposal", "fees_included": "true", "charged_amount": { "currency": "USD", "amount": "5.25" }, "credited_amount": { "currency": "GBP", "amount": "82.63" }, "principal_amount": { "currency": "USD", "amount": "110.50" }, "expiration_date": "2019-09-09T02:12:11-05:00", "additional_data_list": { "resource_type": "list", "item_count": "2", "data": { "data_field": [ { "name": "851", "value": "456" }, { "name": "813", "value": "123" } ] } }, "quote_fx_rate": "3.7833456828" } } } } ``` ### Successful Response of Quote without URIs (Sender and Recipient) and with 2 Additional Data Fields, 701 and 7260 : {#successful-response-of-quote-without-uris-sender-and-recipient-and-with-2-additional-data-fields-701-and-7260-} * XML * JSON ```XML 090785ec9d59464997894fd P2P pen_4000191467510582680686724 proposal true EUR 4.2 EUR 40 EUR 4.00 2023-02-10T05:30:59-06:00 list 8 851 456 813 123 111 Oak Street 112 any city 701 USA 7260 CARD 700 FRA 299 USD 777 ``` ```JSON { "quote": { "transaction_reference": "090785ec9d59464997894fd", "payment_type": "P2P", "proposals": { "proposal": [ { "id": "pen_4000191467510582680686724", "resource_type": "proposal", "fees_included": true, "charged_amount": { "amount": "4.2", "currency": "EUR" }, "credited_amount": { "amount": "40", "currency": "EUR" }, "principal_amount": { "amount": "4.00", "currency": "EUR" }, "expiration_date": "2023-02-10T05:30:59-06:00", "additional_data_list": { "resource_type": "list", "item_count": "8", "data": { "data_field": [ { "name": "851", "value": "456" }, { "name": "813", "value": "123" }, { "name": "111", "value": "Oak Street" }, { "name": "112", "value": "any city" }, { "name": "701", "value": "USA" }, { "name": "7260", "value": "CARD" }, { "name": "700", "value": "FRA" }, { "name": "299", "value": "USD" } ] } }, "quote_fx_rate": "777" } ] } } } ``` ### Successful Response for BANKWIRE: {#successful-response-for-bankwire} * XML * JSON ```XML 06d1df139c-bc13-4713-a64d-9c9ac898af4e P2P 21pnbzep2tis52g935pzk47re9 proposal true 6.65 USD 6.65 USD 6.65 USD 2023-09-21T05:33:49.874-05:00 list 2 813 1.000000 840 f19tis9fg4gkeg11h0dkc1kybea 1.000000 2023-09-21T05:33:49.874-05:00 ``` ```JSON { "quote": { "transaction_reference": "77-DXF-CA-UERTYGH2909202wfnvpobv00734_8", "payment_type": "P2P", "proposals": { "proposal": [ { "id": "2uc8sd7m5vjk32s0kc84zo7r4t", "resource_type": "proposal", "fees_included": true, "charged_amount": { "amount": "5.15", "currency": "USD" }, "credited_amount": { "amount": "5.15", "currency": "USD" }, "principal_amount": { "amount": "5.15", "currency": "USD" }, "expiration_date": "2023-09-25T05:48:07-05:00", "additional_data_list": { "resource_type": "list", "item_count": "2", "data": { "data_field": [ { "name": "813", "value": "1.000000" }, { "name": "840", "value": "5juubzclkyqpt1g71viray0zpg" } ] } }, "quote_fx_rate": "1.000000", "confirmation_expiry_time": "2023-09-25T05:48:07-05:00" } ] } } } ``` ### Rejected Response with source: {#rejected-response-with-source} * XML * JSON ```XML 7623048 Additional Data-1200-Destination Service Tag INVALID_INPUT_VALUE Invalid Input Value false
ErrorDetailCode 082000
``` ```JSON { "Errors": { "Error": { "RequestId": "7623048", "Source": "Additional Data-1200-Destination Service Tag", "ReasonCode": "INVALID_INPUT_VALUE", "Description": "Invalid Input Value", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "082000" } } } } } ``` ### Rejected Response without source: {#rejected-response-without-source} * XML * JSON ```XML 170114 DECLINE No routing option for beneficiary URI provided
ErrorDetailCode 130113
``` ```JSON { "Errors": { "Error": { "RequestId": "170114", "Source": "", "ReasonCode": "DECLINE", "Description": "No routing option for beneficiary URI provided", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "130113" } } } } } ``` ### Rejected Response for BANKWIRE: {#rejected-response-for-bankwire} * XML * JSON ```XML 120405226 DECLINE Invalid recipient currency false
ErrorDetailCode 130101
``` ```JSON { "Errors": { "Error": { "RequestId": "120405304", "Source": "", "ReasonCode": "DECLINE", "Description": "Invalid recipient currency", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "130101" } } } } } ``` ### Validation Failure Response: {#validation-failure-response} * XML * JSON ```XML 170022 recipient_account_uri MISSING_REQUIRED_INPUT Missing Required Input false
ErrorDetailCode 092000
170022 payment_amount.currency INVALID_INPUT_FORMAT Value contains invalid character false
ErrorDetailCode 062000
``` ```JSON { "Errors": { "Error": [ { "RequestId": "170022", "Source": "recipient_account_uri", "ReasonCode": "MISSING_REQUIRED_INPUT", "Description": "Missing Required Input", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "092000" } } }, { "RequestId": "170022", "Source": "payment_amount.currency", "ReasonCode": "INVALID_INPUT_FORMAT", "Description": "Value contains invalid character", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "062000" } } } ] } } ``` ### Rejected Response of Quote without URIs (Sender and Recipient) and with 1 Additional Data Field, 701 : {#rejected-response-of-quote-without-uris-sender-and-recipient-and-with-1-additional-data-field-701-} * XML * JSON ```XML 55875692 Additional Data-7260-Beneficiary payment instrument MISSING_REQUIRED_INPUT Missing Required Input false
ErrorDetailCode 092000
``` ```JSON { "Errors": { "Error": [ { "RequestId": "55875692", "Source": "Additional Data-7260-Beneficiary payment instrument", "ReasonCode": "MISSING_REQUIRED_INPUT", "Description": "Missing Required Input", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "092000" } } } ] } } ``` ### Rejected Response of Quote with Sender URI and with 2 Additional Data Fields, 701 and 7260 : {#rejected-response-of-quote-with-sender-uri-and-with-2-additional-data-fields-701-and-7260-} * XML * JSON ```XML 55875692 recipient_account_uri MISSING_REQUIRED_INPUT Missing Required Input false
ErrorDetailCode 092000
``` ```JSON { "Errors": { "Error": [ { "RequestId": "55875692", "Source": "recipient_account_uri", "ReasonCode": "MISSING_REQUIRED_INPUT", "Description": "Missing Required Input", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "092000" } } } ] } } ``` ### Rejected Response of Quote with Recipient URI and with 2 Additional Data Fields, 701 and 7260 : {#rejected-response-of-quote-with-recipient-uri-and-with-2-additional-data-fields-701-and-7260-} * XML * JSON ```XML 55875692 sender_account_uri MISSING_REQUIRED_INPUT Missing Required Input false
ErrorDetailCode 092000
``` ```JSON { "Errors": { "Error": [ { "RequestId": "55875692", "Source": "sender_account_uri", "ReasonCode": "MISSING_REQUIRED_INPUT", "Description": "Missing Required Input", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "092000" } } } ] } } ``` ## Error Codes {#error-codes} Refer to complete list of error codes [here](https://developer.mastercard.com/cross-border-services/documentation/code-and-formats/index.md). For information about the HTTP response codes that may be returned for your API requests, see [HTTP Response Codes](https://developer.mastercard.com/cross-border-services/documentation/code-and-formats/index.md).