POST Create a Transaction

POST /transfer/v1/transactions

Development Guide

The 'Create a Transaction' endpoint determines what information to collect from the consumer, 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 POST 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 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.


  • **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:

  • If the application leaves the serviceOptionCode field empty, all service options to the destinationCountryCode will be returned (i.e. cash pickup, bank, wallet & card deposit). Learn More
  • The Quote API uses ISO Standards for country and currency values. MoneyGram provide Reference Data APIs which can be queried to understand and list the supported values and associated metadata.

🚀

Launch Code Example

.




3. Provide sendersender, receiver & transactionDetails to the request body:

The application must collect sender, receiver, and transactionDetails 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 Fields for a Transfer API. Learn More


🚀

Launch Code Example




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




5. Make a request and handle response:

The application must call the 'Create a Transaction' endpoint with a POST 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

.




6. 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 Create 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. Updating the transactionId: If there are any changes needed for consumer data after the Create API, the application should call the Update a Transaction' endpoint using a PUT Http method, providing the transactionId as path parameter and provide new consumer/transactional data in the request body. Learn More

  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 GlobalR
  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 createTransaction = 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 url = 'https://' + host + '/transfer/v1/transactions';

    // Step 2: Create the POST 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.post(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);
    }
};

createTransaction();
import requests
import uuid
import json

def create_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";
    url = 'https://' + host + '/transfers/v1/transactions';

    # 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.post(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)

