PUT Update a Transaction

PUT /transfer/v1/transaction/{transactionId}

Development Guide

The 'Update a Transaction' endpoint determines the information to collect from the consumer, it also validates the data for compliance purposes and updates the transactionId resource with the data gathered.




1. Prepare headers & authentication:

The application must call the 'Update a transaction' endpoint with a PUT HTTP method, providing the OAuth access_token in the header and all other required header values.


Note: MoneyGram uses the OAuth 2.0 framework. The application must use their OAuth client credentials to generate an access_token by calling the Get access token endpoint. The token is valid for **1 hour ** and must be passed as a header value in all subsequent API HTTP calls. Learn More


🚀

Launch Code Example




2. Provide the transactionId resource as a path parameter

The application must pass the associated transactionId as a path parameter on the Update API. This will allow the application to update the transactionId resource with consumer and transactional information. The transactionId will have been previously generated from Quote or Create a transaction endpoints.


🚀

Launch Code Example




3. Provide request body: "Transact by send amount" OR "Transact by receive amount":

The application must use the oneOf Keyword to update a transaction by send or receive amount. At this point the application also has the option to re-quote the transactionId by entering a different sendAmount.value, serviceOptionCode or destinationCountry:


  • **Transact by send amount:**The application must provide the following required fields in the request body: targetAudience, agentPartnerId, destinationCountryCode , serviceOptionCode, sendAmount.value, sendAmount.currencyCode, and receiveCurrencyCode.
    OR

  • Transact by receive amount: The application must provide the following required fields in the request body: targetAudience, agentPartnerId, destinationCountryCode , serviceOptionCode, receiveAmount.value, receiveAmount.currencyCode, and sendCurrencyCode

Note:

  • The Update API uses ISO Standards for country and currency values. MoneyGram provides Reference Data APIs which can be queried to understand the supported values and associated metadata.
  • Additional data collection may be required based on the sendAmountand destinationCountryCode.

🚀

Launch Code Example

.

/>




4. Provide sendersender, receiver & transactionInformation to the request body:

The application must collect sender, receiver, and transactionInformation for MoneyGram to perform real-time validation and compliance screening. At a minimum the following required fields are needed: sender.name.firstName, sender.name.lastName, sender.address.line1, sender.address.city, sender.address.countryCode, sender.mobilePhone.number, sender.mobilePhone.countryDialCode, personalDetails.dateOfBirth, primaryIdentification, receiver.name.firstName, receiver.name.lastName


Note: To understand a full list of REQUIRED and OPTIONAL fields, the application can call the Retrieve transactional send fields API. Learn More


🚀

Launch Code Example




5. Provide targetAccount fields to the request body for bank, wallet or card deposit (optional):

The account's information can be can be submitted through the targetAccount dynamic key/value pairs.


Note: To understand the which account deposit fields are required to collect from the consumer, see the Bank & Wallet Coverage guide, or the application can use the Retrieve Fields for a Transfer API to determine the list of account fields.


🚀

Launch Code Example




6. Make a request and handle response:

The application must call the 'Update a transaction' endpoint with a PUT HTTP method. The application must build to handle the following response scenarios:


  • Success | Parse the Response | 200 OK HTTP Status | "readyToCommit": true

    When the 'Update a transaction' endpoint responds with a 200 HTTP Status and the "readytoCommit": true, transactionId, serviceOption, sendAmount, sendCurrency, fees, fxRate, discountsApplied and the receiveAmount. In some cases, send or receive side taxes are applied. The application can proceed to "Commit a transaction" API and execute the transfer of funds.

  • Failed | Handle the Error | 400 Bad Request HTTP Status

    When the 'Update a transaction' endpoint responds with 400 Bad Request HTTP Status the application cannot proceed to the "Commit a transaction" endpoint. Specific error code/s will be returned with an array of offending fields. The application will need to resolve these errors and resubmit the transaction for validation. The application can make repeated attempts on the 'Update a transaction' endpoint until validation is successful.

Note: In some scenarios, enhanced due diligence needs to be undertaken on the consumer. Specific error code/s will be returned and an array of offending fields. The fields/values must to be provided and resubmitted on the Update API for further checks.


🚀

Launch Code Example

.

/>




7. You're Done! Proceed to 'Commit a Transaction API':

The application can call the 'Commit a Transaction' endpoint to execute the transfer when a 200 HTTP Success Status and the boolean "readyForCommit": true is returned on the Update response. The application must use the associated transactionId on the subsequent Commit API by providing it as a path parameter. The Commit endpoint is the final API call and will execute the transaction to MoneyGram.


Note: the application cannot proceed until the "readyForCommit": true. The Application must correct and resubmit the data to until they get a "readyForCommit": true




