Overview

Our Partner Payments API is tailored to organizations needing a quick and convenient way to collect funds from and disburse funds to their customers. You simply call this API to create an ‘order’ within our systems, and we’ll notify you once the order has been completed.

API Services

API Name Description Method URL Path
create Creates an order within WU systems, making it available for fulfilment POST {base path}/{version}/paywu/order/create
void Marks a previously created order as void, making it unavailable for fulfilment POST {base path}/{version}/paywu/order/{referenceId}/void
status Returns the current status of a previously created order GET {base path}/{version}/paywu/order/{referenceId}/status

Collections

Generalized Flow

Sample: create (POST)

Scenario: Partner is instructing Western Union to collect $1,945 USD from customer John M Doe

					  	
POST /v1/paywu/order/create HTTP 1.1
HOST api.westernunion.com
Content-Type: application/json
apiKey: 7a844062-0759-4565-9cfa-8a7c4fd41eba
{
    "timestamp": "2018-09-06T18:16:22.518Z",
    "requestId": "18b84d7a-f982-47fe-beec-6798ca673ad2",
    "merchantId": "PRTNR01",
    "order":{
        "serviceId": "EPC",
        "referenceId": "23569c95-01e3-43b2-9ff1-f8380d6011f1",
        "customerKey": "111-111-123",
        "type": "CAPTURE",
        "creationTime": "2018-09-05T09:37:24.376-04:00",
        "expirationTime": "2018-09-08T09:37:24.376-04:00",
        "merchantProcessor": "MARKETPLACE INDICATOR",
        "fx": "1.0",
        "from":{
            "locale": "en",
            "countryIso2": "US",
            "payment":{
                "method": "CASH",
                "amount":{
                    "isFixed": true,
                    "principal":{
                        "value": "1945.00"
                    },
					"currencyIso3": "USD"
                }
            },
            "customers": [{
                    "locale": "en",
                    "id": "1028",
                    "type": "PERSON",
                    "role": "PRIMARY",
                    "email": "sender@example.com",
                    "names": [{  
                            "locale": "en",
                            "full": "John M Doe",
                            "first": "John",
                            "middle": "M",
                            "last": "Doe"
                    }],
                    "addresses": [{
                            "locale": "en",
                            "line1": "100 Any St",
                            "line2": "Apt A",
                            "city": "New York",
                            "state": "NY",
                            "postalCd": "11001",
                            "countryIso2": "US"
                    }],
                    "phones": [{
                            "number": "5553123712",
                            "countryCd": "1",
                            "type": "MOBILE"
                    }],
                    "birthInfo":{
                        "date": "1986-01-22",
                        "countryIso2": "US"
                    },
                    "idDocs": [{
                            "order": 1,
                            "type": "PASSPORT",
                            "number": "A12764G",
                            "issueDate": "2017-01-01",
                            "issueCountryIso2": "US",
                            "expiryDate": "2020-01-01"
                    }],
                    "moreInfo": [{
                            "key": “occupation", 
                            "value": "doctor"
                    }]
                }
            ]
        },
        "scanCodes": [{
                "type": "QR"
        }]
    }
}
						
					  
					  	
200 OK
{
    "timestamp": "2018-09-06T09:37:24.376-04:00",
    "correlationId": "e365b3b1-35b3-4e4b-8548-73dfa9b1b052",
    "requestId": "18b84d7a-f982-47fe-beec-6798ca673ad2",
    "order":{
        "wuReferenceId": "555004417",
        "status": "OPEN",
        "statusTime": "2018-09-06T08:37:24.376-04:00",
        "type": "CAPTURE",
        "customerKey": "111-111-123",
        "referenceId": "23569c95-01e3-43b2-9ff1-f8380d6011f1",
        "fx": "1.0",
        "from":{
            "payment":{
                "method": "CASH",
                "amount":{
                    "principal":{
                        "value": "1945.00"
                    },
                    "gross": "1945.00",
                    "currencyIso3": "USD"
                }
            }
        },
        "scanCodes": [{
                "type": "QR",
                "data": "1807785550044175111-111-123"
        }]
    }
}
						
					  
					  	
409 CONFLICT
{
    "timestamp": "2018-09-06T09:37:24.376-04:00",
    "correlationId": "e365b3b1-35b3-4e4b-8548-73dfa9b1b052",
    "requestId": "18b84d7a-f982-47fe-beec-6798ca673ad2",
    "order":{
        "type": "CAPTURE",
        "customerKey": "111-111-123",
        "referenceId": "23569c95-01e3-43b2-9ff1-f8380d6011f1",
        "errors": [{
                "name": "INVALID_ORDER_STATUS",
                "message": "Order not in valid status for this request - already voided, or completed or expired",
                "code": "MPW005"
        }]
    }
}
						
					  

Sample: status (GET)

Scenario: Partner is asking Western Union to return the status of order 23569c95-01e3-43b2-9ff1-f8380d6011f1

					  	
GET /v1/paywu/order/23569c95-01e3-43b2-9ff1-f8380d6011f1/status?merchantId=PRTNR01&serviceId=EPC&locale=en
						
					  
					  	
