3.6. Operations with third-party wallets
This page contains a description of transactions with third-party wallets of the Procard.Pay dispatch system
Third-party wallet transactions include:
PurchaseMasterPass - purchase operation using a MasterPass token
GooglePayPurchase - purchase operation using Google Pay token
ApplePayPurchase - purchase operation using an Apple Pay token
APH2HPURCHASE - purchase operation using Apple Pay token on the page
GooglePayPurchase Decrypted
ApplePayPurchase Decrypted
Transactions with MasterPass
Obtaining a token for MasterPass
Test url https://pay-eupb-test.procard-ltd.com/api/mptoken (the client receives the production url in the project log)
To get a guest token, you need to send a POST request with the following data:
Parameter | Description |
---|---|
msisdn | Phone number to enter the MasterPass wallet in the format 380XXXXXXXXX |
client_id | Client ID in the MasterPass system |
The response is a JSON object with the following parameters:
Parameter | Description |
---|---|
res | Query result 0 - everything is ok |
msg | Error message |
token | Token for transfer to the mfs library |
reference_no | Unique request number |
Operation PurchaseMasterPass - making a payment through MasterPass
Test url https://pay-eupb-test.procard-ltd.com/api (the client receives the production url in the project log)
To get a guest token, you need to send a POST request with the following data:
Parameter | Description | Value |
---|---|---|
operation | Type of transaction | PurchaseMasterPass |
merchant_id | Merchant ID |
|
amount | Payment amount in the format 1.00 | Example 500.00 |
order_id |
|
|
currency_iso | Currency | UAH |
description | Payment Description |
|
approve_url | Redirect URL after successful payment (in case of 3DS confirmation on the Procard.PAY page) |
|
decline_url | URL for redirection after unsuccessful payment (in case of 3DS confirmation on the Procard.PAY page) |
|
cancel_url | Redirect URL after payment cancellation (in case of 3DS confirmation on the Procard.PAY page) |
|
callback_url | URL to which the CALLBACK will be sent about the payment status |
|
add_params[wallet] | Wallet sign | masterpass |
add_params[msisdn] | Phone number to enter the Masterpass wallet in the format 380XXXXXXXXX |
|
add_params[token] | Token received from MasterPass server |
|
add_params[card_name] | Card alias received from MasterPass server |
|
add_params[client_id] | Merchant ID in the MasterPass system |
|
add_params[ret_ref_no] | Unique transaction number received from the MasterPass server |
|
signature | In order to confirm the validity of the data, a verification signature must be generated and transmitted in the SHA-512 request using the merchant's private_key. |
|
| A string subject to SHA-512 is generated by concatenating merchant_id, order_id, amount, currency_iso, description parameters separated by “;” (semicolon) in UTF-8 encoding. |
|
| The order of the parameters when concatenating is important! |
|
The response is a JSON object with the following parameters:
Parameter | Description |
---|---|
code | Response code |
status | Transaction status, if 3DS verification is needed, the status will be 3ds |
d3AcsUrl | url to redirect client, to check 3ds |
d3Md | Cryptogram for transmission to the 3DS host |
d3Pareq | Request to send to 3DS host |
transaction_key | Transaction key for 3DS verification |
TermUrl | Url to be redirected after entering the verification code on the 3DS page. By default, the url to the Procard.PAY page, to check the 3DS, you can specify your URL, then after passing through the 3DS, you must call the “3DS Verification Confirmation” method |
signature |
|
Operations with Google Pay
GooglePayPurchase payment method
Test url https://pay-eupb-test.procard-ltd.com/api (the client receives the production url in the project log)
To debit funds from the card, the user must be redirected to the payment gateway page using the POST method with the following parameters:
Parameter | Description | Value |
---|---|---|
operation | Type of transaction | GooglePayPurchase |
merchant_id | Merchant ID |
|
amount | Payment amount in the format 1.00 | Example 500.00 |
order_id | The unique transaction number on the merchant's side. If the operation is duplicated, the merchant receives an error. |
|
currency_iso | Payment currency | UAH |
description | Payment Description |
|
callback_url | URL to which information about the result of the payment will be sent |
|
gpApiVersionMinor | apiVersionMinor from processPayment(paymentData) |
|
gpApiVersion | apiVersion from processPayment(paymentData) |
|
gpPMDescription | paymentMethodData.description from processPayment(paymentData) |
|
gpPMType | paymentMethodData.type from processPayment(paymentData) |
|
gpPMICardNetwork | paymentMethodData.info.cardNetwork from processPayment(paymentData) |
|
gpPMICardDetails | paymentMethodData.info. cardDetails from processPayment(paymentData) |
|
gpTokenType | paymentMethodData.tokenizationData.type from processPayment(paymentData) |
|
gpToken | paymentMethodData.tokenizationData.token from processPayment(paymentData) |
|
signature | In order to confirm the validity of the data, a verification signature must be generated and transmitted in the SHA-512 request using the merchant's private_key. |
|
| A string subject to SHA-512 is generated by concatenating the merchant_id, order_id, amount, currency_iso, description parameters separated by “;” (semicolon) in UTF-8 encoding. |
|
| The order of the parameters when concatenating is important! |
|
The response is a JSON object with the following parameters:
Parameter | Description | Value |
---|---|---|
code | Response code | “Payment statuses” references |
status | Payment status. If 3DS is received in the payment status, you need to check 3DS | “Response Codes” references |
d3AcsUrl | acs url to check 3DS |
|
d3Md | Unique identifier for transmission to the 3DS host |
|
d3Pareq | PaReq message to send to 3DS host |
|
transaction_key | Transaction key for 3DS verification |
|
signature |
|
|
Operations with Apple Pay
Purchasing with Apple Pay
To integrate the Apple Pay button on the payment page of an online store, you need to implement the ApplePaySession.canMakePaymentsWithActiveCard method, this method determines whether this device supports payment using Apple Pay.
If payment is supported, you need to render the “Buy with Apple Pay” button.
Next, you need to create an ApplePaySession object with purchase parameters:
countryCode: 'UA',
currencyCode: 'UAH',
supportedNetworks: ['visa', 'masterCard'],
merchantCapabilities: ['supports3DS'],
total: { label: 'Your Merchant Name', amount: '10.00' },
See the Apple Pay on Web documentation for a description of the fields.
On the onvalidatemerchant event, you need to hang a handler in which the "api/apple/validate" API will be called
You need to attach a handler to the onpaymentauthorized event, which will call the "api/apple/payment" API.
After the payment is confirmed in onpaymentauthorized , the ApplePaySession.completePayment method must be called.
Documentation for ApplePaySession is on the Apple website (https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api ).
Apple Pay merchant validation (api/apple/validate)
Test url https://pay-eupb-test.procard-ltd.com/api/apple/validate (the client receives the production url in the project log)
POST parameters:
Parameter | Description | Value |
---|---|---|
operation | Type of transaction | ApplePayPurchase |
apple_validation_url | This parameter comes in the onvalidatemerchant event, event.validationURL |
|
| Example: session.onvalidatemerchant = (event) => { console.log(event.validationURL); } |
|
merchant_id | Merchant ID, issued by processing |
|
amount | Transaction amount. | Example 500.00 |
order_id | The unique transaction number on the merchant's side. If the operation is duplicated, the merchant receives an error. |
|
currency_iso | Payment currency. | UAH |
description | Purpose of payment. Displayed on the payment page when entering payment details. Displayed in account statement and registers |
|
add_params | An array with additional parameters. Additional parameters are then returned to the merchant in a callback call |
|
callback_url | URL to which information about the result of the payment will be sent |
|
signature | In order to confirm the validity of the data, a verification signature must be generated and transmitted in the SHA-512 request using the merchant's private_key. A string subject to SHA-512 is generated by concatenating merchant_id, order_id, amount, currency_iso, description parameters separated by “;” (semicolon) in UTF-8 encoding. |
|
| The order of the parameters when concatenating is important! |
|
The response is a JSON object with the following parameters:
Parameter | Description |
---|---|
apple_validate_data | Data that needs to be passed to the session.completeMerchantValidation method |
order_key | Order ID in the payment system |
code | Response code if 0 - everything is OK |
message | Response code decryption |
signature |
|
Apple Pay payment confirmation (api/apple/payment)
Test url https://pay-eupb-test.procard-ltd.com/api/apple/payment (the client receives the production url in the project log)
POST parameters:
Parameter | Description |
---|---|
order_key | Order ID in the payment system |
apple_pay_payment_data | The base64 encoded data received in the new onpaymentauthorized event in the event.payment parameter. |
| Example: session.onpaymentauthorized = (event) => { |
The response is a JSON object with the following parameters:
Parameter | Description |
---|---|
transactionStatus | Operation status Approved - Successful |
reason | Text reason for rejection |
reasonCode | Failed error code |
After calling this method, a CALLBACK comes to the merchant's backend.
ApplePay Host2Host (api/apple/h2hpayment)
Test url https://pay-eupb-test.procard-ltd.com/api/apple/h2hpayment
To connect H2H ApplePay, you need to generate a merchant certificate in the Apple developer account and send the generated certificate to paysupport@procard-ltd.com
POST parameters:
Parameter | Description | Value |
---|---|---|
operation | Type of transaction | APH2HPURCHASE |
merchant_id | Merchant ID, issued by the payment gateway |
|
amount | Transaction amount. Example 500.00 |
|
customer_fee | Customer fee. Example: 10.50 |
|
order_id | The unique transaction number on the merchant's side. If the operation is duplicated, the merchant receives an error. |
|
currency_iso | Payment currency. UAH, USD, EUR |
|
description | Purpose of payment. Displayed on the payment page when entering payment details. Displayed in account statement and registers |
|
add_params | An array with additional parameters. Additional parameters are then returned to the merchant in a callback call |
|
apple_payment_data | Token data received from Apple encoded in base64, received |
|
card_holder | Cardowner. |
|
phone | Client's phone number. |
|
payment_type | Payment type.
|
|
callback_url | URL to which information about the result of the payment will be sent |
|
signature | In order to confirm the validity of the data, a verification signature must be generated and transmitted in the SHA-512 request using the merchant's private_key. |
|
| A string subject to SHA-512 is generated by concatenating merchant_id, order_id, amount, currency_iso, description parameters separated by “;” (semicolon) in UTF-8 encoding. |
|
| The order of the parameters when concatenating is important! |
|
The response is a JSON object with the following parameters:
Parameter | Description | Value |
---|---|---|
status | Payment status | “Payment statuses” references |
code | Response code | “Response Codes” references |
order_id | Unique order number in the merchant system |
|
amount | Amount of payment |
|
fee | fee |
|
currency | Payment currency |
|
transaction_id | Transaction ID |
|
signature |
|
|
GooglePayPurchase Decrypted
GooglePayPurchase payment method with decrypted token
Test url https://pay-eupb-test.procard-ltd.com/api (the client receives the production url in the project log)
To debit funds from the card, the user must be redirected to the payment gateway page using the POST method with the following parameters:
Parameter | Description | Value |
---|---|---|
operation | Type of transaction | GooglePayPurchase |
merchant_id | Merchant ID |
|
amount | Payment amount in the format 1.00 | Example 500.00 |
order_id | The unique transaction number on the merchant's side. If the operation is duplicated, the merchant receives an error. |
|
currency_iso | Payment currency | UAH |
description | Payment Description |
|
gpTokenDecrypted | decrypted data of GooglePay token |
|
gpApiVersionMinor | apiVersionMinor from processPayment(paymentData) |
|
gpApiVersion | apiVersion from processPayment(paymentData) |
|
gpPMDescription | paymentMethodData.description from processPayment(paymentData) |
|
gpPMType | paymentMethodData.type from processPayment(paymentData) |
|
gpPMICardNetwork | paymentMethodData.info.cardNetwork from processPayment(paymentData) |
|
gpPMICardDetails | paymentMethodData.info. cardDetails from processPayment(paymentData) |
|
gpTokenType | paymentMethodData.tokenizationData.type from processPayment(paymentData) |
|
gpToken | paymentMethodData.tokenizationData.token from processPayment(paymentData) |
|
secure_type |
|
|
add_params[Fingerprint] | Fingerprint |
|
add_params[UserAccountID] | Identity number of user account |
|
add_params[BrowserIP] |
Client browser IP address |
|
signature | In order to confirm the validity of the data, a verification signature must be generated and transmitted in the SHA-512 request using the merchant's private_key. |
|
| A string subject to SHA-512 is generated by concatenating the merchant_id, order_id, amount, currency_iso, description parameters separated by “;” (semicolon) in UTF-8 encoding. |
|
| The order of the parameters when concatenating is important! |
|
The response is a JSON object with the following parameters:
Will be soon…
ApplePay Payment Decrypted
Test url https://pay-eupb-test.procard-ltd.com/api/apple/payment
POST parameters:
Parameter | Description | Value |
---|---|---|
order_key | Order key value |
|
apple_pay_payment_data | Payment data returned after payment |
|
apple_pay_payment_data_decrypted | Decrypted payment data returned after payment |
|
Copyright © 2015-2023 PROCARD