Business Rules to Code


🔍
  1. Making multiple PUT requests to Update the transactionId: if there are any changes needed for consumer data after the Update a transaction endpoint responds, the application should call the Update endpoint to using the same transactionId and provide new consumer/transactional data.

  2. **Enumerated fields:**For all Enumerated Fields (some examples below), agent application must use the valid enumerations returned from the enumerations API response and allow only valid values to be selected. Learn More

  3. Start online, fund in store: For digital application wanting to fund the transactions in store, set the "fundInStore": true.

  4. Telemarketing (US ONLY): It is regulatory requirement in the USA (only) to display a telemarketer notice to the start of every transaction, on every transfer, in every country and for every service option. The Telemarketer Notice must be displayed to the consumer before quoting the transaction on the Quote API. Learn More

  5. Fraud Warnings: It is regulatory requirement to show Fraud Warnings on every transfer, in every country and for every service option. The Fraud Warnings must be displayed to the consumer before the final transaction summary and before the transactionID is executed to MoneyGram on the Commit API.

    1. Fraud Warnings US Only
    2. Fraud Warnings Global

  6. Pre-disclosure: It is regulatory requirement to show pre-disclosure on every transfer, in every country and for every service option. Learn More




Video Tutorial




Code Examples


const axios = require('axios');
const { v4: uuidv4 } = require('uuid');

const updateTransaction = async () => {

    // Step 1: Read configuration values with upmost security
    const token = "your_access_token_from_oauth_response"
    // For production - api.moneygram.com & For test - sandboxapi.moneygram.com
    const transactionId = "current_transaction_id";
    const host = "sandboxapi.moneygram.com";
    const url = 'https://' + host + '/transfer/v1/transactions/' + transactionId;

    // Step 2: Create the PUT request headers & body
    const headers = {
        'Content-Type': 'application/json',
        'X-MG-ClientRequestId': uuidv4(), // New UUID for each request tracing
        'Authorization': 'Bearer ' + token,
    };
    const request = {
        agentPartnerId: "your_partner_id",
        targetAudience: "AGENT_FACING",
        userLanguage: "en-US",
        destinationCountryCode: "USA",
        destinationCountrySubdivisionCode: "US-MN",
        serviceOptionCode: "WILL_CALL",
        sendAmount: {
            currencyCode: "USD",
            value: 500
        },
        receiveCurrencyCode: "USD",
        sender: {
            name: {
                firstName: "firstName",
                middleName: "",
                lastName: "lastName",
                secondLastName: ""
            },
            address: {
                line1: "line 1 of address",
                line2: "line 2 of address",
                line3: "",
                city: "minneapolis",
                countrySubdivisionCode: "US-TN",
                countryCode: "USA",
                postalCode: "53325"
            },
            mobilePhone: {
                number: "6123456789",
                countryDialCode: "1"
            },
            personalDetails: {
                genderCode: "MALE",
                dateOfBirth: "1980-08-15",
                birthCountryCode: "USA",
                citizenshipCountryCode: "USA"
            },
            primaryIdentification: {
                typeCode: "PAS",
                id: "passport_id_number",
                issueCountrySubdivisionCode: "US-MN",
                issueCountryCode: "USA"
            }
        },
        receiver: {
            name: {
                firstName: "firstName",
                middleName: "",
                lastName: "lastName",
                secondLastName: ""
            }
        }
    }

    try {
        // Step 3: Send the request and obtain the response
        axios.put(url, request, { headers })
            .then(function (response) {
                // Step 4: Parse the success response and process further
                // Verify readyForCommit is true, if yes, transaction is ready to commit
                console.log(JSON.stringify(response.data, null, 2))
            })
            .catch(function (error) {
                // Step 5: Parse the error response and handle the errors
                if (error.response) {
                    console.log('Response status:', error.response.status);
                    console.log('Response body:', error.response.data);
                } else {
                    // TODO: handle generic errors
                    console.error('Error:', error.message);
                }
            });
    } catch (error) {
        // TODO: handle exception
        console.error('Error:', error.message);
    }
};

updateTransaction();
import requests
import uuid
import json