200 OK
{
    "timestamp": "2018-09-06T09:37:24.376-04:00",
    "correlationId": "e365b3b1-35b3-4e4b-8548-73dfa9b1b052",
    "order":{
        "referenceId": "23569c95-01e3-43b2-9ff1-f8380d6011f1",
        "type": "CAPTURE",
        "wuReferenceId": "555004417",
        "status": "COMPLETED",
        "statusTime": "2018-09-06T08:37:24.376-04:00",
        "paymentLocation":{
            "id": "69874-5487-8895",
            "name": "WU",
			"type": "POS",
            "addresses": [{
                    "locale": "en",
                    "type": "PRIMARY",
                    "line1": "100 Main St",
                    "city": "New York",
                    "state": "NY",
                    "postalCd": "11101",
                    "countryIso2": "US"
            }]
        }
    }
}
						
					  
					  	
404 NOT FOUND
{
    "timestamp": "2018-09-06T09:37:24.376-04:00",
    "correlationId": "e365b3b1-35b3-4e4b-8548-73dfa9b1b052",
    "order":{
        "referenceId": "23569c95-01e3-43b2-9ff1-f8380d6011f1",
        "errors": [{
                "name": "NOT_FOUND",
                "message": "Order does not exist in WU system",
                "code": "MPW006"
        }]
    }
}
						
					  

Sample: void (POST)

Scenario: Partner is instructing Western Union to void order 5f90a4dd-2a1e-4747-84b0-373f91c9347a

					  	
POST /v1/paywu/order/5f90a4dd-2a1e-4747-84b0-373f91c9347a/void HTTP 1.1
HOST api.westernunion.com
Content-Type: application/json
apiKey: 7a844062-0759-4565-9cfa-8a7c4fd41eba

{
    "timestamp": "2018-07-22T09:37:24.376-04:00",
    "requestId": "7f8e7594-8c74-4c6e-9dda-1b7c6d66500d",
    "merchantId": "PRTNR01",
    "serviceId": "EPC",
    "locale": "en"
}
						
					  
					  	
200 OK
{
    "timestamp": "2018-09-06T09:37:24.376-04:00",
    "correlationId": "e365b3b1-35b3-4e4b-8548-73dfa9b1b052",
    "requestId": "7f8e7594-8c74-4c6e-9dda-1b7c6d66500d",
    "order":{
        "type": "CAPTURE",
        "referenceId": "5f90a4dd-2a1e-4747-84b0-373f91c9347a",
        "wuReferenceId": "2684697588",
        "status": "VOIDED",
        "statusTime": "2018-09-06T08:37:24.376-04:00"
    }
}
						
					  
					  	
409 CONFLICT
{
    "timestamp": "2018-09-06T09:37:24.376-04:00",
    "correlationId": "e365b3b1-35b3-4e4b-8548-73dfa9b1b052",
    "requestId": "7f8e7594-8c74-4c6e-9dda-1b7c6d66500d",
    "order":{
        "referenceId": "5f90a4dd-2a1e-4747-84b0-373f91c9347a",
        "status": "COMPLETED",
        "statusTime": "2019-09-06T08:37:24.376-04:00",
        "errors": [{
                "name": "INVALID_ORDER_OPERATION",
                "message": "Order not in valid status for this request - already voided, or completed or expired",
                "code": "MPW005"
        }]
    }
}
						
					  

Sample: notification

Scenario:Western Union has accepted payment for Partner order 23569c95-01e3-43b2-9ff1-f8380d6011f1 and sends a notification to inform the Partner

Note that this is only a sample notification message, actual implementation would depend upon each individual Partner’s needs
					  	
POST /{partner endpoint}/v1/paywu/order/event/notify HTTP 1.1
HOST {partner endpoint}
Content-Type: application/json
apiKey: 17f11595-068d-4614-bcde-44571cfae080

{
    "timestamp": "2018-07-22T09:37:24.376-04:00",
    "requestId": "18b84d7a-f982-47fe-beec-6798ca673ad2",
    "merchantId": "PRTNR01",
    "partnerId": "WU",
    "order":{
        "eventType": "UPDATE",
        "eventInitBy": "CUSTOMER",
        "eventTime": "2018-07-22T09:37:24.376-04:00",
        "serviceId": "EPC",
        "referenceId": "23569c95-01e3-43b2-9ff1-f8380d6011f1",
        "type": "CAPTURE",
        "partnerReferenceId": "555004417",
        "status": "COMPLETED",
        "statusTime": "2018-07-22T09:37:24.376-04:00"
        "fx": "1.0",
        "from":{
            "payment":{
                "method": "CA",
                "amount":{
                    "principal":{
                        "value": "1945.00"
                    },
                    "gross": "1945.00",
                    "currencyIso3": "USD"
                }
            },
            "customer":{
                "id": "1028",
                "name":{
                    "locale": "en",
                    "full": "John M Doe",
                    "first": "John",
                    "middle": "M",
                    "last": "Doe"
                }
            }
        },
        "paymentLocation":{
            "id": "69874-5487-8895",
            "name": "WU",
            "type": "POS",
            "addresses": [{
                    "locale": "en",
                    "type": "PRIMARY",
                    "line1": "100 Any St",
                    "city": "New York",
                    "state": "NY",
                    "postalCd": "11101",
                    "countryIso2": "US"
            }]
        }
    }
}
						
					  

