PUT Update a Transaction

PUT /disbursement/v1/transactions/{transactionId}

Development Guide

The 'Update a Transaction' endpoint determines the information to collect from the business, 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 & transactionDetails to the request body:

The the application must use the oneOf Keyword to provide the sender information. The application can use three oneOf options to provide sender information:


  • Option 1 - businessProfileId: For partner using MoneyGram business profile, the applications can provide MoneyGram businessProfileId. To use this option, the application must first call the Create Business Profile API to create a business profile at MoneyGram and generate a businessProfileId. The businessProfileId is a unique identifier of the business and will last the life time of the account.
    OR

  • Option 2 - partnerBusinessProfileId: For partners using their own business profile, the application can pass their unique profile identifier in the partnerBusinessProfileId . The application must first call the Create Business Profile API to create a business profile at MoneyGram and pass their unique partnerBusinessProfileId. MoneyGram will associate the partner's identifier with our business profile creation.
    OR

  • Option 3 - business: For partners using a account-free model, the application can pass all business sender fields in the business object.

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 the Beneficiary REQUIRED fields to the request body:

The the application must use the oneOf Keyword to provide the beneficiary . The application can use two oneOf options to provide beneficiary information, depending on whether the application is performing a B2B or B2C transaction:


  • Option 1 - business: For partner performing a Business-to-Business (B2B) transaction, the application can provide business details as the beneficiary.
    OR

  • Option 2 - consumer: For partner performing a Business-to-Consumer (B2C) transaction, the application can provide consumer details as the beneficiary.

🚀

Launch Code Example

.




6. 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




7. 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. The response will include the "readytoCommit": true, transactionId, businessProfileId, 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

.




8. 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. Pre-disclosure: It is regulatory requirement to show pre-disclosure on every transfer, in every country and for every service option. Learn More

  5. Bank, mobile wallet & card deposit service-options: The transaction information must include all the required fields for the selected bank, mobile wallet, or card deposit service option. The required fields all available service options can be found in the Reference Data account deposit-fields API.




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 host = "sandboxapi.moneygram.com";
    const transactionId = "current_transaction_id";
    const url = 'https://' + host + '/disbursement/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: {
            value: 500,
            currencyCode: "USD"
        },
        receiveCurrencyCode: "USD",
        sender: {
            business: {
                businessName: "ACME",
                legalEntityName: "ACME",
                businessRegistrationNumber: "ACME2024",
                businessCountryOfRegistration: "USA",
                address: {
                    line1: "100 Main St",
                    city: "Springfield",
                    countryCode: "USA"
                }
            }
        },
        beneficiary: {
            consumer: {
                name: {
                    firstName: "Sally",
                    lastName: "Smith"
                },
                address: {
                    line1: "200 Main St",
                    city: "Springfield",
                    countryCode: "USA"
                }
            }
        }
    }
    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    
    host = "sandboxapi.moneygram.com";
    transactionId = "current_transaction_id";
    url = 'https://' + host + '/disbursement/v1/transactions/'+ transactionId;

    # Step 2: Create the PUT 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': {
          'business': {
              'businessName': "ACME",
              'legalEntityName': "ACME",
              'businessRegistrationNumber': "ACME2024",
              'businessCountryOfRegistration': "USA",
                   'address': {
                      'line1': "100 Main St",
                      'city': "Springfield",
                      'countryCode': "USA"
              }
         }
    },
      'beneficiary': {
         'consumer': {
          'name': {
            'firstName': "Sally",
            'lastName': "Smith"
          },
           'address': {
            'line1': "200 Main St",
            'city': "Springfield",
            'countryCode': "USA"
          }
      }
    }
}

    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 disbursement;

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 + "/disbursement/v1/transactions/" + transactionId;

        // Step 2: Create the PUT request headers & body
        // Create a JSON object
        JsonObjectBuilder sendAmountBuilder = Json.createObjectBuilder()
            .add("value", 500)
            .add("currencyCode", "USD");
        JsonObjectBuilder senderBuilder = Json.createObjectBuilder()
            .add("sender", "business")
            .add("businessName", "ACME")
            .add("legalEntityName", "ACME")
            .add("businessRegistrationNumber", "ACME2024")
            .add("businessCountryOfRegistration", "USA");
        JsonObjectBuilder beneficiaryBuilder = Json.createObjectBuilder()
            .add("beneficiary", "consumer")
            .add("name", Json.createObjectBuilder().add("firstName", "firstName").add("lastName", "lastName"))
            .add("address",Json.createObjectBuilder().add("line1", "line1").add("city", "city").add("countryCode", "countryCode"));
        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", senderInitiator)
            .add("beneficiary", beneficiaryBuilder);

        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 Account Deposit FieldsGET/reference-data/v1/account-depositRetrieves required fields for account deposit delivery option
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



