# Amend API: Sandbox Testing
source: https://developer.mastercard.com/cross-border-services/documentation/testing/amend-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.
| Status | Test Case | Action / Error Details |
|----------|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Success | Amend payment response is "Success" indicating the request was accepted. | Send an amend request providing the Transaction Reference or Transaction Id, an amend request reference, and the details to be updated for a payment (for example, receiver's name, receiver address, receiver phone numbers). **Note:** The amend request must include either a transaction reference or transaction Id. If both are provided, the transaction reference takes precedence. |
| Rejected | Amend payment request without transaction reference or transaction Id. | Send an amend request without Transaction Reference or Transaction Id. Returns message **"Transaction reference is mandatory"** with error code **092001**. |
| Rejected | Amend payment request without amendment reference. | Send an amend request without providing an amendment reference. Returns message **"Amend reference is mandatory"** with error code **092002**. |
| Rejected | Amend payment request has an invalid transaction reference or transaction Id. | Send an amend request with an invalid transaction reference or transaction Id. Returns message **"Invalid Input Value"** with error code **082000** . **Note:** If both transaction reference and transaction Id are provided and the transaction reference is valid (but transaction Id is invalid), the request will not be rejected. |
| Rejected | Amend payment request is received for a successful payment. | Send an amend request for a payment with status *successful* . Returns message **"Payment is processed"** with error code **082003**. |
| Rejected | Amend payment request is received for a rejected payment. | Send an amend request for a payment with status *rejected* . Returns message **"Payment is rejected"** with error code **082002**. |
| Rejected | Amend payment request is received for a non-cash pickup payment. | Send an amend request for a non--cash pickup payment in progress. Returns message **"Amend is allowed only for cash pickup payment"** with error code **140002**. |
| Rejected | Amend request is received with unexpected or unsupported parameters. | If the amend request contains parameters outside the allowed specification, it is rejected. Returns message **"Invalid Input Value"** with error code **082000**. |
## Sample Requests {#sample-requests}
### Sample reference payment request {#sample-reference-payment-request}
* Xml
* Json
```xml
06{% uuid 'v4' %}tel:+254167419ewallet:nate.diaz;sp=rsptf10.00USDJMDtrueMEXP2PGabrielJTomGBR123MainStreet5AArlingtonTexas12345GBR1980-01-208801700111224JohnnXMerrimanGBR1001 EParmer Lane Suite BAustinTexas12USA
john.x.m@gmail.com
701JAM208JXM209Thomas22112345678901232228776655446522344557766776
```
```json
{
"paymentrequest": {
"transaction_reference": "068b8d46f2-5b30-4097-9485-2cc617b4e824",
"sender_account_uri": "tel:+254167419",
"recipient_account_uri": "ewallet:nate.diaz;sp=rsptf",
"payment_amount": {
"amount": "10.00",
"currency": "USD"
},
"forward": {
"receiver_currency": "JMD",
"fees_included": "true"
},
"payment_origination_country": "MEX",
"payment_type": "P2P",
"sender": {
"first_name": "Gabriel",
"middle_name": "J",
"last_name": "Tom",
"nationality": "GBR",
"address": {
"line1": "123MainStreet",
"line2": "5A",
"city": "Arlington",
"country_subdivision": "Texas",
"postal_code": "12345",
"country": "GBR"
},
"date_of_birth": "1980-01-20",
"phone": "8801700111224"
},
"recipient": {
"first_name": "Johnn",
"middle_name": "X",
"last_name": "Merriman",
"nationality": "GBR",
"address": {
"line1": "1001 E",
"line2": "Parmer Lane Suite B",
"city": "Austin",
"country_subdivision": "Texas",
"postal_code": "12",
"country": "USA"
},
"email": "john.x.m@gmail.com"
},
"additional_data": {
"data_field": [
{
"name": "701",
"value": "JAM"
},
{
"name": "208",
"value": "JXM"
},
{
"name": "209",
"value": "Thomas"
},
{
"name": "221",
"value": "1234567890123"
},
{
"name": "222",
"value": "87766554465"
},
{
"name": "223",
"value": "44557766776"
}
]
}
}
}
```
### Request amend using Transaction Reference {#request-amend-using-transaction-reference}
* Xml
* Json
```xml
0635ebbc35-7d60-41be-939e-ad52d7d62be1AmendTransRefJonDMerrimenHouse 8Brown LaneDallasTexas11223378654723456208JonAlias209Tom2226545472345622368564723456
```
```json
{
"AmendPayment": {
"transaction_reference": "0635ebbc35-7d60-41be-939e-ad52d7d62be1",
"amend_reference": "AmendTransRef",
"recipient": {
"first_name": "Jon",
"middle_name": "D",
"last_name": "Merrimen",
"address": {
"line1": "House 8",
"line2": "Brown Lane",
"city": "Dallas",
"country_subdivision": "Texas",
"postal_code": "112233"
},
"phone": "78654723456"
},
"additional_data": {
"data_field": [
{
"name": "208",
"value": "JonAlias"
},
{
"name": "209",
"value": "Tom"
},
{
"name": "222",
"value": "65454723456"
},
{
"name": "223",
"value": "68564723456"
}
]
}
}
}
```
### Request amend using Transaction ID {#request-amend-using-transaction-id}
* Xml
* Json
```xml
rem_tto6BUAcku88CK21zvNYePRUw1oAmendTransRefJonDMerrimenHouse 8Brown LaneDallasTexas11223378654723456208JonAlias209Tom2226545472345622368564723456
```
```json
{
"AmendPayment": {
"remit_reference": "rem_tto6BUAcku88CK21zvNYePRUw1o",
"amend_reference": "AmendTransRef",
"recipient": {
"first_name": "Jon",
"middle_name": "D",
"last_name": "Merrimen",
"address": {
"line1": "House 8",
"line2": "Brown Lane",
"city": "Dallas",
"country_subdivision": "Texas",
"postal_code": "112233"
},
"phone": "78654723456"
},
"additional_data": {
"data_field": [
{
"name": "208",
"value": "JonAlias"
},
{
"name": "209",
"value": "Tom"
},
{
"name": "222",
"value": "65454723456"
},
{
"name": "223",
"value": "68564723456"
}
]
}
}
}
```
## Sample Responses {#sample-responses}
The response fields would be same regardless if it's a payment with quote or payment with carded rate or payment without quote/ carded rate.
### Successful Amend: {#successful-amend}
A successful response indicates that the amend request has been accepted.
* Xml
* Json
```xml
AmendUsingTRef068b8d46f2-5b30-4097-9485-2cc617b4e824rem_lPaedW15a6eRfcNiTfDuujY8LXQSUCCESS2026-02-16T09:32:27-06:00
```
```json
{
"AmendPaymentBody": {
"amend_reference": "AmendUsingTRef",
"transaction_reference": "068b8d46f2-5b30-4097-9485-2cc617b4e824",
"remit_reference": "rem_lPaedW15a6eRfcNiTfDuujY8LXQ",
"status": "SUCCESS",
"status_timestamp": "2026-02-16T09:32:27-06:00"
}
}
```
### Rejected Amend: {#rejected-amend}
1. Rejected response for an amend request without transaction reference or transaction Id.
* Xml
* Json
```xml
347158586transaction_referenceMISSING_REQUIRED_INPUTTransaction reference is mandatoryfalseErrorDetailCode092001
```
```json
{
"Errors": {
"Error": {
"RequestId": "347158586",
"Source": "transaction_reference",
"ReasonCode": "MISSING_REQUIRED_INPUT",
"Description": "Transaction reference is mandatory",
"Recoverable": "false",
"Details": {
"Detail": {
"Name": "ErrorDetailCode",
"Value": "092001"
}
}
}
}
}
```
2. Rejected response for an amend request without amend reference.
* Xml
* Json
```xml
347158716amend_referenceMISSING_REQUIRED_INPUTAmend reference is mandatoryfalseErrorDetailCode092002
```
```json
{
"Errors": {
"Error": {
"RequestId": "347158716",
"Source": "amend_reference",
"ReasonCode": "MISSING_REQUIRED_INPUT",
"Description": "Amend reference is mandatory",
"Recoverable": "false",
"Details": {
"Detail": {
"Name": "ErrorDetailCode",
"Value": "092002"
}
}
}
}
}
```
3(a). Rejected response for an amend request with an invalid Transaction reference.
* Xml
* Json
```xml
347156724transaction_referenceINVALID_INPUT_VALUEInvalid Input ValuefalseErrorDetailCode082000
```
```json
{
"Errors": {
"Error": {
"RequestId": "347156724",
"Source": "transaction_reference",
"ReasonCode": "INVALID_INPUT_VALUE",
"Description": "Invalid Input Value",
"Recoverable": "false",
"Details": {
"Detail": {
"Name": "ErrorDetailCode",
"Value": "082000"
}
}
}
}
}
```
3(b). Rejected response for an amend request with an invalid Transaction Id.
* Xml
* Json
```xml
347158916remit_referenceINVALID_INPUT_VALUEInvalid Input ValuefalseErrorDetailCode082000
```
```json
{
"Errors": {
"Error": {
"RequestId": "347158916",
"Source": "remit_reference",
"ReasonCode": "INVALID_INPUT_VALUE",
"Description": "Invalid Input Value",
"Recoverable": "false",
"Details": {
"Detail": {
"Name": "ErrorDetailCode",
"Value": "082000"
}
}
}
}
}
```
4. Rejected response for an amend request for a successful payment.
* Xml
* Json
```xml
347919260transaction_referenceTRANSACTION_PROCESSEDPayment is processedfalseErrorDetailCode082003
```
```json
{
"Errors": {
"Error": {
"RequestId": "347919260",
"Source": "transaction_reference",
"ReasonCode": "TRANSACTION_PROCESSED",
"Description": "Payment is processed",
"Recoverable": "false",
"Details": {
"Detail": {
"Name": "ErrorDetailCode",
"Value": "082003"
}
}
}
}
}
```
5. Rejected response for an amend request for a rejected payment.
* Xml
* Json
```xml
347919786transaction_referenceTRANSACTION_REJECTEDPayment is rejectedfalseErrorDetailCode082002
```
```json
{
"Errors": {
"Error": {
"RequestId": "347919786",
"Source": "transaction_reference",
"ReasonCode": "TRANSACTION_REJECTED",
"Description": "Payment is rejected",
"Recoverable": "false",
"Details": {
"Detail": {
"Name": "ErrorDetailCode",
"Value": "082002"
}
}
}
}
}
```
6. Rejected response for an amend request for a non-cash pickup payment.
* Xml
* Json
```xml
347890234AMEND_NOT_SUPPORTED_FOR_DPIAmend is allowed only for cash pickup paymentfalseErrorDetailCode140002
```
```json
{
"Errors": {
"Error": {
"RequestId": "347890234",
"Source": "",
"ReasonCode": "AMEND_NOT_SUPPORTED_FOR_DPI",
"Description": "Amend is allowed only for cash pickup payment",
"Recoverable": "false",
"Details": {
"Detail": {
"Name": "ErrorDetailCode",
"Value": "140002"
}
}
}
}
}
```
7. Rejected response for an amend request with the receiver's details not aligned with the allowed formats.
* Xml
* Json
```xml
369452044recipient.first_nameINVALID_INPUT_VALUEInvalid Input ValuefalseErrorDetailCode082000
```
```json
{
"Errors": {
"Error": {
"RequestId": "369452044",
"Source": "recipient.first_name",
"ReasonCode": "INVALID_INPUT_VALUE",
"Description": "Invalid Input Value",
"Recoverable": "false",
"Details": {
"Detail": {
"Name": "ErrorDetailCode",
"Value": "082000"
}
}
}
}
}
```
8. Rejected response for an amend request with receiver's name which varies from the current name of the receiver beyond an allowed variance.
* Xml
* Json
```xml
347203858BEYOND_VARIANCEName is beyond allowed variancefalseErrorDetailCode082009
```
```json
{
"Errors": {
"Error": {
"RequestId": "347203858",
"Source": "",
"ReasonCode": "BEYOND_VARIANCE",
"Description": "Name is beyond allowed variance",
"Recoverable": "false",
"Details": {
"Detail": {
"Name": "ErrorDetailCode",
"Value": "082009"
}
}
}
}
}
```
9. Rejected response for an amend request with unexpected details apart from the allowed details as per the specifications.
* Xml
* Json
```xml
347154212data_field.name:767INVALID_INPUT_VALUEInvalid Input ValuefalseErrorDetailCode082000
```
```json
{
"Errors": {
"Error": {
"RequestId": "347154212",
"Source": "data_field.name:767",
"ReasonCode": "INVALID_INPUT_VALUE",
"Description": "Invalid Input Value",
"Recoverable": "false",
"Details": {
"Detail": {
"Name": "ErrorDetailCode",
"Value": "082000"
}
}
}
}
}
```
## 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).