Authorize Transaction
To Authorize a charge, use this route and create a transaction.
Request Body Params
Attribute | Type | Description |
---|---|---|
net_value | int32 | Amount to be charged without the acquisition fees. Must be passed in cents. |
gross_amout | int32 | Final amount to be charged with fees. Must be passed in cents. |
installments | string | Number of installments of the transaction, being minimum: 1 and maximum: 12. |
order_id | string | Transaction ID on WU platform. |
payment_method | string | Payment method. Accepted values: credit and debit . |
wu_payment_type | string | Specific Western Union Payment Type. Accepted values: MT (Money Transfer) and FX (Stars). Default MT |
card_holder_name | string | Card Holder Name. |
card_number | string | Card Number. |
card_expiration_date | string | Card Expiration Date, with YYYY-MM format. |
card_cvv | string | Card Verification Code. |
customer_name | string | Customer name. |
customer_document_number | string | Customer document number. |
customer_email | string | Customer email. |
customer_phone_number | string | Customer's phone number. |
customer_address_zipcode | string | CEP (domestic customers - in Brazil) or ZIP (foreign customers) of the customer. Max length: 9 characters. |
customer_address_country | string | Customer's nationality, in country acronym format. Only the ISO 3166-1 alpha-2 (two-letter) format will be accepted E.g.: BR, US, CA... Max length: 2 characters. |
customer_address_state | string | State of the current customer address, in State acronym format, ISO 3166-1 alpha-2 (two-letter). E.g.: TX, WY, MO... Max length: 2 characters. |
customer_address_city | string | City of the customer's address. Max length: 50 characters. |
customer_address_neighborhood | string | Neighborhood of the customer's address. Max length: 45 characters. |
customer_address_street | string | Street of the customer's address. Max length: 54 characters. |
customer_address_number | string | Customer's address number. Max length: 5 characters. |
customer_address_complement | string | Optional parameter of the complement of the customer's address. Max length: 14 characters. |
soft_descriptor | string | Description that will appear on your customer's invoice. Maximum of 13 characters, being alphanumeric and spaces. |
capture | boolean | Optional parameter indicating whether or not transaction data should be captured immediately. Accepted values: true and false . Default false. |
3DS
An Authorization can be performed with or without 3DS Authentication. To proceed with an Authorization WITH 3DS, it will be necessary to pass all the extra parameters described below, in the body of the request.
Attribute | Type | Description |
---|---|---|
authentication_value | string | The authentication cryptogram must be sent in this field. |
authentication_result | string | Indicates the authentication result. Accepted values: CRPT , DENY , AUTH and UCRP . |
authentication_transaction_id | string | The transaction ID generated by the 3D Secure authentication server. |
authentication_transaction_status_indicator | string | Indicates verification/authentication status. Accepted values: Y , N , A and I . |
authentication_status_reason | string | Cardinal StatusReason Value. |
Authentication Result
Below is a brief explanation of the authentication_result
parameter.
Value | Description |
---|---|
CRPT | Indicates successful authentication and the cryptogram will be sent. |
DENY | Indicates the transaction was not authenticated. |
AUTH | Indicates that an authentication attempt was made and the sender does not support the protocol. |
UCRP | Indicates that authentication was successful and that the cryptogram will not be sent. |
Transaction Status Indicator
Below is a brief explanation of the authentication_transaction_status_indicator
parameter.
Value | Description |
---|---|
Y | Verification of authentication successful. |
N | Not authenticated / Account not confirmed. |
A | Indicates authentication/verification attempts were made. Transaction was not authenticated/verified, but proof of attempt is provided. |
I | Informational only. Indicates that ACS acknowledges the 3DS requester's preference not to contest the transaction, as the data sent was for informational purposes only. |
Cardinal && Marlim
!
We compared the parameters described above with those of Cardinal to facilitate the integration to the WU, as follows the table below
Marlim Attribute | Cardinal Attribute |
---|---|
authentication_value | Cardinal CAVV . |
authentication_transaction_id | Cardinal DSTransactionId . |
authentication_transaction_status_indicator | Cardinal PAResStatus . |
authentication_status_reason | Cardinal StatusReason . |
The only parameter that could not be identified was the authentication_result
, since it is a conditional tag and must be sent by the WU according to the Authenticator result, following the logic of the values described above: CRPT, DENY, AUTH or UCRP.
info
To proceed with an Authorization WITHOUT 3DS, simply ignore sending the extra parameters described above.
Good to Know
As our Acquirer's integration with WU's 3DS Authentication Provider (Cardinal) has different terminologies and values, there may be some unidentified errors during the Development phase.
We ask the WU team to let us know about these possible errors so that we can adjust both this Documentation and the API so that the values are passed from correctly and the Authorization is carried out successfully.
Response Object
Property | Type | Description |
---|---|---|
acquirer_status_code | string | Issuing Bank response identifier code. |
status | string | Represents the current state of the transaction. Possible values: paid , authorized , and refused . |
authorization_code | string | Authorization code returned by the issuing bank. |
nsu | string | Code that identifies the transaction in the acquirer. |
order_id | string | Transaction ID on WU platform. |
date_created | dateTime | Transaction creation date in ISODateTime format. |
date_updated | dateTime | Transaction status updated date in ISODateTime format. |
net_value | int32 | Amount in cents to be charged without acquiring fees. |
authorized_amount | int32 | Amount in cents authorized in transaction. |
paid_amount | int32 | Amount in cents captured in the transaction. |
refunded_amount | int32 | Amount in cents reversed in transaction. |
installments | string | Number of installments the customer paid for. |
transaction_id | string | Transaction identifier number. |
card_holder_name | string | Name of cardholder used for payment. |
card_brand | string | Brand of the card used for the payment. Possible values: visa , mastercard , amex , hypercard and elo . |
card_first_digits | string | First 6 digits of the card used for payment. |
card_last_digits | string | Last 4 digits of the card used for payment. |
tip
We create a dedicated page with all possible codes that will be returned in the acquirer_status_code
parameter.
Take a look: Authorizer Return Codes.
Samples
- Authorized Transaction
- Paid Transaction
- With 3DS Authentication
- Missing Data
curl -X POST "https://api.wu.global.marlim.co/v1/authorize" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d '{
"net_value": 100000,
"gross_amout": 104330,
"installments": "1",
"order_id": "123456789",
"card_holder_name": "Luke Skywalker",
"card_number": "5555444433332222",
"card_expiration_date": "2026-08",
"card_cvv": "123",
"customer_name": "Luke Skywalker",
"customer_document_number": "00099988877",
"customer_email": "luke@jedimaster.sw",
"customer_phone_number": "+18007770133",
"customer_address_zipcode": "95351",
"customer_address_country": "US",
"customer_address_state": "CA",
"customer_address_city": "Modesto",
"customer_address_neighborhood": "East Modesto",
"customer_address_street": "Sunset Ave",
"customer_address_number": "713",
"soft_descriptor": "Star Wars"
}'
{
"acquirer_status_code": "0000",
"status": "authorized",
"authorization_code": "068194",
"nsu": "987654321",
"order_id": "123456789",
"date_created": "2024-04-29T17:55:12.745Z",
"date_updated": "2024-04-29T17:55:12.745Z",
"net_value": 100000,
"authorized_amount": 104330,
"paid_amount": 0,
"refunded_amount": 0,
"installments": "1",
"transaction_id": "12345678912345",
"card_holder_name": "Luke Skywalker",
"card_brand": "visa",
"card_first_digits": "555544",
"card_last_digits": "2222"
}
curl -X POST "https://api.wu.global.marlim.co/v1/authorize" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d '{
"capture": true,
"net_value": 100000,
"gross_amout": 104330,
"installments": "1",
"order_id": "123456789",
"card_holder_name": "Luke Skywalker",
"card_number": "5555444433332222",
"card_expiration_date": "2026-08",
"card_cvv": "123",
"customer_name": "Luke Skywalker",
"customer_document_number": "00099988877",
"customer_email": "luke@jedimaster.sw",
"customer_phone_number": "+18007770133",
"customer_address_zipcode": "95351",
"customer_address_country": "US",
"customer_address_state": "CA",
"customer_address_city": "Modesto",
"customer_address_neighborhood": "East Modesto",
"customer_address_street": "Sunset Ave",
"customer_address_number": "713",
"soft_descriptor": "Star Wars"
}'
{
"acquirer_status_code": "0000",
"status": "paid",
"authorization_code": "068194",
"nsu": "987654321",
"order_id": "123456789",
"date_created": "2024-04-29T17:55:12.745Z",
"date_updated": "2024-04-29T17:55:12.745Z",
"net_value": 100000,
"authorized_amount": 104330,
"paid_amount": 104330,
"refunded_amount": 0,
"installments": "1",
"transaction_id": "12345678912345",
"card_holder_name": "Luke Skywalker",
"card_brand": "visa",
"card_first_digits": "555544",
"card_last_digits": "2222"
}
curl -X POST "https://api.wu.global.marlim.co/v1/authorize" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d '{
"capture": true,
"net_value": 100000,
"gross_amout": 104330,
"installments": "1",
"order_id": "123456789",
"card_holder_name": "Luke Skywalker",
"card_number": "5555444433332222",
"card_expiration_date": "2026-08",
"card_cvv": "123",
"authentication_value": "jELUbgG+Tfj0AREACMLdCae+oIs=",
"authentication_result": "CRPT",
"authentication_transaction_id": "f38e6948-5388-41a6-bca4-b49723c19437",
"authentication_transaction_status_indicator": "Y",
"authentication_status_reason": "CardinalSomeReason",
"customer_name": "Luke Skywalker",
"customer_document_number": "00099988877",
"customer_email": "luke@jedimaster.sw",
"customer_phone_number": "+18007770133",
"customer_address_zipcode": "95351",
"customer_address_country": "US",
"customer_address_state": "CA",
"customer_address_city": "Modesto",
"customer_address_neighborhood": "East Modesto",
"customer_address_street": "Sunset Ave",
"customer_address_number": "713",
"soft_descriptor": "Star Wars"
}'
{
"acquirer_status_code": "0000",
"status": "paid",
"authorization_code": "068194",
"nsu": "987654321",
"order_id": "123456789",
"date_created": "2024-04-29T17:55:12.745Z",
"date_updated": "2024-04-29T17:55:12.745Z",
"net_value": 100000,
"authorized_amount": 104330,
"paid_amount": 104330,
"refunded_amount": 0,
"installments": "1",
"transaction_id": "12345678912345",
"card_holder_name": "Luke Skywalker",
"card_brand": "visa",
"card_first_digits": "555544",
"card_last_digits": "2222"
}
curl -X POST "https://api.wu.global.marlim.co/v1/authorize" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d '{
"capture": true,
"net_value": 100000,
"gross_amout": 104330,
"installments": "1",
"order_id": "123456789",
"card_holder_name": "Luke Skywalker",
"card_number": "5555444433332222",
"card_expiration_date": "2026-08",
"card_cvv": "123",
"customer_email": "luke@jedimaster.sw",
"customer_phone_number": "+18007770133",
"customer_address_zipcode": "95351",
"customer_address_country": "US",
"customer_address_state": "CA",
"customer_address_city": "Modesto",
"customer_address_neighborhood": "East Modesto",
"customer_address_street": "Sunset Ave",
"customer_address_number": "713",
"soft_descriptor": "Star Wars"
}'
{
"errors": {
"type": "parameter",
"message": "The parameters [ customer_document_number, customer_name ] are missing."
}
}