API Structure


Header Parameters

Name

Type

Required
/Optional

Description

X-MG-ClientRequestId

String

Required

Client 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-ConsumerIPAddress

String

Optional

IP Address of the system initiating the session


Path Parameters

Path Parameter

Type

Required/Optional

Description

transactionId

String
Max length: 36

Required

Unique id of the transaction resource


Request Body Parameters


Body ParameterDescription
transactBySendAmountRequestTransact by send amount
transactByReceiveAmountRequestTransact by receive amount



Request Body Fields

Partner Information, Service Option, Destination, Amounts

Field

Type

Required
/Optional

Description

targetAudience

String

Required

Tailors MoneyGram’s error messages and field metadata to an in-store, digital or crypto customer. (Enumerated value)
NOTE: For a full list of accepted target audience values. See the TARGET_AUDIENCE enumeration from the Reference Data Enumerations endpoint

agentPartnerId

String
Max length: 8

Required

Unique identifier for the agent or partner

userLanguage

String
Max length: 6

Optional

Language used by the user/operator

partnerTransactionId

String

Optional

Partner’s unique identifier for the transaction resource.

destinationCountryCode

String
Max Length: 3

Required

Transaction 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

destinationCountrySubdivisionCode

String
Max length: 6

Optional

Destination state/province is conditionally required when transacting to certain destination countries. (ISO alpha-3 code)
NOTE: For a full list of accepted destination countries and supported destination country subdivision codes see Reference Data API Module: Retrieve Countries ISO3 endpoint

serviceOptionCode

String
Max length: 21

Required

Unique 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

serviceOptionRoutingCode

String
Max length: 21

Required

Unique 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.value

Number
Min length: 0
Max length: 14
Max Decimal Value: 3

Required

Transaction 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.currencyCode

String
Max length: 3

Required

The sendAmount.value currency code (ISO alpha-3 code) for a transactBySendAmountRequest

receiveCurrencyCode

String
Max length: 3

Required

Receive Currency is needed when transacting to a destination country that supports more than one currency for a transactBySendAmountRequest (ISO alpha-3 code)

receiveAmount.value

Number
Min length: 0
Max length: 14
Max Decimal Value: 3

Required

Transaction receive amount excluding fees and exchange rate for a transactByReceiveAmountRequest
Transaction Currency (ISO alpha-3 code)

receiveAmount.currencyCode

String
Max length: 3

Required

The receiveAmount.value currency code (ISO alpha-3 code) for a transactByReceiveAmountRequest

sendCurrencyCode

String
Max length: 3

Optional

Receive currency is needed when transacting to a destination country that supports more than one currency for a transactByReceiveAmount Request (ISO alpha-3 code)

promotionCodes

String
Max length: 20

Optional

Unique code to apply a promotional discount


Sender oneOf Options:

The sender target="_blank""> "oneOf" options allow the application to collect the business sender information for a transaction using one of three options businessProfileId, partnerBusinessProfileId, or business


Option 1: sender.businessProfileId

Field

Type

Required
/Optional

Description

sender.businessProfileId

String

Optional

A unique MoneyGram identifier for the business.


Option 2: sender.partnerBusinessProfileId

Field

Type

Required
/Optional

Description

sender.partnerBusinessProfileId

String

Optional

The partner’s business profile ID that will be passed from the partner and mapped to the MoneyGram business profile ID.


Option 3: sender.business

Field

Type

Required
/Optional

Description

sender.business.BusinessProfileId

String

Optional

The partner’s business profile ID that will be passed from the partner and mapped to the MoneyGram business profile ID.

sender.business.businessName

String
Min Length: 1
Max Length: 100

Required

Name of the business

sender.business.legalEntityName

String
Min Length: 1
Max Length: 100

Required

The legal name of the business

sender.business.businessType

String

Optional

Type of business
(Enumerated Values)

sender.business.businessRegistrationNumber

String

Required

Business registration number

sender.business.businessIssueDate

String

Optional

Date of business formation

sender.business.businessCountryOfRegistration

String
Length: 3

Required

Business’s country of registration

