# Retrieve Payment API: Sandbox Testing source: https://developer.mastercard.com/cross-border-services/documentation/testing/retrieve-payment-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. ## Sandbox Test cases {#sandbox-test-cases} The Sandbox server returns simulated, static responses. ### **Retrieve Payment For Return Reason Message Version 3** {#retrieve-payment-for-return-reason-message-version-3} Please refer column 'Code Value' to complete list of Return Reason Message Version 3 codes [here](https://developer.mastercard.com/cross-border-services/documentation/code-and-formats/index.md). #### Retrieve Payment by Transaction Id {#retrieve-payment-by-transaction-id} You can use the following test cases to produce specific responses. | Status | Test Case | Action | |---------|------------------------------------|------------------------------------------------------------| | Success | Retrieve payment by transaction Id | Use the transaction Id of an existing payment transaction. | | Status | Test Case | Action | |---------|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Success | Retrieve a returned Payment by Transaction Id having return message as per the Return Reason Code | 1. Create Payment with Transaction Reference starting with '8' and ending with RR######, where '######' is one of the Return Reason Code. Example:8XXXXXXRR130101 (where 'XXXXXX' can be any alphanumeric value) 2. Retrieve payment by Transaction Id. | #### Retrieve Payment by Transaction Reference {#retrieve-payment-by-transaction-reference} You can use the following test cases to produce specific responses. | Status | Test Case | Action | |---------|-------------------------------------------|----------------------------------------------------------------------| | Success | Retrieve payment by transaction reference | Use the transaction reference Id of an existing payment transaction. | | Status | Test Case | Action | |---------|----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Success | Retrieve a returned Payment by Transaction Reference having return message as per the Return Reason Code | 1. Create Payment with Transaction Reference starting with '8' and ending with RR######, where '######' is one of the Return Reason Code. Example:8XXXXXXRR130101 (where 'XXXXXX' can be any alphanumeric value) 2. Retrieve payment by Transaction Reference. | ## Sample Requests {#sample-requests} ### Retrieve Payment by Transaction ID {#retrieve-payment-by-transaction-id-1} No Request body ### Retrieve Payment by Transaction Reference {#retrieve-payment-by-transaction-reference-1} No Request body ## Sample Responses {#sample-responses} ### Retrieve Payment by Transaction ID {#retrieve-payment-by-transaction-id-2} #### Retrieve success examples {#retrieve-success-examples} A few examples of successful Retrieve calls are: ##### 1.Successful Payment Response: {#1successful-payment-response} * XML * JSON ```XML 07-GPYT-SR-NFWTIOBVCsdRGH-7009_93103546 SUCCESS rem_L1qZ8BLdmK9qUAFaGmpOwrpE6N0 payment 2019-09-09T04:32:52-05:00 2019-09-09T05:28:57-05:00 USD 5.25 USD 10.25 GBP 82.63 USD 105.50 tel:+254108989 tel:+254068989 USD 121.10 USA true Royal Exchange Quad Cities NP021 P2B Bank EUR 23.12 123456 19.12 list 3 810 123 851 456 813 18.22 1jgdhj421 ``` ```JSON { "payment": { "transaction_reference": "07-GPYT-SR-NFWTIOBVCsdRGH-7009_93103546", "status": "SUCCESS", "id": "rem_L1qZ8BLdmK9qUAFaGmpOwrpE6N0", "resource_type": "payment", "created": "2019-09-09T04:32:52-05:00", "status_timestamp": "2019-09-09T05:28:57-05:00", "fees_amount": { "currency": "USD", "amount": "5.35" }, "charged_amount": { "currency": "USD", "amount": "10.25" }, "credited_amount": { "currency": "GBP", "amount": "82.63" }, "principal_amount": { "currency": "USD", "amount": "105.50" }, "sender_account_uri": "tel:+254108989", "recipient_account_uri": "tel:+254068989", "payment_amount": { "currency": "USD", "amount": "121.10" }, "payment_origination_country": "USA", "fx_type": { "forward": { "fees_included": "true" } }, "receiving_bank_name": "Royal Exchange", "receiving_bank_branch_name": "Quad Cities", "bank_code": "NP021", "payment_type": "P2B", "source_of_income": "Bank", "settlement_details": { "currency": "EUR", "amount": "23.12" }, "cashout_code": "123456", "fx_rate": "19.12", "additional_data_list": { "resource_type": "list", "item_count": "3", "data": { "data_field": [ { "name": "810", "value": "123" }, { "name": "851", "value": "456" }, { "name": "813", "value": "18.22" } ] } }, "payment_file_identifier": "1jgdhj421" } } ``` ##### 2.Rejected Payment Response With Source: {#2rejected-payment-response-with-source} * XML * JSON ```XML 04-GPYT-RRWS-MKMFWYIUVKH-700_swr4567475 REJECTED rem_IaCIDKldIs40_EzDRyPv-EPVDK8 payment 082000 INVALID_INPUT_VALUE:Invalid Input Value:Additional Data-121-Sender Mobile Phone Number ``` ```JSON { "payment": { "transaction_reference": "04-GPYT-RRWS-MKMFWYIUVKH-700_swr4567475", "status": "REJECTED", "id": "rem_IaCIDKldIs40_EzDRyPv-EPVDK8", "resource_type": "payment", "rejected_status": { "Code": "082000", "Message": "INVALID_INPUT_VALUE:Invalid Input Value:Additional Data-121-Sender Mobile Phone Number" } } } ``` ##### 3.Rejected Payment Response Without Source: {#3rejected-payment-response-without-source} * XML * JSON ```XML 04-GPYT-RRWTS-FWLBCXWUONBFD_70045674750 REJECTED rem_IaCIDKldIs40_EzDRyPv-EPVDK8 payment 130120 DECLINE:Maximum cumulative transactions exceeded by sending consumer ``` ```JSON { "payment": { "transaction_reference": "04-GPYT-RRWTS-FWLBCXWUONBFD_70045674750", "status": "REJECTED", "id": "rem_IaCIDKldIs40_EzDRyPv-EPVDK8", "resource_type": "payment", "rejected_status": { "Code": "130120", "Message": "DECLINE:Maximum cumulative transactions exceeded by sending consumer" } } } ``` ##### 4.Pending Payment Response: {#4pending-payment-response} * XML * JSON ```XML 06-GPYT-PR-TQVNKODDF-7009hajsa673345035 PENDING rem_S8XcPv5Jjy6n4llKwnrXXBMAr2Y payment 2019-09-09T05:36:49-05:00 2019-09-09T05:38:31-05:00 Processing 2019-09-09T05:41:27.416-05:00 USD 5.35 USD 10.25 GBP 82.63 USD 105.50 tel:+254108989 tel:+254068989 USD 121.10 USA true Royal Exchange Quad Cities NP021 P2B Bank EUR 23.12 123456 19.19 list 2 810 123 851 456 5spltew62 ``` ```JSON { "payment": { "transaction_reference": "06-GPYT-PR-TQVNKODDF-7009hajsa673345035", "status": "PENDING", "id": "rem_S8XcPv5Jjy6n4llKwnrXXBMAr2Y", "resource_type": "payment", "created": "2019-09-09T05:36:49-05:00", "status_timestamp": "2019-09-09T05:38:31-05:00", "pending_stage": "Processing", "pending_max_completion_date": "2019-09-09T05:41:27.416-05:00", "fees_amount": { "currency": "USD", "amount": "5.35" }, "charged_amount": { "currency": "USD", "amount": "10.25" }, "credited_amount": { "currency": "GBP", "amount": "82.63" }, "principal_amount": { "currency": "USD", "amount": "105.50" }, "sender_account_uri": "tel:+254108989", "recipient_account_uri": "tel:+254068989", "payment_amount": { "currency": "USD", "amount": "121.10" }, "payment_origination_country": "USA", "fx_type": { "forward": { "fees_included": "true" } }, "receiving_bank_name": "Royal Exchange", "receiving_bank_branch_name": "Quad Cities", "bank_code": "NP021", "payment_type": "P2B", "source_of_income": "Bank", "settlement_details": { "currency": "EUR", "amount": "23.12" }, "cashout_code": "123456", "fx_rate": "19.19", "additional_data_list": { "resource_type": "list", "item_count": "2", "data": { "data_field": [ { "name": "810", "value": "123" }, { "name": "851", "value": "456" } ] } }, "payment_file_identifier": "5spltew62" } } ``` ##### 5.Returned Payment Response For Returned Reason Version 2: {#5returned-payment-response-for-returned-reason-version-2} * XML * JSON ```XML 099d9b1f09805a407691659 RETURNED rem_6JFlIxjCOz4GJZXsldiZejK8b5A payment P2P Returned per sending service provider's request ``` ```JSON { "payment": { "transaction_reference": "099d9b1f09805a407691659", "status": "RETURNED", "id": "rem_6JFlIxjCOz4GJZXsldiZejK8b5A", "resource_type": "payment", "payment_type": "P2P", "return_status": { "Message": "Returned per sending service provider's request" } } } ``` ##### 6.Returned Payment Response For Returned Reason Version 3: {#6returned-payment-response-for-returned-reason-version-3} * XML * JSON ```XML 099d9b1f09805a407691659 RETURNED rem_6JFlIxjCOz4GJZXsldiZejK8b5A payment P2P 130134 DECLINE:The recipient cannot receive funds due to inactive account ``` ```JSON { "payment": { "transaction_reference": "099d9b1f09805a407691659", "status": "RETURNED", "id": "rem_6JFlIxjCOz4GJZXsldiZejK8b5A", "resource_type": "payment", "payment_type": "P2P", "rejected_status": { "Code": "130134", "Message": "DECLINE:The recipient cannot receive funds due to inactive account" } } } ``` #### Retrieve failures examples {#retrieve-failures-examples} A few examples of Retrieve failures are: ##### 1.System Failure: {#1system-failure} * XML * JSON ```XML 343242 SYSTEM_ERROR A system error has occurred false
ErrorDetailCode 150001
``` ```JSON { "Errors": { "Error": { "RequestId": "343242", "Source": "", "ReasonCode": "SYSTEM_ERROR", "Description": "A system error has occurred", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "150001" } } } } } ``` ##### 2.Payment Id Not Found: {#2payment-id-not-found} * XML * JSON ```XML 38694624 GetPayment RESOURCE_UNKNOWN Record Not Found false
ErrorDetailCode 110507
``` ```JSON { "Errors": { "Error": { "RequestId": "38694624", "Source": "GetPayment", "ReasonCode": "RESOURCE_UNKNOWN", "Description": "Record Not Found", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "110507" } } } } } ``` ### Retrieve Payment by Transaction Reference {#retrieve-payment-by-transaction-reference-2} #### Retrieve success examples {#retrieve-success-examples-1} A few examples of successful Retrieve calls are: ##### 1.Successful Payment Response: {#1successful-payment-response-1} * XML * JSON ```XML 05-GPYT-SR-GAWERBNseYIOFUE-009675675_52 rem_CsmBxbCtt9opPMXzD5JGx_DJNWQ payment 2019-09-09T05:36:49-05:00 suc_10000807120579256064528158 SUCCESS 2019-09-09T05:38:31-05:00 5.35 USD 10.25 USD 82.63 GBP 105.50 USD tel:+2130000 tel:+254060005 121.10 USD USA true Royal Exchange Quad Cities P2P Sal 23.12 EUR 123456 18.22 list 2 810 123 851 456 ``` ```JSON { "payment": { "transaction_reference": "05-GPYT-SR-GAWERBNseYIOFUE-009675675_52", "id": "rem_CsmBxbCtt9opPMXzD5JGx_DJNWQ", "resource_type": "payment", "created": "2019-09-09T05:36:49-05:00", "proposal_id": "suc_10000807120579256064528158", "status": "SUCCESS", "status_timestamp": "2019-09-09T05:38:31-05:00", "fees_amount": { "amount": "5.35", "currency": "USD" }, "charged_amount": { "amount": "10.25", "currency": "USD" }, "credited_amount": { "amount": "82.63", "currency": "GBP" }, "principal_amount": { "amount": "105.50", "currency": "USD" }, "sender_account_uri": "tel:+2130000", "recipient_account_uri": "tel:+254060005", "payment_amount": { "amount": "121.10", "currency": "USD" }, "payment_origination_country": "USA", "fx_type": { "forward": { "fees_included": "true" } }, "receiving_bank_name": "Royal Exchange", "receiving_bank_branch_name": "Quad Cities", "payment_type": "P2P", "source_of_income": "Sal", "settlement_details": { "amount": "23.12", "currency": "EUR" }, "cashout_code": "123456", "fx_rate": "18.22", "additional_data_list": { "resource_type": "list", "item_count": "2", "data": { "data_field": [ { "name": "810", "value": "123" }, { "name": "851", "value": "456" } ] } } } } ``` ##### 2.Rejected Payment Response With Source: {#2rejected-payment-response-with-source-1} * XML * JSON ```XML 04-GPYT-RR-FWLWSTYONBFD_70045674752400 REJECTED rem_IaCIDKldIs40_EzDRyPv-EPVDK8 payment 082000 INVALID_INPUT_VALUE:Invalid Input Value:Additional Data-121-Sender Mobile Phone Number ``` ```JSON { "payment": { "transaction_reference": "04-GPYT-RR-FWLWSTYONBFD_70045674752400", "status": "REJECTED", "id": "rem_IaCIDKldIs40_EzDRyPv-EPVDK8", "resource_type": "payment", "rejected_status": { "Code": "082000", "Message": "INVALID_INPUT_VALUE:Invalid Input Value:Additional Data-121-Sender Mobile Phone Number" } } } ``` ##### 3.Rejected Payment Response Without Source: {#3rejected-payment-response-without-source-1} * XML * JSON ```XML 04-GPYT-RRWS-LWSTYONBFD_70045674752400 REJECTED rem_IaCIDKldIs40_EzDRyPv-EPVDK8 payment 130120 DECLINE:Maximum cumulative transactions exceeded by sending consumer ``` ```JSON { "payment": { "transaction_reference": "04-GPYT-RRWS-LWSTYONBFD_70045674752400", "status": "REJECTED", "id": "rem_IaCIDKldIs40_EzDRyPv-EPVDK8", "resource_type": "payment", "rejected_status": { "Code": "130120", "Message": "DECLINE:Maximum cumulative transactions exceeded by sending consumer" } } } ``` ##### 4.Pending Payment Response: {#4pending-payment-response-1} * XML * JSON ```XML 06-GPYT-PR-TQVNKODDF-7009hajsa673345035 PENDING rem_S8XcPv5Jjy6n4llKwnrXXBMAr2Y payment 2019-09-09T05:36:49-05:00 2019-09-09T05:38:31-05:00 Processing 2019-09-09T05:41:27.416-05:00 USD 5.95 USD 15.16 GBP 82.63 USD 124.65 tel:+254108989 tel:+254068989 USD 145.76 USA true Royal Exchange Quad Cities NP021 P2B Bank EUR 23.12 123456 19.19 list 2 810 123 851 456 6trwqs73 ``` ```JSON { "payment": { "transaction_reference": "06-GPYT-PR-TQVNKODDF-7009hajsa673345035", "status": "PENDING", "id": "rem_S8XcPv5Jjy6n4llKwnrXXBMAr2Y", "resource_type": "payment", "created": "2019-09-09T05:36:49-05:00", "status_timestamp": "2019-09-09T05:38:31-05:00", "pending_stage": "Processing", "pending_max_completion_date": "2019-09-09T05:41:27.416-05:00", "fees_amount": { "currency": "USD", "amount": "5.95" }, "charged_amount": { "currency": "USD", "amount": "15.16" }, "credited_amount": { "currency": "GBP", "amount": "82.63" }, "principal_amount": { "currency": "USD", "amount": "124.65" }, "sender_account_uri": "tel:+254108989", "recipient_account_uri": "tel:+254068989", "payment_amount": { "currency": "USD", "amount": "145.76" }, "payment_origination_country": "USA", "fx_type": { "forward": { "fees_included": "true" } }, "receiving_bank_name": "Royal Exchange", "receiving_bank_branch_name": "Quad Cities", "bank_code": "NP021", "payment_type": "P2B", "source_of_income": "Bank", "settlement_details": { "currency": "EUR", "amount": "23.12" }, "cashout_code": "123456", "fx_rate": "19.19", "additional_data_list": { "resource_type": "list", "item_count": "2", "data": { "data_field": [ { "name": "810", "value": "123" }, { "name": "851", "value": "456" } ] } }, "payment_file_identifier": "6trwqs73" } } ``` ##### 5.Returned Payment Response For Returned Reason Version 2: {#5returned-payment-response-for-returned-reason-version-2-1} * XML * JSON ```XML 099d9b1f09805a407691659 RETURNED rem_6JFlIxjCOz4GJZXsldiZejK8b5A payment P2P Returned per sending service provider's request ``` ```JSON { "payment": { "transaction_reference": "099d9b1f09805a407691659", "status": "RETURNED", "id": "rem_6JFlIxjCOz4GJZXsldiZejK8b5A", "resource_type": "payment", "payment_type": "P2P", "return_status": { "Message": "Returned per sending service provider's request" } } } ``` ##### 6.Returned Payment Response For Returned Reason Version 3: {#6returned-payment-response-for-returned-reason-version-3-1} * XML * JSON ```XML 099d9b1f09805a407691659 RETURNED rem_6JFlIxjCOz4GJZXsldiZejK8b5A payment P2P 130134 DECLINE:The recipient cannot receive funds due to inactive account ``` ```JSON { "payment": { "transaction_reference": "099d9b1f09805a407691659", "status": "RETURNED", "id": "rem_6JFlIxjCOz4GJZXsldiZejK8b5A", "resource_type": "payment", "payment_type": "P2P", "rejected_status": { "Code": "130134", "Message": "DECLINE:The recipient cannot receive funds due to inactive account" } } } ``` #### Retrieve failures examples {#retrieve-failures-examples-1} A few examples of Retrieve failures are provided below: ##### 1.System Failure: {#1system-failure-1} * XML * JSON ```XML 343242 SYSTEM_ERROR A system error has occurred false
ErrorDetailCode 150001
``` ```JSON { "Errors": { "Error": { "RequestId": "343242", "Source": "", "ReasonCode": "SYSTEM_ERROR", "Description": "A system error has occurred", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "150001" } } } } } ``` ##### 2.Transaction Reference Not Found: {#2transaction-reference-not-found} * XML * JSON ```XML 38694624 GetPayment RESOURCE_UNKNOWN Record Not Found false
ErrorDetailCode 110507
``` ```JSON { "Errors": { "Error": { "RequestId": "38694624", "Source": "GetPayment", "ReasonCode": "RESOURCE_UNKNOWN", "Description": "Record Not Found", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "110507" } } } } } ``` ## 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). ## Sample Responses {#sample-responses-1} ### Retrieve Payment by Transaction Id {#retrieve-payment-by-transaction-id-3} A few examples of successful Retrieve calls are provided below: #### 1.Successful Payment Response: {#1successful-payment-response-2} * XML * JSON ```XML 07-GPYT-SR-NFWTIOBVCsdRGH-7009_93103546 SUCCESS rem_L1qZ8BLdmK9qUAFaGmpOwrpE6N0 payment 2019-09-09T04:32:52-05:00 2019-09-09T05:28:57-05:00 USD 5.25 USD 10.25 GBP 82.63 USD 105.50 tel:+254108989 tel:+254068989 USD 121.10 USA true Royal Exchange Quad Cities NP021 P2B Bank EUR 23.12 123456 19.12 list 3 810 123 851 456 813 18.22 1jgdhj421 ``` ```JSON { "payment": { "transaction_reference": "07-GPYT-SR-NFWTIOBVCsdRGH-7009_93103546", "status": "SUCCESS", "id": "rem_L1qZ8BLdmK9qUAFaGmpOwrpE6N0", "resource_type": "payment", "created": "2019-09-09T04:32:52-05:00", "status_timestamp": "2019-09-09T05:28:57-05:00", "fees_amount": { "currency": "USD", "amount": "5.35" }, "charged_amount": { "currency": "USD", "amount": "10.25" }, "credited_amount": { "currency": "GBP", "amount": "82.63" }, "principal_amount": { "currency": "USD", "amount": "105.50" }, "sender_account_uri": "tel:+254108989", "recipient_account_uri": "tel:+254068989", "payment_amount": { "currency": "USD", "amount": "121.10" }, "payment_origination_country": "USA", "fx_type": { "forward": { "fees_included": "true" } }, "receiving_bank_name": "Royal Exchange", "receiving_bank_branch_name": "Quad Cities", "bank_code": "NP021", "payment_type": "P2B", "source_of_income": "Bank", "settlement_details": { "currency": "EUR", "amount": "23.12" }, "cashout_code": "123456", "fx_rate": "19.12", "additional_data_list": { "resource_type": "list", "item_count": "3", "data": { "data_field": [ { "name": "810", "value": "123" }, { "name": "851", "value": "456" }, { "name": "813", "value": "18.22" } ] } }, "payment_file_identifier": "1jgdhj421" } } ``` #### 2.Rejected Payment Response With Source: {#2rejected-payment-response-with-source-2} * XML * JSON ```XML 04-GPYT-RRWS-MKMFWYIUVKH-700_swr4567475 REJECTED rem_IaCIDKldIs40_EzDRyPv-EPVDK8 payment 082000 INVALID_INPUT_VALUE:Invalid Input Value:Additional Data-121-Sender Mobile Phone Number ``` ```JSON { "payment": { "transaction_reference": "04-GPYT-RRWS-MKMFWYIUVKH-700_swr4567475", "status": "REJECTED", "id": "rem_IaCIDKldIs40_EzDRyPv-EPVDK8", "resource_type": "payment", "rejected_status": { "Code": "082000", "Message": "INVALID_INPUT_VALUE:Invalid Input Value:Additional Data-121-Sender Mobile Phone Number" } } } ``` #### 3.Rejected Payment Response Without Source: {#3rejected-payment-response-without-source-2} * XML * JSON ```XML 04-GPYT-RRWTS-FWLBCXWUONBFD_70045674750 REJECTED rem_IaCIDKldIs40_EzDRyPv-EPVDK8 payment 130120 DECLINE:Maximum cumulative transactions exceeded by sending consumer ``` ```JSON { "payment": { "transaction_reference": "04-GPYT-RRWTS-FWLBCXWUONBFD_70045674750", "status": "REJECTED", "id": "rem_IaCIDKldIs40_EzDRyPv-EPVDK8", "resource_type": "payment", "rejected_status": { "Code": "130120", "Message": "DECLINE:Maximum cumulative transactions exceeded by sending consumer" } } } ``` #### 4.Pending Payment Response: {#4pending-payment-response-2} * XML * JSON ```XML 06-GPYT-PR-TQVNKODDF-7009hajsa673345035 PENDING rem_S8XcPv5Jjy6n4llKwnrXXBMAr2Y payment 2019-09-09T05:36:49-05:00 2019-09-09T05:38:31-05:00 Processing 2019-09-09T05:41:27.416-05:00 USD 5.35 USD 10.25 GBP 82.63 USD 105.50 tel:+254108989 tel:+254068989 USD 121.10 USA true Royal Exchange Quad Cities NP021 P2B Bank EUR 23.12 123456 19.19 list 2 810 123 851 456 5spltew62 ``` ```JSON { "payment": { "transaction_reference": "06-GPYT-PR-TQVNKODDF-7009hajsa673345035", "status": "PENDING", "id": "rem_S8XcPv5Jjy6n4llKwnrXXBMAr2Y", "resource_type": "payment", "created": "2019-09-09T05:36:49-05:00", "status_timestamp": "2019-09-09T05:38:31-05:00", "pending_stage": "Processing", "pending_max_completion_date": "2019-09-09T05:41:27.416-05:00", "fees_amount": { "currency": "USD", "amount": "5.35" }, "charged_amount": { "currency": "USD", "amount": "10.25" }, "credited_amount": { "currency": "GBP", "amount": "82.63" }, "principal_amount": { "currency": "USD", "amount": "105.50" }, "sender_account_uri": "tel:+254108989", "recipient_account_uri": "tel:+254068989", "payment_amount": { "currency": "USD", "amount": "121.10" }, "payment_origination_country": "USA", "fx_type": { "forward": { "fees_included": "true" } }, "receiving_bank_name": "Royal Exchange", "receiving_bank_branch_name": "Quad Cities", "bank_code": "NP021", "payment_type": "P2B", "source_of_income": "Bank", "settlement_details": { "currency": "EUR", "amount": "23.12" }, "cashout_code": "123456", "fx_rate": "19.19", "additional_data_list": { "resource_type": "list", "item_count": "2", "data": { "data_field": [ { "name": "810", "value": "123" }, { "name": "851", "value": "456" } ] } }, "payment_file_identifier": "5spltew62" } } ``` #### 5.Returned Payment Response For Returned Reason Version 2: {#5returned-payment-response-for-returned-reason-version-2-2} * XML * JSON ```XML 099d9b1f09805a407691659 RETURNED rem_6JFlIxjCOz4GJZXsldiZejK8b5A payment P2P Returned per sending service provider's request ``` ```JSON { "payment": { "transaction_reference": "099d9b1f09805a407691659", "status": "RETURNED", "id": "rem_6JFlIxjCOz4GJZXsldiZejK8b5A", "resource_type": "payment", "payment_type": "P2P", "return_status": { "Message": "Returned per sending service provider's request" } } } ``` #### 6.Returned Payment Response For Returned Reason Version 3: {#6returned-payment-response-for-returned-reason-version-3-2} * XML * JSON ```XML 099d9b1f09805a407691659 RETURNED rem_6JFlIxjCOz4GJZXsldiZejK8b5A payment P2P 130134 DECLINE:The recipient cannot receive funds due to inactive account ``` ```JSON { "payment": { "transaction_reference": "099d9b1f09805a407691659", "status": "RETURNED", "id": "rem_6JFlIxjCOz4GJZXsldiZejK8b5A", "resource_type": "payment", "payment_type": "P2P", "rejected_status": { "Code": "130134", "Message": "DECLINE:The recipient cannot receive funds due to inactive account" } } } ``` A few examples of Retrieve failures are provided below: #### 1.System Failure: {#1system-failure-2} * XML * JSON ```XML 343242 SYSTEM_ERROR A system error has occurred false
ErrorDetailCode 150001
``` ```JSON { "Errors": { "Error": { "RequestId": "343242", "Source": "", "ReasonCode": "SYSTEM_ERROR", "Description": "A system error has occurred", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "150001" } } } } } ``` #### 2.Payment Id Not Found: {#2payment-id-not-found-1} * XML * JSON ```XML 38694624 GetPayment RESOURCE_UNKNOWN Record Not Found false
ErrorDetailCode 110507
``` ```JSON { "Errors": { "Error": { "RequestId": "38694624", "Source": "GetPayment", "ReasonCode": "RESOURCE_UNKNOWN", "Description": "Record Not Found", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "110507" } } } } } ``` ### Retrieve Payment by Transaction Reference {#retrieve-payment-by-transaction-reference-3} A few examples of successful Retrieve calls are provided below: #### 1.Successful Payment Response: {#1successful-payment-response-3} * XML * JSON ```XML 05-GPYT-SR-GAWERBNseYIOFUE-009675675_52 rem_CsmBxbCtt9opPMXzD5JGx_DJNWQ payment 2019-09-09T05:36:49-05:00 suc_10000807120579256064528158 SUCCESS 2019-09-09T05:38:31-05:00 5.35 USD 10.25 USD 82.63 GBP 105.50 USD tel:+2130000 tel:+254060005 121.10 USD USA true Royal Exchange Quad Cities P2P Sal 23.12 EUR 123456 18.22 list 2 810 123 851 456 ``` ```JSON { "payment": { "transaction_reference": "05-GPYT-SR-GAWERBNseYIOFUE-009675675_52", "id": "rem_CsmBxbCtt9opPMXzD5JGx_DJNWQ", "resource_type": "payment", "created": "2019-09-09T05:36:49-05:00", "proposal_id": "suc_10000807120579256064528158", "status": "SUCCESS", "status_timestamp": "2019-09-09T05:38:31-05:00", "fees_amount": { "amount": "5.35", "currency": "USD" }, "charged_amount": { "amount": "10.25", "currency": "USD" }, "credited_amount": { "amount": "82.63", "currency": "GBP" }, "principal_amount": { "amount": "105.50", "currency": "USD" }, "sender_account_uri": "tel:+2130000", "recipient_account_uri": "tel:+254060005", "payment_amount": { "amount": "121.10", "currency": "USD" }, "payment_origination_country": "USA", "fx_type": { "forward": { "fees_included": "true" } }, "receiving_bank_name": "Royal Exchange", "receiving_bank_branch_name": "Quad Cities", "payment_type": "P2P", "source_of_income": "Sal", "settlement_details": { "amount": "23.12", "currency": "EUR" }, "cashout_code": "123456", "fx_rate": "18.22", "additional_data_list": { "resource_type": "list", "item_count": "2", "data": { "data_field": [ { "name": "810", "value": "123" }, { "name": "851", "value": "456" } ] } } } } ``` #### 2.Rejected Payment Response With Source: {#2rejected-payment-response-with-source-3} * XML * JSON ```XML 04-GPYT-RR-FWLWSTYONBFD_70045674752400 REJECTED rem_IaCIDKldIs40_EzDRyPv-EPVDK8 payment 082000 INVALID_INPUT_VALUE:Invalid Input Value:Additional Data-121-Sender Mobile Phone Number ``` ```JSON { "payment": { "transaction_reference": "04-GPYT-RR-FWLWSTYONBFD_70045674752400", "status": "REJECTED", "id": "rem_IaCIDKldIs40_EzDRyPv-EPVDK8", "resource_type": "payment", "rejected_status": { "Code": "082000", "Message": "INVALID_INPUT_VALUE:Invalid Input Value:Additional Data-121-Sender Mobile Phone Number" } } } ``` #### 3.Rejected Payment Response Without Source: {#3rejected-payment-response-without-source-3} * XML * JSON ```XML 04-GPYT-RRWS-LWSTYONBFD_70045674752400 REJECTED rem_IaCIDKldIs40_EzDRyPv-EPVDK8 payment 130120 DECLINE:Maximum cumulative transactions exceeded by sending consumer ``` ```JSON { "payment": { "transaction_reference": "04-GPYT-RRWS-LWSTYONBFD_70045674752400", "status": "REJECTED", "id": "rem_IaCIDKldIs40_EzDRyPv-EPVDK8", "resource_type": "payment", "rejected_status": { "Code": "130120", "Message": "DECLINE:Maximum cumulative transactions exceeded by sending consumer" } } } ``` #### 4.Pending Payment Response: {#4pending-payment-response-3} * XML * JSON ```XML 06-GPYT-PR-TQVNKODDF-7009hajsa673345035 PENDING rem_S8XcPv5Jjy6n4llKwnrXXBMAr2Y payment 2019-09-09T05:36:49-05:00 2019-09-09T05:38:31-05:00 Processing 2019-09-09T05:41:27.416-05:00 USD 5.95 USD 15.16 GBP 82.63 USD 124.65 tel:+254108989 tel:+254068989 USD 145.76 USA true Royal Exchange Quad Cities NP021 P2B Bank EUR 23.12 123456 19.19 list 2 810 123 851 456 6trwqs73 ``` ```JSON { "payment": { "transaction_reference": "06-GPYT-PR-TQVNKODDF-7009hajsa673345035", "status": "PENDING", "id": "rem_S8XcPv5Jjy6n4llKwnrXXBMAr2Y", "resource_type": "payment", "created": "2019-09-09T05:36:49-05:00", "status_timestamp": "2019-09-09T05:38:31-05:00", "pending_stage": "Processing", "pending_max_completion_date": "2019-09-09T05:41:27.416-05:00", "fees_amount": { "currency": "USD", "amount": "5.95" }, "charged_amount": { "currency": "USD", "amount": "15.16" }, "credited_amount": { "currency": "GBP", "amount": "82.63" }, "principal_amount": { "currency": "USD", "amount": "124.65" }, "sender_account_uri": "tel:+254108989", "recipient_account_uri": "tel:+254068989", "payment_amount": { "currency": "USD", "amount": "145.76" }, "payment_origination_country": "USA", "fx_type": { "forward": { "fees_included": "true" } }, "receiving_bank_name": "Royal Exchange", "receiving_bank_branch_name": "Quad Cities", "bank_code": "NP021", "payment_type": "P2B", "source_of_income": "Bank", "settlement_details": { "currency": "EUR", "amount": "23.12" }, "cashout_code": "123456", "fx_rate": "19.19", "additional_data_list": { "resource_type": "list", "item_count": "2", "data": { "data_field": [ { "name": "810", "value": "123" }, { "name": "851", "value": "456" } ] } }, "payment_file_identifier": "6trwqs73" } } ``` #### 5.Returned Payment Response For Returned Reason Version 2: {#5returned-payment-response-for-returned-reason-version-2-3} * XML * JSON ```XML 099d9b1f09805a407691659 RETURNED rem_6JFlIxjCOz4GJZXsldiZejK8b5A payment P2P Returned per sending service provider's request ``` ```JSON { "payment": { "transaction_reference": "099d9b1f09805a407691659", "status": "RETURNED", "id": "rem_6JFlIxjCOz4GJZXsldiZejK8b5A", "resource_type": "payment", "payment_type": "P2P", "return_status": { "Message": "Returned per sending service provider's request" } } } ``` #### 6.Returned Payment Response For Returned Reason Version 3: {#6returned-payment-response-for-returned-reason-version-3-3} * XML * JSON ```XML 099d9b1f09805a407691659 RETURNED rem_6JFlIxjCOz4GJZXsldiZejK8b5A payment P2P 130134 DECLINE:The recipient cannot receive funds due to inactive account ``` ```JSON { "payment": { "transaction_reference": "099d9b1f09805a407691659", "status": "RETURNED", "id": "rem_6JFlIxjCOz4GJZXsldiZejK8b5A", "resource_type": "payment", "payment_type": "P2P", "rejected_status": { "Code": "130134", "Message": "DECLINE:The recipient cannot receive funds due to inactive account" } } } ``` A few examples of Retrieve failures are provided below: #### 1.System Failure: {#1system-failure-3} * XML * JSON ```XML 343242 SYSTEM_ERROR A system error has occurred false
ErrorDetailCode 150001
``` ```JSON { "Errors": { "Error": { "RequestId": "343242", "Source": "", "ReasonCode": "SYSTEM_ERROR", "Description": "A system error has occurred", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "150001" } } } } } ``` #### 2.Transaction Reference Not Found: {#2transaction-reference-not-found-1} * XML * JSON ```XML 38694624 GetPayment RESOURCE_UNKNOWN Record Not Found false
ErrorDetailCode 110507
``` ```JSON { "Errors": { "Error": { "RequestId": "38694624", "Source": "GetPayment", "ReasonCode": "RESOURCE_UNKNOWN", "Description": "Record Not Found", "Recoverable": "false", "Details": { "Detail": { "Name": "ErrorDetailCode", "Value": "110507" } } } } } ``` ## Error Codes {#error-codes-1} Please 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).