def update_transaction():
    # Step 1: Read configuration values with upmost security
    token = "your_access_token_from_oauth_response"
    # For production - api.moneygram.com & For test - sandboxapi.moneygram.com
    transactionId = "current_transaction_id";
    host = "sandboxapi.moneygram.com";
    url = 'https://' + host + '/transfers/v1/transactions/'+ transactionId;

    # Step 2: Create the POST request headers & body
    headers = {
        'Content-Type': 'application/json',
        'X-MG-ClientRequestId': str(uuid.uuid4()), # New UUID for each request tracing
        'Authorization': 'Bearer ' + token,
    }
    request = {
        'agentPartnerId': 'your_partner_id',
        'targetAudience': 'AGENT_FACING',
        'userLanguage': 'en-US',
        'destinationCountryCode': 'USA',
        'destinationCountrySubdivisionCode': 'US-MN',
        'serviceOptionCode': 'WILL_CALL',
        'sendAmount': {
            'currencyCode': 'USD',
            'value': 500
        },
        'receiveCurrencyCode': 'USD',
        'sender': {
                'name': {
                    'firstName': 'firstName',
                    'middleName': '',
                    'lastName': 'lastName',
                    'secondLastName': ''
                },
                'address': {
                    'line1': 'line 1 of address',
                    'line2': 'line 2 of address',
                    'line3': '',
                    'city': 'minneapolis',
                    'countrySubdivisionCode': 'US-TN',
                    'countryCode': 'USA',
                    'postalCode': '53325'
                },
                'mobilePhone': {
                    'number': '6123456789',
                    'countryDialCode': '1'
                },
                'personalDetails': {
                    'genderCode': 'MALE',
                    'dateOfBirth': '1980-08-15',
                    'birthCountryCode': 'USA',
                    'citizenshipCountryCode': 'USA'
                },
                'primaryIdentification': {
                    'typeCode': 'PAS',
                    'id': 'passport_id_number',
                    'issueCountrySubdivisionCode': 'US-MN',
                    'issueCountryCode': 'USA'
                }
            },
            'receiver': {
                'name': {
                    'firstName': 'firstName',
                    'middleName': '',
                    'lastName': 'lastName',
                    'secondLastName': ''
                }
            }
    }

    try:
        # Step 3: Send the request and obtain the response
        response = requests.put(url, json=request, headers=headers)

        # Step 4: Parse the success response and process further
        if response.status_code == 200:
            parsed_response = json.dumps(json.loads(response.text), indent=2)
            print(parsed_response)
        else:
            # Step 5: Parse the error response and handle the errors
            print("Request failed with status code:", response.status_code)
            print(json.dumps(json.loads(response.text), indent=2))

    except requests.exceptions.RequestException as e:
        # Print any error that occurred during the request
        # TODO: handle exception
        print("An error occurred:", e)

update_transaction()
package transfers;

import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonObjectBuilder;
import javax.json.JsonWriter;
import java.io.StringWriter;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.UUID;

public class UpdateTransaction {

    public static void main(String[] args) {
        // Step 1: Read configuration values with upmost security
        String token = "your_access_token_from_oauth_response";

        // For production - api.moneygram.com & For test - sandboxapi.moneygram.com
        String host = "sandboxapi.moneygram.com";
        String transactionId = "current_transaction_id";
        String tokenEndpoint = "https://" + host + "/transfer/v1/transactions/" + transactionId;

        // Step 2: Create the PUT request headers & body
        // Create a JSON object
        JsonObjectBuilder sendAmountBuilder = Json.createObjectBuilder()
                .add("currencyCode", "USD")
                .add("value", 500);
        JsonObjectBuilder senderBuilder = Json.createObjectBuilder()
                .add("name", Json.createObjectBuilder().add("firstName", "firstName").add("lastName", "lastName"))
                .add("address", Json.createObjectBuilder().add("line1", "line1 of address").add("city", "minneapolis")
                        .add("countryCode", "USA").add("countrySubdivisionCode", "US-MN").add("postalCode", "55335"))
                .add("mobilePhone", Json.createObjectBuilder().add("number", "6123456789").add("countryDialCode", "1"))
                .add("personalDetails", Json.createObjectBuilder().add("dateOfBirth", "1980-01-15").add("birthCountryCode", "USA"))
                .add("primaryIdentification", Json.createObjectBuilder().add("typeCode", "PAS").add("id", "passport_id_number").add("issueCountryCode", "USA"));
        JsonObjectBuilder receiverBuilder = Json.createObjectBuilder()
                .add("name", Json.createObjectBuilder().add("firstName", "firstName").add("lastName", "lastName"));
        JsonObjectBuilder requestBuilder = Json.createObjectBuilder()
                .add("agentPartnerId", "your_partner_id")
                .add("targetAudience", "AGENT_FACING")
                .add("userLanguage", "en-US")
                .add("destinationCountryCode", "USA")
                .add("destinationCountrySubdivisionCode", "US-MN")
                .add("serviceOptionCode", "WILL_CALL")
                .add("sendAmount", sendAmountBuilder)
                .add("receiveCurrencyCode", "USD")
                .add("sender", senderBuilder)
                .add("receiver", receiverBuilder);

        JsonObject jsonObject = requestBuilder.build();
        // Create a StringWriter to write the JSON string
        StringWriter stringWriter = new StringWriter();
        try (JsonWriter jsonWriter = Json.createWriter(stringWriter)) {
            jsonWriter.writeObject(jsonObject);
        }
        // Get the JSON string from the StringWriter
        String jsonString = stringWriter.toString();

        HttpClient httpClient = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(tokenEndpoint))
                .PUT(HttpRequest.BodyPublishers.ofString(jsonString))
                .setHeader("Authorization", "Bearer " + token)
                .setHeader("X-MG-ClientRequestId", String.valueOf(UUID.randomUUID()))
                .build();