sender.business.address.line1

String
Min length: 5
Max Length: 30

Required

Business address line 1

sender.business.address.line2

String
Min length: 0
Max length: 30

Optional

Business address line 2 (if applicable)

sender.business.address.line3

String
Min length: 0
Max length: 30

Optional

Business address line 3 (if applicable)

sender.business.address.city

String
Min length: 1
Max length: 20

Required

Business city

sender.business.address.countryCode

String
Length: 3

Required

Country of business (ISO Alpha-3 Code)

sender.business.address.countrySubdivisionCode

String
Length: 6

Optional

State/province of business

sender.business.address.postalCode

String
Min length: 2
Max length: 6

Optional

Postal code/ZIP of business

sender.business.contactDetails.email

String
Min length: 1
Max length: 255

Optional

Email address

sender.business.contactDetails.phone.number

String
Min length: 5
Max length: 14

Optional

Business phone number

sender.business.contactDetails.phone.countryDialCode

String
Min length: 1
Max length: 3

Optional

Country calling code
NOTE: For country calling code see Reference Data API Module /countries endpoint phoneDialCodes


Beneficiary oneOf Options:

The beneficiary "oneOf" options allow the application to collect the beneficiary information for a transaction using one of two different options business, or consumer.


Option 1: beneficiary.business

Field

Type

Required
/Optional

Description

beneficiary.business.partnerBusinessProfileId

String

Optional

Partner’s business profile ID that will be passed from the partner and mapped to the MoneyGram profile ID.

beneficiary.business.businessName

String
Min Length: 1
Max Length: 100

Required

Name of the business

beneficiary.business.legalEntityName

String
Min Length: 1
Max Length: 100

Optional

The legal name of the business

beneficiary.business.businessType

String

Optional

Type of business
(Enumerated Values)

beneficiary.business.businessRegistrationNumber

String

Required

Business registration number

beneficiary.business.businessIssueDate

String

Optional

Date of business formation

beneficiary.business.businessCountryOfRegistration

String

Required

Business’s country of registration

beneficiary.business.address.line1

String
Min length: 5
Max length: 30

Required

Business address line 1

beneficiary.business.address.line2

String
Min length: 0
Max length: 30

Optional

Business address line 2 (if applicable)

beneficiary.business.address.line3

String
Min length: 0
Max length: 30

Optional

Business address line 3 (if applicable)

beneficiary.business.address.city

String
Min length: 1
Max length: 20

Required

Business city

beneficiary.business.address.countrySubdivisionCode

String
Length: 6

Optional

State/province of business
NOTE: For a full list of accepted countries and supported destination country subdivision codes, see Reference Data API Module: Retrieve Countries ISO3 endpoint

beneficiary.business.address.countryCode

String
Length: 3

Required

Business country (ISO Alpha-3 Code)
NOTE: For a full list of accepted countries and supported destination country subdivision codes, see Reference Data API Module: Retrieve Countries ISO3 endpoint

beneficiary.business.address.postalCode

String
Min length: 2
Max length: 6

Optional

Postal/ZIP code of business

beneficiary.business.contactDetails.email

String
Min length: 1
Max length: 255

Optional

Email address

beneficiary.business.contactDetails.mobilePhone.number

String
Min length: 5
Max length: 14

Optional

Phone number

beneficiary.business.contactDetails.mobilePhone.countryDialCode

String
Min length: 1
Max length: 5

Optional

Country calling code (ISO alpha-3 code)


Option 2: beneficiary.consumer

Field

Type

Required
/Optional

Description

beneficiary.consumer.name.firstName

String
Min length: 1
Max length: 20

Required

First Name

beneficiary.consumer.name.middleName

String
Min length: 1
Max length: 20

Optional

Middle Name (if applicable)

beneficiary.consumer.name.lastName

String
Min length: 1
Max length: 30

Required

Last Name

beneficiary.consumer.name.secondLastName

String
Min length: 1
Max length: 30

Optional

Second Last Name

beneficiary.consumer.address.line1

String
Min length: 5
Max length: 30

Optional

Residence address line 1

beneficiary.consumer.address.line2

String
Min length: 0
Max length: 30

Optional

Residence address line 2 (if applicable)

beneficiary.consumer.address.line3

String
Min length: 0
Max length: 30

Optional

Residence address line 3 (if applicable)

beneficiary.consumer.address.city

String
Min length: 1
Max length: 20

Required

City of residence

beneficiary.consumer.address.countrySubdivisionCode