create_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 CreateTransaction {

    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 tokenEndpoint = "https://" + host + "/transfer/v1/transactions";

        // Step 2: Create the POST 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))
                .POST(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

Field

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 sessio




Request Body Parameters

Body ParameterDescription
TransactBySendAmountRequestTransact by send amount
TransactByReceiveAmountRequestTransact by receive amount



Request Body Fields

Field

Type

Required
/Optional

Description

targetAudience

String

Required

Tailors 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

agentPartnerId

String
Max length: 8

Required

Unique identifier for the agent or partner

posId

String

Optional

Point of sale identifier of the client performing the API Call

operatorId

String

Required

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

userLanguage

String
Max length: 6

Optional

Language used by the user/operator

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

Conditionally Required

Destination state/province is conditionally required when transacting to the United States or Canada.
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 for a transactBySendAmountRequest (ISO alpha-3 code)

receiveCurrencyCode

String
Max length: 3

Required

Receive currency code for the destination country transactBySendAmount Request (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)
For Crypto partners this is the fiat currency for the BUY/Sell or Ramp-on/Ramp-off

receiveAmount.currencyCode

String
Max length: 3

Required

The receiveAmount.value currency code for a transactByReceiveAmountRequest

sendCurrencyCode

String
Max length: 3

Required

Transaction send currency code for a transactBySendAmountRequest

promotionCodes

[Array] String
Max length: 20

Optional

Unique code to apply a promotional discount

rewardsNumber

String
Max length: 20

Optional

Unique code to apply Loyalty accrual/redemption (MoneyGram Plus Number)

placeOnPartnerHold

Boolean

Optional

Request MoneyGram to place the transaction on hold

fundInStore.fundInStore

Boolean

Optional

Flag to indicate transaction is to be funded in store within a 24hour period

fundInStore.fundInStoreAgentPartnerId

String
Max length: 8

Optional

Unique store identifier where transaction will be funded

fundingSource.tenderType

String

Optional

Funding method, based on enumerations

fundingSource.provider

String

Optional

Name of the payment provider

fundingSource.providerNetworkCode

String

Optional

Providers unique network identifier code (Enumerated values)

fundingSource.providerAccountNumber

String

Optional

Account number of payment source

fundingSource.accountIdentifier

String

Optional

MoneyGram's unique identifier for the consumer account

targetAccount

Dynamic

Optional

Dynamic field key/values

sender.name.firstName

String
Min length: 1
Max length: 20

Required

First Name

sender.name.middleName

String
Min length: 1
Max length: 20

Optional

Middle Name (if applicable)

sender.name.lastName

String
Min length: 1
Max length: 30

Required

Last Name

sender.name.secondLastName

String
Min length: 1
Max length: 30

Optional

Second Last Name

sender.address.line1

String
Min length: 5
Max length: 30

Required

Residence address line 1

sender.address.line2

String
Min length: 0
Max length: 80

Optional

Residence address line 2 (if applicable)

sender.address.line3

String
Min length: 0
Max length: 80

Optional

Residence address line 3 (if applicable)

sender.address.city

String
Min length: 1
Max length: 40

Required

City of residence

sender.address.countrySubdivisionCode

String
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

sender.address.countryCode

String
Length: 3

Required

Country of residence (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

sender.address.postalCode

String
Min length: 2
Max length: 6

Optional

Postal/Zip code of residence

sender.mobilePhone.number

String
Min length: 5
Max length: 14

Required

Phone number

sender.mobilePhone.countryDialCode

String
Min length: 1
Max length: 3

Required

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

sender.email

String
Min length: 1
Max length: 255

Optional

Email address

sender.enrolInRewards

Boolean

Optional

Enroll in MoneyGram's Plus Rewards program

sender.notificationPreferences.type

String

Optional

Consumer notification preference types. Which types of notifications would the consumer like to receive.
(Enumerated Values)

  • Transactional
  • Marketing
  • Loyalty Program

sender.notificationPreferences.channel

String

Optional

Delivery method of notification
(Enumerated values)
NOTE: For a full list of accepted notification preference channel values. See the CNSMR_OPTIN enumeration from the Reference Data Enumerations endpoint

sender.notificationPreferences.optIn

Boolean

Optional

Flag to declare consumer opts-in to notification type and method

sender.notificationLanguagePreference

String
Max length: 6

Optional

Language (ISO Alpha-3 code)

sender.personalDetails.genderCode

String

Optional

Gender (Enumerated Values)

sender.personalDetails.dateOfBirth

String
Length: 10

Required

Date of birth (YYYY-MM-DD)

sender.personalDetails.birthCity

String
Min length: 1
Max length: 40

Optional

City of birth

sender.personalDetails.birthCountryCode

String
Max Length: 3

Optional

Country of birth (ISO alpha-3 code)
Conditional based on sending country.
NOTE: For a full list of accepted countries and supported destination country subdivision codes see Reference Data API Module: Retrieve Countries ISO3 endpoint

sender.personalDetails.citizenshipCountryCode

String
Max Length: 3

Optional

Citizenship 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

sender.personalDetails.occupationCode

String
Min Length: 0
Max Length: 30

Optional

Occupation/Employment (Enumerated Values)
NOTE: For a full list of accepted occupation codes see Reference Data Enumerations endpoint

sender.personalDetails.politicalExposedPerson

Boolean

Optional

Flag to declare a Politically Exposed Person (PEP)

sender.personalDetails.nationalityCountryCode

String
Min Length: 3
Max Length: 3

Optional

Country of citizenship (ISO alpha-3 code)

sender.primaryIdentification.typeCode

String
Max length: 3

Required

Type of identification document (Enumerated Values)
NOTE: For a full list of accepted primary identification type values. See the PERSONAL_ID1_TYPE enumeration from the Reference Data Enumerations endpoint

sender.primaryIdentification.id

String
Max length: 30

Required

Identification document number

sender.primaryIdentification.issueCountrySubdivisionCode

String
Max length: 6

Optional

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

sender.primaryIdentification.issueCountryCode

String
Max Length: 3

Required

Issuing country of identification document. (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

sender.primaryIdentification.expirationYear

String
Length: 4
Format: YYYY

Optional

Expiration year of identification document (YYYY)

sender.primaryIdentification.expirationMonth

String
Length: 2
Format: MM

Optional

Expiration month of identification document (MM)

sender.primaryIdentification.expirationDay

String
Length: 2
Format: DD

Optional

Expiration month of identification document (DD)

sender.primaryIdentification.issueAuthority

String
Min length: 0
Max length: 30

Optional

Issuing authority of identification document. (Enumerated values)
NOTE: For a full list of accepted source of issue authority values. See the PRSONL_ID_ISUR_TYPE enumeration from the Reference Data Enumerations endpoint

sender.primaryIdentification.issueCity

String
Min length: 0
Max length: 40

Optional

Issuing city of identification document

sender.primaryIdentification.issueYear

String
Length: 4
Format: YYYY

Optional

Issuing year of identification document (YYYY)

sender.primaryIdentification.issueMonth

String
Length: 2
Format: MM

Optional

Issuing month of identification document (MM)

sender.primaryIdentification.issueDay

String
Length: 2
Format: DD

Optional

Issuing day of identification document (DD)

sender.secondaryIdentification.typeCode

String
Max length: 3

Optional

Type of identification document (Enumerated Values)
NOTE: For a full list of accepted primary identification type values. See the PERSONAL_ID2_TYPE enumeration from the Reference Data Enumerations endpoint

sender.secondaryIdentification.id

String
Max length: 30

Optional

Identification document number

sender.secondaryIdentification.issueCountrySubdivisionCode

String
Max length: 6

Optional

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

sender.secondaryIdentification.issueCountryCode

String
Max Length: 3

Optional

Issuing country of identification document. (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

sender.secondaryIdentification.expirationYear

String
Length: 4
Format: YYYY

Optional

Expiration year of identification document (YYYY)

sender.secondaryIdentification.expirationMonth

String
Length: 2
Format: MM

Optional

Expiration month of identification document (MM)

sender.secondaryIdentification.expirationDay

String
Length: 2
Format: DD

Optional

Expiration month of identification document (DD)

sender.secondaryIdentification.issueAuthority

String
Min length: 0
Max length: 30

Optional

Issuing authority of identification document (Enumerated values)
NOTE: For a full list of accepted source of issue authority values. See the PRSONL_ID_ISUR_TYPE enumeration from the Reference Data Enumerations endpoint

sender.secondaryIdentification.issueCity

String
Min length: 0
Max length: 40

Optional

Issuing city of identification document

sender.secondaryIdentification.issueYear

String
Length: 4
Format: YYYY

Optional

Issuing year of identification document (YYYY)

sender.secondaryIdentification.issueMonth

String
Length: 4
Format: MM

Optional

Issuing month of identification document (MM)

sender.secondaryIdentification.issueDay

String
Length: 4
Format: DD

Optional

Issuing day of identification document (DD)

sender.additionalAddress.type

String

Optional

Type of Additional address (Enumerated Values)

sender.additionalAddress.line1

String
Min length: 5
Max length: 30

Optional

Residence address line 1

sender.additionalAddress.line2

String
Min length: 0
Max length: 80

Optional

Residence address line 2 (if applicable)

sender.additionalAddress.line3

String
Min length: 0
Max length: 80

Optional

Residence address line 3 (if applicable)

sender.additionalAddress.city

String
Min length: 0
Max length: 40

Required

City of residence

sender.additionalAddress.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

sender.additionalAddress.countryCode

String
Max length: 3

Required

Country of residence. (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

sender.additionalAddress.postalCode

String
Min length: 2
Max length: 6

Optional

Postal code/ZIP of residence

sender.additionalFamilyNames.type

String

Optional

Type 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.firstName

String
Min length: 1
Max length: 20

Optional

First Name

sender.additionalFamilyNames.middleName

String
Min length: 1
Max length: 20

Optional

Middle Name (if applicable)

sender.additionalFamilyNames.lastName

String
Min length: 1
Max length: 30

Optional

Last Name

sender.additionalFamilyNames.secondLastName

String
Min length: 1
Max length: 30

Optional

Second Last Name (if applicable)

sender.profileId

String
UUID

Optional

Consumer's unique MoneyGram profile identifier

sender.additionalDetails

String
Min length: 1
Max length: 40

Optional

Dynamic field key/values

receiver.name.firstName

String
Min length: 1
Max length: 20

Required

First Name

receiver.name.middleName

String
Min length: 1
Max length: 20

Optional

Middle Name (if applicable)

receiver.name.lastName

String
Min length: 1
Max length: 30

Required

Last Name

receiver.name.secondLastName

String
Min length: 1
Max length: 30

Optional

Second Last Name (if applicable)

receiver.address.line1

String
Min length: 5
Max length: 30

Optional

Residence address line 1

receiver.address.line2

String
Min length: 0
Max length: 80

Optional

Residence address line 2 (if applicable)

receiver.address.line3

String
Min length: 0
Max length: 80

Optional

Residence address line 3 (if applicable)

receiver.address.city

String
Min length: 1
Max length: 40

Optional

City of residence

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

receiver.address.countryCode

String
Max length: 3

Optional

Country of residence. (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

receiver.address.postalCode

String
Min length: 2
Max length: 6

Optional

Postal code/ZIP of residence

receiver.mobilePhone.number

String
Min length: 5
Max length: 14

Optional

Phone number

receiver.mobilePhone.countryDialCode

String
Min length: 1
Max length: 3

Optional

Country dial code

receiverSameAsSender

Boolean

Optional

Flag 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.purposeOfTransactionCode

String

Optional

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

String
Max length: 20

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
Max length: 30

Optional

Proof of where the transaction funds were sourced (Enumerated Values)
NOTE: For a full list of accepted source of funds values. See the PROOF_OF_FUNDS enumeration from the Reference Data Enumerations endpoint

transactionInformation.intendedUseOfMGIServicesCode

String
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

transactionInformation.relationshipToSender

String
Max length: 30

Optional

Declaration of consumer's relationship to the sender (Enumerated Values)
NOTE: For a full list of relationships values. See the RELATIONSHP_TO_SNDR enumeration from the Reference Data Enumerations endpoint

receipt.primaryLanguage

String
Max length: 3

Optional

Primary receipt language of the transacting partner

receipt.secondaryLanguage

String
Max length: 3

Optional

Secondary receipt language of the transacting partner

receipt.image

String

Optional

Receipt image string of the transacting partner

partnerTransactionId

String

Optional

Partner’s unique session identifier

additionalDetails

Dynamic

Optional

Dynamic field key/values




Response Fields

Field

Type

Required/
Optional

Description

readyForCommit

Boolean

Optional

Indicates whether the transaction can proceed to commit

rewardsNumber

String
Max length: 20

Optional

Unique code to apply Loyalty accrual/redemption (MoneyGram Plus Number)

transactionId

String
Max length: 36

Optional

Unique identifier for the transaction resource

serviceOptionCode

String
Max length: 21

Optional

Consumer facing name to identify the transaction method

serviceOptionName

String
Max length: 40

Required

Consumer facing name to identify the transaction method

serviceOptionRoutingCode

String

Optional

Unique 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

serviceOptionRoutingName

String

Optional

Unique name to identify the individual transaction method

sendAmount.amount.value

Number
Max length: 14

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

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

Conditionally Required

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

sendAmount.taxes.currencyCode

String

Conditionally Required

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

sendAmount.additionalCharges.typeCode

String

Conditionally Required

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

sendAmount.additionalCharges.label

String

Conditionally Required

Consumer facing name to identify the charge type

sendAmount.additionalCharges.value

Number

Conditionally Required

Additional fee's amount

sendAmount.additionalCharges.currencyCode

String

Conditionally Required

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

sendAmount.discountsApplied.totalDiscount

String
Min length: 0
Max length: 14

Optional

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

sendAmount.discountsApplied.promotionDetails

String
Min length: 0
Max length: 14

Optional

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

sendAmount.total.value

Number
Max length: 14

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
Max length: 14

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

Optional

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

receiveAmount.fees.currencyCode

String

Optional

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

receiveAmount.taxes.value

Number
Min length: 0
Max length: 14

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

String

Optional

Additional fee's amount

receiveAmount.additionalCharges.currencyCode

String

Optional

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

receiveAmount.total.value

Number
Max length: 14

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
Max length: 6

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.fees, receiveAmount.taxes and receiveAmount.total only when true

targetAccountProfileId

String

Optional

Unique Identifier for Target Account Resource

additionalDetails

Dynamic

Optional

Dynamic field key/values