        try {
            // Step 3: Send the request and obtain the response
            HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());

            // Retrieve the status code and body from the response
            int statusCode = response.statusCode();

            // Step 4: Parse the success response and process further
            if (statusCode == 200) {
                String responseBody = response.body();
                System.out.println(responseBody);
            } else {
                // Step 5: Parse the error response and handle the errors
                String responseBody = response.body();
                System.out.println(responseBody);
            }
        } catch (Exception e) {
            e.printStackTrace();
            // TODO: handle exception
        }
    }
}




Support APIs

To make your development easier, MoneyGram has provided a Reference Data APIs Module that can be queried to provide a list of supported fields, values and associated meta-data to use in your integration.

NameHTTP MethodEndpointsDescription
Retrieve CountriesGET/reference-data/v1/CountryRetrieves supported values and metadata for countries
Retrieve Countries ISO3GET/reference-data/v1 /countries/{iso3Code}Retrieves supported values and metadata for countries by ISO 3 Code
Retrieve CurrenciesGET/reference-data/v1/currenciesRetrieves supported values and metadata for currencies
Retrieve EnumerationsGET/reference-data/v1/enumerationsRetrieves enumerated values for fields
Retrieve Identification DocumentsGET/reference-data/v1/identification-DocumentsRetrieves required fields for identification documents
Retrieve Service OptionsGET/reference-data/v1/payout-optionsRetrieves supported values and metadata for Service Options
Retrieve Fields for a TransferGET/reference-data/v1/transaction-fields-sendRetrieves all the required, and optional fields, and metadata for a send transaction based a service option, destination country, send amount, and send and receive currency.
Retrieve Fields for a PayoutGET/reference-data/v1/transaction-fields-receiveRetrieves all the required, and optional fields, and metadata for a send transaction based a service option, receive amount, and receive currency.



API Structure


Header Parameters

FieldTypeRequired /OptionalDescription
X-MG-ClientRequestIdStringRequiredClient Request Id that can be passed by the client application. Client request Id must be unique within a single session for unique requests. This attribute can be used for ensuring idempotent request processing for some APIs. MoneyGram recommends using a UUID for the value of this field.
X-MG-ConsumerIPAddressStringOptionalIP Address of the system initiating the session



Path Parameters

Path ParameterTypeRequired /OptionalDescription
transactionIdString Max length: 36RequiredUnique id of the transaction resource



Request Body Parameters

Body ParameterDescription
TransactBySendAmountRequestTransact by send amount
TransactByReceiveAmountRequestTransact by receive amount



Request Body Fields