String
Max Length: 6

Optional

State/province of residence.
NOTE: For a full list of accepted countries and supported destination country subdivision codes see Reference Data API Module: Retrieve Countries ISO3 endpoint

beneficiary.consumer.address.countryCode

String
Max length: 3

Required

Country of residence.
NOTE: For a full list of accepted countries and supported destination country subdivision codes see Reference Data API Module: Retrieve Countries ISO3 endpoint

beneficiary.consumer.address.postalCode

String
Min length: 2
Max length: 6

Optional

Postal code/ZIP of residence

beneficiary.consumer.contactDetails.mobilePhone.number

String
Min length: 5
Max length: 14

Optional

Phone number

beneficiary.consumer.contactDetails.mobilePhone.countryDialCode

String
Min length: 1
Max length: 5

Optional

Country calling code (ISO alpha-3 code)


Transactional Information

Field

Type

Required
/Optional

Description

transactionInformation.purposeOfTransactionCode

String
Min Length: 0
Max Length: 30

Optional

Explanation or reason for transferring funds (Enumerated Values)
NOTE: For a full list of accepted purpose of transaction values, see the PURPOSE_OF_TRANSACTION enumeration from the Reference Data Enumerations endpoint.

transactionInformation.sourceOfFundsCode

String
Min Length: 0
Max Length: 30

Optional

Declaration of where the transaction funds were sourced.
NOTE: For a full list of accepted source of funds values, see the SOURCE_OF_FUNDS enumeration from the Reference Data Enumerations endpoint.

transactionInformation.proofOfFundsCode

String
Min Length: 0
Max Length: 30

Optional

Proof 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.intendedUseOfMGIServicesCode

String
Min Length: 0
Max Length: 30

Optional

Explanation 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.


Account Deposit

Field

Type

Required
/Optional

Description

targetAccount.accountType

String

Optional

Bank account type

targetAccount.accountNumber

String

Optional

A unique string of numbers, letters, or other characters which identify a specific bank account

targetAccount.accountNumberVerification

String

Optional

A unique string of numbers, letters, or other characters which identify a specific bank account

targetAccount.bankIdentifier

String

Optional

Bank Identifier Code (BIC), an 8 to 11-character code used to identify a specific bank for international transactions

targetAccount.bankIdentifier_WithLookup

String

Optional

For collecting the Indian Financial System Code (IFSC) or routing number for Bangladesh, with a lookup feature for these countries

targetAccount.bankName

String

Optional

Bank’s name

targetAccount.bankNameText

String

Optional

Manually entered bank name if not provided in the bank name list

targetAccount.bankBranchName

String

Optional

Manually entered bank branch name

targetAccount.bankCode

String

Optional

Bank’s routing number

targetAccount.bankBranchCode

String

Optional

Manually entered receiver bank branch code

targetAccount.benefIdNumber

String

Optional

Receiver identification number

targetAccount.accountExpirationMonth

String

Optional

Expiration month of the account

targetAccount.accountExpirationYear

String

Optional

Expiration year of the account

targetAccount.receiverPurposeOfTransactionEmigrationFlag

String

Optional

Flag to indicate if the purpose of transaction is for emigration

targetAccount.receiverIsCloseRelativeFlag

String

Optional

Flag to indicate if the receiver is a close relative

targetAccount.sendPurposeOfTransactionPartnerField

String

Optional

Explanation or reason for transferring funds (Enumerated Values)

targetAccount.receiverAccountIssueStatePartnerField

String

Optional

State/province of the receiver (Enumerated Values)

targetAccount.additionalDetails

Dynamic

Optional

Dynamic field key/values for the transaction


Additional Details

Field

Type

Required
/Optional

Description

additionalDetails

Dynamic

Optional

Dynamic field key/values for the transaction




Response Fields

Field

Type

Required
/Optional

Description

readyForCommit

Boolean

Required

Indicates whether the transaction can proceed to commit

transactionId

String
Max length: 36

Optional

Unique identifier for the transaction resource

partnerTransactionId

String

Optional

Partners Unique identifier for the transaction resource

businessProfileId

String

Required

Business's unique MoneyGram identifier

serviceOptionName

String
Max length: 40

Required

Consumer-facing name to identify the transaction method

serviceOptionRoutingName

String

Required

Unique name to identify the individual transaction method

referenceNumber

String

Required

MoneyGram's reference number for the transaction

expectedPayoutDate

String

Required

