Visa Mobile
Visa Mobile is a digital wallet that allows users to link their Visa card to their phone number through a mobile app. This enables users to make online payments using just their phone number, with transactions confirmed through the app.
Visa Mobile is available directly through the PayU payment page, requiring no changes to the PayU integration and simply functioning as an additional payment method for users.
It is also possible to initiate Visa Mobile payments directly on the PayU payment page.
Alternatively, you can bypass the PayU payment page by sending a request to the API. In this case, the entire user interaction process takes place on the store's website.
For additional information regarding Visa Mobile, visit the official Visa website.
How does the Visa Mobile Work?
The Visa Mobile service operates according to the following steps:
- The payer selects the Visa Mobile payment option and enters their phone number.
- (Optional) The payer confirms their details on the store's website.
- The payer places the order and proceeds with the payment.
- The payer confirms the payment in their banking app or Visa Mobile app.
- Upon payment confirmation, PayU begins processing the transaction using the card linked to the Visa Mobile wallet.
- The result of the transaction processing is communicated to the store.
Creating Visa Mobile Order
In PayU, three payment paths are available using Visa Mobile:
- redirecting the payer to the PayU payment page,
- redirecting the payer to the PayU payment page with Visa Mobile pre-selected,
- processing the transaction without redirecting to the PayU payment page.
Visa Mobile - Redirection to the PayU Payment Page
To enable the user to choose the Visa Mobile payment option, you simply need to start the transaction by following the Accepting a Payment guidelines.
Visa Mobile - Redirection to the PayU Payment Page with the Chosen Payment Method
To directly navigate the user to the Visa Mobile payment option on the PayU payment page, extend the standard order request with the payMethods
object as shown:
{
"payMethods": {
"payMethod": {
"type": "PBL",
"value": "vm"
}
}
}
Visa Mobile - Sending Order from Your Checkout Page
This solution requires you to perfom payments through your own checkout page.To charge a card associated with a Visa Mobile account, you must include an expanded payMethods
object in the order request. The payMethod
object should contain the authorizationCode
field, whose value is the phone number registered with Visa Mobile. Ensure the phone number includes the country code and consists solely of numeric digits.
{
"payMethods": {
"payMethod": {
"type": "PBL",
"value": "vm",
"authorizationCode": "48123456789"
}
}
}
The transaction is processed further through the Visa Mobile application, where the user finalizes the transaction.
Checking Phone Number Registration in Visa Mobile
The functionality to check the phone number registration in the Visa Mobile service is not available from the get-go. Enabling this functionality requires PayU's approval. Additionally, the Merchant must verify the customer's phone number. Any attempt to use the service beforehand will fail.
To verify the phone number in the Visa Mobile service, first generate an authentication token - OAuth. Then, send a POST request with the customer's phone number to the endpoint: https://secure.payu.com/api/v2_1/paytypes/vm/verify-phone-registration
.
curl -X POST https://secure.payu.com/api/v2_1/paytypes/vm/verify-phone-registration \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 3e5cac39-7e38-4139-8fd6-30adc06a61bd" \
-d '
{
"phoneNumber": "48123123123"
}'
The phoneNumber
parameter must be the customer's phone number, verified by the merchant, consisting of digits only and including the country code.
- HTTP 200 SUCCESS
- HTTP 401 UNAUTHORIZED
The response will indicate whether the phone number is registered with Visa Mobile.
{
"exists": true
}
If the functionality is not enabled for a given POS, a response with the error code UNAUTHORIZED
will be returned.
{
"statusCode": "UNAUTHORIZED",
"statusDesc": "Phone checking disabled for given pos"
}
Testing Visa Mobile
The Visa Mobile payment method is also available in the Sandbox environment. You can test different test scenarios by changing the area code of the phone number:
Area Code | Behavior |
---|---|
40 | The transaction is authenticated through the Visa Mobile application, but the payment was unsuccessful. |
48 | The transaction is authenticated through the Visa Mobile application, the payment was successful. |
49 | The transaction lacked authentication through the Visa Mobile application by the payer. |
52 | Transaction has not been authenticated in the Visa Mobile app (timeout). |
53 | The customer's phone number is not registered with Visa Mobile, the phone number verification service will return false. |
Error Codes for Visa Mobile
Error Codes returned by the Visa Mobile service.
HTTP Status | Status Code | Status Description | Description |
---|---|---|---|
400 Bad Request | ERROR_VALUE_INVALID | Invalid phone number provided as authorization code. | The provided phone number is invalid. Please verify that the number consists solely of digits and is the appropriate length. |
400 Bad Request | ERROR_VALUE_INVALID | Order without buyer email. | The payer's email address was not provided or is empty. |
401 UNAUTHORIZED | UNAUTHORIZED | Phone checking disabled for given pos. | The functionality to check the registration of a phone number in Visa Mobile is not available. |