FieldTypeRequired /OptionalDescription
targetAudienceStringOptionalTailors MoneyGram’s error messages and field metadata to an in-store, digital or crypto consumer. (Enumerated value) _NOTE: For a full list of accepted target audience values. See the TARGET_AUDIENCE enumeration from the Reference Data Enumerations endpoint _
agentPartnerIdString Max length: 8RequiredUnique identifier for the agent or partner
posIdStringOptionalPoint of sale identifier of the client performing the API Call
operatorIdStringRequiredOperator name or ID of the user performing the transaction. Name or ID must be populated from the agent/partner system and cannot be edited by the user.
userLanguageString Max length: 6OptionalLanguage used by the user/operator
destinationCountryCodeString Max Length: 3RequiredTransaction Destination Country (ISO alpha-3 code) NOTE: For a full list of accepted destination Countries and supported destinationCountrySubdivisionCode see Reference Data API Module: Retrieve Countries ISO3 endpoint
destinationCountrySubdivisionCodeString Max length: 6Conditionally RequiredDestination state/province is conditionally required when transacting to the United States or Canada. NOTE: For a full list of accepted destination Countries and supported destinationCountrySubdivisionCode see Reference Data API Module: Retrieve Countries ISO3 Endpoint
serviceOptionCodeString Max length: 21RequiredUnique category code to identify the transaction method NOTE: For a full list of accepted service option codes per destination country see the Reference Data API Module: service-options endpoint
serviceOptionRoutingCodeString Max length: 21RequiredUnique identifier of the individual banking, wallet, or card provider for the service option. NOTE: For a full list of accepted service option codes per destination country see the Reference Data API Module: service-options endpoint
sendAmount.valueString Min length: 0 Max length: 14 Max Decimal Value: 3RequiredTransaction amount and currency excluding fees and exchange rate. NOTE: For Crypto partners this is the fiat currency for the BUY/Sell or Ramp-on/Ramp-off For a full list of transaction currency codes see the API Reference Data Module: currencies endpoint
sendAmount.currencyCodeString Max length: 3RequiredThe sendAmount.value currency code for a transactBySendAmountRequest (ISO alpha-3 code)
receiveCurrencyCodeString Max length: 3RequiredReceive currency code for the destination country transactBySendAmount Request (ISO alpha-3 code)
receiveAmount.valueString Min length: 0 Max length: 14 Max Decimal Value: 3RequiredTransaction receive amount excluding fees and exchange rate for a transactByReceiveAmountRequest Transaction Currency (ISO alpha-3 code) NOTE: For Crypto partners this is the fiat currency for the BUY/Sell or Ramp-on/Ramp-off
receiveAmount.currencyCodeString Max length: 3RequiredThe receiveAmount.value currency code for a transactByReceiveAmountRequest (ISO alpha-3 code)
sendCurrencyCodeString Max length: 3RequiredReceive currency is needed when transacting to a destination country that supports more than one currency for a transactByReceiveAmount Request (ISO alpha-3 code)
promotionCodes[Array] String Max length: 20OptionalUnique code to apply a promotional discount
rewardsNumberString Max length: 20OptionalUnique code to apply Loyalty accrual/redemption (MoneyGram Plus Number)
placeOnPartnerHoldBooleanOptionalRequest MoneyGram to place the transaction on hold
fundInStore.fundInStoreBooleanOptionalFlag to indicate transaction is to be funded in store within a 24hour period
fundInStore.fundInStoreAgentPartnerIdString Max length: 8OptionalUnique store identifier where transaction will be funded
fundingSource.tenderTypeStringoptionalFunding method, based on enumerations
fundingSource.providerStringoptionalName of the payment provider
fundingSource.providerNetworkCodeStringoptionalProviders unique network identifier code
fundingSource.providerAccountNumberStringoptionalAccount number of payment source
fundingSource.accountIdentifierStringOptionalMoneyGram's unique identifier for the consumer account
targetAccountProfileIdStringOptionalUnique Identifier for Target Account Resource
targetAccountDynamicOptionalDynamic field key/values See the list of all possible targetAccount on the Create Target Account Profile page.
sender.name.firstNameString Min length: 1 Max length: 20RequiredFirst Name
sender.name.middleNameString Min length: 1 Max length: 20OptionalMiddle Name (if applicable)
sender.name.lastNameString Min length: 1 Max length: 30RequiredLast Name
sender.name.secondLastNameString Min length: 1 Max length: 30OptionalSecond Last Name
sender.address.line1String Min length: 5 Max length: 30RequiredResidence address line 1
sender.address.line2String Min length: 0 Max length: 80OptionalResidence address line 2 (if applicable)
sender.address.line3String Min length: 0 Max length: 80OptionalResidence address line 3 (if applicable)
sender.address.cityString Min length: 1 Max length: 40RequiredCity of residence
sender.address.countrySubdivisionCodeString Length: 6OptionalState/province of residence
sender.address.countryCodeString Length: 3RequiredCountry of residence (ISO Alpha-3 Code)
sender.address.postalCodeString Min length: 2 Max length: 6OptionalPostal code/ZIP of residence
sender.mobilePhone.numberString Min length: 5 Max length: 14RequiredPhone number
sender.mobilePhone.countryDialCodeString Min length: 1 Max length: 3RequiredCountry calling code NOTE: For country calling code see Reference Data API Module /countries endpoint phoneDialCodes
sender.emailString Min length: 1 Max length: 255OptionalEmail address
sender.enrolInRewardsBooleanOptionalEnroll in MoneyGram's Plus Rewards program
sender.notificationPreferences.typeStringOptionalConsumer notification preference types
sender.notificationPreferences.channelStringOptionalDelivery method of notification NOTE: For notification preference channels see: Reference Data API Module CNSMR_OPTIN
sender.notificationPreferences.optInBooleanOptionalFlag to declare consumer opts-in to notification type and method
sender.notificationLanguagePreferenceString Max length: 6OptionalLanguage (ISO alpha-3 code)
sender.personalDetails.genderCodeStringOptionalGender (Enumerated Value)
sender.personalDetails.dateOfBirthString Length: 10RequiredDate of birth (YYYY-MM-DD)
sender.personalDetails.birthCityString Min length: 0 Max length: 40OptionalCity of birth
sender.personalDetails.birthCountryCodeString Max Length: 3RequiredCountry of birth (ISO alpha-3 code) NOTE: For a full list of accepted birth.CountryCodes see ‘Reference Data API Module’ and the Retrieve Countries ISO3 endpoint: ]
sender.personalDetails.citizenshipCountryCodeString Max Length: 3OptionalCountry of birth. (ISO alpha-3 code)
sender.personalDetails.occupationCodeStringOptionalOccupation/Employment (Enumerated Value) NOTE: For a full list of accepted occupation codes see Reference Data Enumerations endpoint
sender.personalDetails.politicalExposedPersonBooleanOptionalFlag to declare a Politically Exposed Person (PEP)
sender.personalDetails.nationalityCountryCodeString Min Length: 3 Max Length: 3OptionalCountry of citizenship (ISO alpha-3 code)
sender.primaryIdentification.typeCodeString Max length: 3RequiredType of identification document (Enumerated Value) NOTE: For a full list of accepted Identification documents by country. see Reference Data Enumerations endpoint
sender.primaryIdentification.idString Max length: 30RequiredIdentification document number
sender.primaryIdentification.issueCountrySubdivisionCodeString Max length: 6OptionalIssuing state/province of identification document.
sender.primaryIdentification.issueCountryCodeString Max Length: 3RequiredIssuing country of identification document (ISO alpha-3 code)
sender.primaryIdentification.expirationYearString Length: 4 Format: YYYYOptionalExpiration year of identification document (YYYY)
sender.primaryIdentification.expirationMonthString Length: 2 Format: MMOptionalExpiration month of identification document (MM)
sender.primaryIdentification.expirationDayString Length: 2 Format: DDOptionalExpiration month of identification document (DD)
sender.primaryIdentification.issueAuthorityString Min length: 0 Max length: 30OptionalIssuing authority of identification document
sender.primaryIdentification.issueCityString Min length: 0 Max length: 40OptionalIssuing city of identification document
sender.primaryIdentification.issueYearString Length: 4 Format: YYYYOptionalIssuing year of identification document (YYYY)
sender.primaryIdentification.issueMonthString Length: 2 Format: MMOptionalIssuing month of identification document (MM)
sender.primaryIdentification.issueDayString Length: 2 Format: DDOptionalIssuing day of identification document (DD)
sender.secondaryIdentification.typeCodeString Max length: 3OptionalType of identification document (Enumerated Value)
sender.secondaryIdentification.idString Max length: 30OptionalIdentification document number
sender.secondaryIdentification.issueCountrySubdivisionCodeString Max length: 6OptionalIssuing state/province of identification document.
sender.secondaryIdentification.issueCountryCodeString Max length: 3RequiredIssuing country of identification document. (ISO alpha-3 code)
sender.secondaryIdentification.expirationYearString Length: 4 Format: YYYYOptionalExpiration year of identification document (YYYY)
sender.secondaryIdentification.expirationMonthString Length: 2 Format: MMOptionalExpiration month of identification document (MM)
sender.secondaryIdentification.expirationDayString Length: 2 Format: DDOptionalExpiration month of identification document (DD)
sender.secondaryIdentification.issueAuthorityString Min length: 0 Max length: 30OptionalIssuing authority of identification document
sender.secondaryIdentification.issueCityString Min length: 0 Max length: 40OptionalIssuing city of identification document
sender.secondaryIdentification.issueYearString Length: 4 Format: YYYYOptionalIssuing year of identification document (YYYY)
sender.secondaryIdentification.issueMonthString Length: 4 Format: MMOptionalIssuing month of identification document (MM)
sender.secondaryIdentification.issueDayString Length: 4 Format: DDOptionalIssuing day of identification document (DD)
sender.additionalAddress.typestringOptionalType of Additional address (Enumerated Values)
sender.additionalAddress.line1String Min length: 5 Max length: 30RequiredResidence address line 1
sender.additionalAddress.line2String Min length: 0 Max length: 80OptionalResidence address line 2 (if applicable)
sender.additionalAddress.line3String Min length: 0 Max length: 80OptionalResidence address line 3 (if applicable)
sender.additionalAddress.cityString Min length: 1 Max length: 40RequiredCity of residence
sender.additionalAddress.countrySubdivisionCodeString Max Length: 6OptionalState/province of residence
sender.additionalAddress.countryCodeString Max length: 3RequiredCountry of residence (ISO Alpha-3 Code)
sender.additionalAddress.postalCodeString Min length: 2 Max length: 6OptionalPostal code/ZIP of residence
sender.additionalFamilyNames.typeStringOptionalType of family name (Enumerated Values) - FATHERS_S_NAME - MOTHER_S_NAME - SIBLING_S_NAME - NAME_AT_BIRTH - MOTHERS_MAIDEN_NAME - GRANDFATHER_S_NAME
sender.additionalFamilyNames.firstNameString Min length: 0 Max length: 20OptionalFirst Name
sender.additionalFamilyNames.middleNameString Min length: 0 Max length: 20OptionalMiddle Name (if applicable)
sender.additionalFamilyNames.lastNameString Min length: 0 Max length: 30OptionalLast Name
sender.additionalFamilyNames.secondLastNameString Min length: 0 Max length: 30OptionalSecond Last Name
sender.profileIdStringOptionalConsumer's unique identifier
sender.additionalDetailsStringOptionalDynamic field key/values
receiver.name.firstNameString Min length: 1 Max length: 20RequiredFirst Name
receiver.name.middleNameString Min length: 0 Max length: 20OptionalMiddle Name (if applicable)
receiver.name.lastNameString Min length: 1 Max length: 30RequiredLast Name
receiver.name.secondLastNameString Min length: 0 Max length: 30OptionalSecond Last Name
receiver.address.line1String Min length: 5 Max length: 30Conditionally RequiredResidence address line 1
receiver.address.line2String Min length: 0 Max length: 80OptionalResidence address line 2 (if applicable)
receiver.address.line3String Min length: 0 Max length: 80OptionalResidence address line 3 (if applicable)
receiver.address.cityString Min length: 1 Max length: 20Conditionally RequiredCity of residence
receiver.address.countrySubdivisionCodeString Max length: 6OptionalState/province of residence
receiver.address.countryCodeString Max length: 3Conditionally RequiredCountry of residence (ISO Alpha-3 Code)
receiver.address.postalCodeString Min length: 2 Max length: 6OptionalPostal code/ZIP of residence
receiver.mobilePhone.numberString Min length: 5 Max length: 14OptionalPhone number
receiver.mobilePhone.countryDialCodeString Min length: 1 Max length: 3OptionalCountry dial code
receiverSameAsSenderBooleanOptionalFlag to indicate the receiver and sender are the same person NOTE: If this flag is marked true, receiver.name fields are considered 'Optional' and are not needed to be passed on API request
transactionInformation.purposeOfTransactionCodeStringOptionalExplanation or reason for transferring funds (Enumerated Values) NOTE: For a full list of accepted purpose of transaction values. See the PURPSE_OF_TRNSCTION enumeration from the Reference Data Enumerations endpoint
transactionInformation.sourceOfFundsCodeStringOptionalDeclaration of where the transaction funds were sourced (Enumerated Values) NOTE: For a full list of accepted source of funds values. See the SOURCE_OF_FUNDS enumeration from the Reference Data Enumerations endpoint
transactionInformation.proofOfFundsCodeStringOptionalProof of where the transaction funds were sourced (Enumerated Values) NOTE: For a full list of accepted proof of funds values. See the PROOF_OF_FUNDS enumeration from the Reference Data Enumerations endpoint
transactionInformation.intendedUseOfMGIServicesCodeString Max length: 30OptionalExplanation for using MoneyGram service (Enumerated Values) NOTE: For a full list of accepted use of MGI services values. See the TYPICAL_USE_OF_MGI enumeration from the Reference Data Enumerations endpoint
transactionInformation.relationshipToReceiverString Max length: 30OptionalDeclaration of consumer's relationship to the counter party (Enumerated Values) NOTE: For a full list of relationships values. See the RLTIONSHP_TO_RECIVR enumeration from the Reference Data Enumerations endpoint
receipt.primaryLanguageString Max length: 3OptionalPrimary receipt language of the transacting partner
receipt.secondaryLanguageString Max length: 3OptionalSecondary receipt language of the transacting partner
receipt.imageStringOptionalReceipt image string of the transacting partner
partnerTransactionIdStringOptionalPartner’s unique session identifier
additionalDetailsDynamicOptionalDynamic field key/values