Expected payout date (Example value - YYYY-MM-DD

sendAmount.amount.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Required

Transaction 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.currencyCode

String

Required

The sendAmount.amount.value currency code (ISO alpha-3 code)

sendAmount.fees.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Required

Fee Amount and Fee Currency applied to transaction (Fee currencyCode uses ISO alpha-3 code)

sendAmount.fees.currencyCode

String

Required

The sendAmount.fees.value currency code (ISO alpha-3 code)

sendAmount.taxes.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Optional

Tax Amount and Tax Currency applied to the Transaction by the the origin country (Tax currencyCode uses ISO alpha-3 code)

sendAmount.taxes.currencyCode

String

Optional

The sendAmount.taxes.value currency code (ISO alpha-3 code)

sendAmount.additionalCharges.typeCode

String

Optional

Code to indicate if the fee is to be collected by MoneyGram or the partner

sendAmount.additionalCharges.label

String

Optional

Consumer facing name to identify the charge type

sendAmount.additionalCharges.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Optional

Additional fee's amount

sendAmount.additionalCharges.currencyCode

String

Optional

The sendAmount.additionalCharges.value currency code (ISO alpha-3 code)

sendAmount.discountsApplied.totalDiscount.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Optional

Transaction discount amount applied and currency type excluding fees and exchange rate. Transaction discount currencyCode (ISO alpha-3 code)

sendAmount.discountsApplied.totalDiscount.currencyCode

String

Optional

The sendAmount.discountsApplied.totalDiscount.value currency code (ISO alpha-3 code)

sendAmount.discountsApplied.promotionDetails.code

String
Min length: 0
Max length: 14

Optional

Additional Details about the applied promotion to the transaction. currencyCode (ISO alpha-3 code)

sendAmount.discountsApplied.promotionDetails.discount.amount.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Optional

The transaction's total discount applied.

sendAmount.discountsApplied.promotionDetails.discount.currencyCode

String

Optional

The sendAmount.discountsApplied.promotionDetails.discount.amount.valuecurrency code (ISO alpha-3 code)

sendAmount.discountsApplied.promotionDetails.errorCode

String

Optional

Error code defined by MoneyGram

sendAmount.discountsApplied.promotionDetails.errorMessage

String

Optional

Error message associated with the error code

sendAmount.total.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Required

Transaction Total Amount and Transaction Total Currency including fees, taxes and discount. (Total currencyCode uses ISO alpha-3 code)

sendAmount.total.currencyCode

String

Required

The sendAmount.total.value currency code (ISO alpha-3 code)

receiveAmount.amount.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Required

Transaction Received Amount and Transaction Receive currency. (Receive amount currencyCode uses ISO alpha-3 code)

receiveAmount.amount.currencyCode

String

Required

The receiveAmount.amount.value currency code (ISO alpha-3 code)

receiveAmount.fees.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Optional

Received Fee and Receive Currency applied to the transaction by the destination country. (Receive fee currencyCode uses ISO alpha-3 code)

receiveAmount.fees.currencyCode

String

Optional

The receiveAmount.fees.value currency code (ISO alpha-3 code)

receiveAmount.additionalCharges.typeCode

String

Optional

Code to indicate if the fee is to be collected by MoneyGram or the partner

receiveAmount.additionalCharges.label

String

Optional

Consumer facing name to identify the charge type

receiveAmount.additionalCharges.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Optional

Additional fee's amount

receiveAmount.additionalCharges.currencyCode

String

Optional

The receiveAmount.additionalCharges.value currency code (ISO alpha-3 code)

receiveAmount.taxes.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Optional

Tax Amount and Tax Currency applied to the Transaction by the the origin country. (Receive taxes currencyCode uses ISO alpha-3 code)

receiveAmount.taxes.currencyCode

String

Optional

The receiveAmount.taxes.value currency code (ISO alpha-3 code)

receiveAmount.total.value

Number Min length: 0 Max length: 14 Max decimal Value: 3

Required

Receive 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.currencyCode

String

Required

The receiveAmount.total.value currency code (ISO alpha-3 code)

receiveAmount.fxRate

Number
String
Min length: 0
Max length: 14

Required

Fx Rate applied to transaction

receiveAmount.fxRateEstimated

Boolean

Optional

Indicates whether the Fx is “estimated” and amount, taxes and total cannot be guaranteed. The word “estimated” must appear before receiveAmount.amount, receiveAmount.taxes and receiveAmount.total only when true.