Disbursements

Generalized Flow

Sample: create (POST)

Scenario:Partner is instructing Western Union to disburse $250 USD from customer John M Doe

					  	
POST /v1/paywu/order/create HTTP 1.1
HOST api.westernunion.com
Content-Type: application/json
apiKey: 7a844062-0759-4565-9cfa-8a7c4fd41eba

{
    "timestamp": "2018-09-06T18:16:22.518Z",
    "requestId": "5f90a4dd-2a1e-4747-84b0-373f91c9347a",
    "merchantId": "PRTNR01",
    "order":{
	"serviceId": "EPD",
        "referenceId": "23569c95-01e3-43b2-9ff1-f8380d6011f1",
        "customerKey": "111-111-456",
        "type": "DISBURSE",
        "creationTime": "2018-09-05T09:37:24.376-04:00",
        "expirationTime": "2018-09-08T09:37:24.376-04:00",
        "merchantProcessor": "MARKETPLACE INDICATOR",
        "fx": "1.0",
        "to":{
            "locale": "en",
            "countryIso2": "US",
            "payment":{
                "method": "CASH",
                "amount":{
                    "isFixed": true,
                    "principal":{
                        "value": "250.00"
                    },
                    "currencyIso3": "USD"
                }
            },
            "customers": [{
                    "locale": "en",
                    "id": "69045",
                    "type": "PERSON",
                    "role": "PRIMARY",
                    "email": "receiver@example.com",
                    "names": [{
                            "locale": "en",
                            "full": "John M Doe",
                            "first": "John",
                            "middle": "M",
                            "last": "Doe"
                    }],
                    "addresses": [{
                            "locale": "en",
                            "type": "PRIMARY",
                            "line1": "100 Main St",
                            "line2": "Apt A",
                            "city": "New York",
                            "state": "NY",
                            "postalCd": "11001",
                            "countryIso2": "US"
                    }],
                    "phones": [{
                            "number": "5553123712",
                            "countryCd": "1",
                            "type": "MOBILE"
                    }],
                    "birthInfo":{
                        "date": "1986-01-22",
                        "countryIso2": "US"
                    },
                    "idDocs": [{
                            "order": 1,
                            "type": "PASSPORT",
                            "number": "A12764G",
                            "issueDate": "2017-01-01",
                            "issueCountryIso2": "US",
                            "expiryDate": "2020-01-01"
                    }],
                    "moreInfo": [{
                            "key": "occupation",
                            "value": "doctor"
                    }]
					}
            ]
        },
        "scanCodes": [{
                "type": "QR"
        }]
    }
}
						
					  
					  	
200 OK
{
    "timestamp": "2018-09-06T09:37:24.376-04:00",
    "correlationId": "e365b3b1-35b3-4e4b-8548-73dfa9b1b052",
    "requestId": "5f90a4dd-2a1e-4747-84b0-373f91c9347a",
    "order":{
        "wuReferenceId": "555004417",
        "status": "OPEN",
        "statusTime": "2018-09-06T08:37:24.376-04:00",
        "type": "DISBURSE",
        "customerKey": "111-111-456",
        "referenceId": "23569c95-01e3-43b2-9ff1-f8380d6011f1",
        "fx": "1.0",
        "to":{
            "payment":{
                "method": "CASH",
                "amount":{
                    "principal":{
                        "value": "250.00"
                    },
                    "gross": "250.00",
                    "currencyIso3": "USD"
                }
            }
        },
        "scanCodes": [{
                "type": "QR",
                "data": "1807785550044175111-111-456PARTNERIDV3"
        }]
    }
}
						
					  
					  	
400 BAD REQUEST
{
    "timestamp": "2018-09-06T09:37:24.376-04:00",
    "correlationId": "e365b3b1-35b3-4e4b-8548-73dfa9b1b052",
    "requestId": "5f90a4dd-2a1e-4747-84b0-373f91c9347a",
    "order":{
        "type": "DISBURSE",
        "customerKey": "111-111-456",
        "referenceId": "23569c95-01e3-43b2-9ff1-f8380d6011f1",
        "errors": [{
                "name": "INVALID_DATA",
                "message": "Invalid data provided in the API request",
                "code": "MPW003",
		 "issues": [{
                	"field": "expirationTime",
                	"issue": "Invalid ExpirationTime Provided"
        }]
        }]
    }
}
						
					  
API Reference

Contact Us

Want more information?

Request Information

Ready to start your project?

Contact us to get API access