Response Fields

FieldTypeRequired /OptionalDescription
readyForCommitBooleanOptionalIndicates whether the transaction can proceed to commit
rewardsNumberString Max length: 20OptionalUnique code to apply Loyalty accrual/redemption (MoneyGram Plus Number)
transactionIdString Max length: 36OptionalUnique identifier for the transaction resource
serviceOptionCodeString Max length: 21OptionalConsumer facing name to identify the transaction method
serviceOptionNameString Max length: 40RequiredConsumer facing name to identify the transaction method
serviceOptionRoutingCodeStringOptionalUnique code to identify the individual transaction method NOTE: For a full list of accepted service option routine codes per destination country see the Reference Data API Module: service-options endpoint
serviceOptionRoutingNameStringOptionalUnique name to identify the individual transaction method
sendAmount.amount.valueString Max length: 14RequiredTransaction amount and currency excluding fees and exchange rate. Transaction Currency (ISO alpha-3 code) For Crypto partners this is the fiat currency for the BUY/Sell or Ramp-on/Ramp-off
sendAmount.amount.currencyCodeStringRequiredThe sendAmount.amount.value currency code (ISO alpha-3 code)
sendAmount.fees.valueString Min length: 0 Max length: 14RequiredFee Amount and Fee Currency applied to transaction (Fee currencyCode uses ISO alpha-3 code)
sendAmount.fees.valueStringRequiredThe sendAmount.fees.value currency code (ISO alpha-3 code)
sendAmount.taxes.valueString Min length: 0 Max length: 14OptionalTax Amount and Tax Currency applied to the Transaction by the the origin country (Tax currencyCode uses ISO alpha-3 code)
sendAmount.taxes.currencyCodeStringOptionalThe sendAmount.taxes.value currency code (ISO alpha-3 code)
sendAmount.additionalCharges.typeCodeStringOptionalCode to indicate if the fee is to be collected by MoneyGram or the partner
sendAmount.additionalCharges.labelStringOptionalConsumer facing name to identify the charge type
sendAmount.additionalCharges.valueStringOptionalAdditional fee's amount
sendAmount.additionalCharges.currencyCodeStringOptionalThe sendAmount.additionalCharges.value currency (ISO alpha-3 code)
sendAmount.discountsApplied.totalDiscountString Min length: 0 Max length: 14OptionalTransaction discount amount applied and currency type excluding fees and exchange rate. Transaction discount currencyCode (ISO alpha-3 code)
sendAmount.discountsApplied.promotionDetailsString Min length: 0 Max length: 14OptionalAdditional Details about the applied promotion to the transaction. currencyCode (ISO alpha-3 code)
sendAmount.total.valueString Max length: 14RequiredTransaction Total Amount and Transaction Total Currency including fees, taxes and discount. (Total currencyCode uses ISO alpha-3 code)
sendAmount.total.currencyCodeStringRequiredThe sendAmount.total.value currency code (ISO alpha-3 code)
receiveAmount.amount.valueString Max length: 14RequiredTransaction Received Amount and Transaction Receive currency. (Receive amount currencyCode uses ISO alpha-3 code)
receiveAmount.amount.currencyCodeStringRequiredThe receiveAmount.amount.value currency code (ISO alpha-3 code)
receiveAmount.fees.valueString Min length: 0 Max length: 14OptionalReceived Fee and Receive Currency applied to the transaction by the destination country. (Receve fee currencyCode uses ISO alpha-3 code)
receiveAmount.fees.currencyCodeStringOptionalThe receiveAmount.fees.value currency code (ISO alpha-3 code)
receiveAmount.taxes.valueString Min length: 0 Max length: 14OptionalTax Amount and Tax Currency applied to the Transaction by the the origin country. (Receive taxes currencyCode uses ISO alpha-3 code)
receiveAmount.taxes.currencyCodeStringOptionalThe receiveAmount.taxes.value currency code (ISO alpha-3 code)
receiveAmount.additionalCharges.typeCodeStringOptionalCode to indicate if the fee is to be collected by MoneyGram or the partner
receiveAmount.additionalCharges.labelStringOptionalConsumer facing name to identify the charge type
receiveAmount.additionalCharges.valueStringOptionalAdditional fee's amount
receiveAmount.additionalCharges.currencyCodeStringOptionalThe receiveAmount.additionalCharges.value currency code (ISO alpha-3 code)
receiveAmount.total.valueString Max length: 14RequiredReceive Amount Total and Receive Transaction Currency to be picked-up/deposited in destination country including fees, taxes and discount (Receive total currencyCode uses ISO alpha-3 code)
receiveAmount.total.currencyCodeStringRequiredThe receiveAmount.total.value currency code (ISO alpha-3 code)
receiveAmount.fxRateNumber Max length: 6RequiredFx Rate applied to transaction
receiveAmount.fxRateEstimatedBooleanOptionalIndicates whether the Fx is “estimated” and amount, taxes and total cannot be guaranteed. The word “estimated” must appear before receiveAmount.amount, receiveAmount.fees, receiveAmount.taxes and receiveAmount.total only when true.
targetAccountProfileIdStringOptionalUnique Identifier for Target Account Resource
additionalDetailsDynamicOptionalDynamic field key/values