Get Product Pricing
Get the product pricing based on the customer's data.
Post
https://store.payproglobal.com/api/Products/GetProductPricing
Request Parameters
application/json
GetProductPricingRequestModel
object
couponCodes
array[string]
optional
The coupon codes to you want to apply to the product.
useTestMode
boolean
optional
Possible values are true or false.
If true, the test mode will be applied, false otherwise.
It is false by default.
If true, the test mode will be applied, false otherwise.
It is false by default.
secretKey
string
conditional
The unique secret key. It can be found in your
account > Store settings > General settings > Integration tab.
It is required only if useTestMode is true. Null by default.
account > Store settings > General settings > Integration tab.
It is required only if useTestMode is true. Null by default.
paymentMethod
integer
optional
The payment method ID you want to apply.
The list of payment methods with IDs can be found here.
The list of payment methods with IDs can be found here.
ipAddress
string
optional
The customer's IP address. It is used for detecting billingCountry
and currency. Based on it the product pricing will be calculated.
and currency. Based on it the product pricing will be calculated.
currency
string
optional
The currency code you want to apply. If skipped, it is detected based
on billingCountry. The product pricing results will be displayed in this currency.
The list of available currency codes can be found here.
on billingCountry. The product pricing results will be displayed in this currency.
The list of available currency codes can be found here.
language
string
optional
The language code. If it is defined,
name
will be returned in this language. billingCountry
string
optional
The customer's billing country code. If skipped, it is detected based on ipAddress.
The list of countries with codes can be found here.
The list of countries with codes can be found here.
billingState
string
optional
The customer's billing state code. The list of states with codes can be found here.
billingZip
string
optional
The customer's billing zip code.
products
array[object]
The list of the products for which you want to receive the pricing details.
productId
integer
required
The product ID for which you want to get the pricing details.
quantity
integer
optional
The quantity of the product for which you want to get the pricing details.
vendorAccountId
integer
required
The vendor account ID identifies your PayPro Global account.
It can be found in Account settings > Business info.
It can be found in Account settings > Business info.
apiSecretKey
string
required
The vendor account API secret key is a unique key
that was generated specifically for authenticating API requests.
It can be found in Store settings > General settings > Integration tab.
that was generated specifically for authenticating API requests.
It can be found in Store settings > General settings > Integration tab.
Response Parameters
application/json
GetProductPricingResponseModel
object
response
object
useTestMode
boolean
Possible values are true or false. If true, the test mode
was applied, false otherwise. It is false by default.
was applied, false otherwise. It is false by default.
paymentMethod
integer
The payment method ID you applied. The list of payment methods can be found here.
language
string
The language code. The list of languages with codes can be found here.
ipAddress
string
The customer's IP address. It is used for detecting billingCountry
and currency. Based on it the product pricing will be calculated.
and currency. Based on it the product pricing will be calculated.
ipAddressCountry
string
The country code detected by customer's IP address. The list of countries with codes can be found here.
billingCountry
string
The customer's billing country code. If skipped,
it is detected based on ipAddress. The list of countries with codes can be found here.
it is detected based on ipAddress. The list of countries with codes can be found here.
billingState
string
The customer's billing state code. The list of states with codes can be found here.
billingZip
string
The customer's billing zip code.
billingCurrency
string
The billing currency code. It will be used for the transaction processing.
displayCurrency
string
The currency code displayed to the customer if it differs from the billingCurrency.
appliedTaxNames
array[string]
A list of the applied tax names (e.g., "VAT" for Europe, "GST, PST, HTS" for Canada, etc.).
productPricings
array[object]
A list of the calculated product pricings according to customer's information.
productId
integer
The product ID that was used for the pricing calculations.
logoUrl
string
The logo relative path.
recurring
object
The properties of the recurring item.
selections
array[object]
Selection items properties.
name
string
The product name.
quantity
integer
The product quantity.
billingUnitPrice
number
The unit price in the billing currency.
billingPriceBeforeDiscount
number
The price before the discount in the billing currency.
billingDiscount
number
The discount amount in the billing currency.
billingPrice
number
The price with the discount in the billing currency.
billingTaxes
number
The tax amount in the billing currency.
billingPriceWithTaxes
number
The price with the tax amount in the billing currency.
displayUnitPrice
number
The unit price in the currency that was provided in displayCurrency.
displayPriceBeforeDiscount
number
The price before the discount in the currency that was provided in displayCurrency.
displayDiscount
number
The discount amount in the currency that was provided in the displayCurrency.
displayPrice
number
The price with the discount in the currency that was provided in displayCurrency.
displayTaxes
number
The tax amount in the currency that was provided in displayCurrency.
displayPriceWithTaxes
number
The price with the tax amount in the currency that was provided in displayCurrency.
sku
string
The product SKU value.
appliedCouponCode
string
The coupon code that was applied.
name
string
The product name.
quantity
integer
The product quantity.
billingUnitPrice
number
The unit price in the billing currency.
billingPriceBeforeDiscount
number
The price before the discount in the billing currency.
billingDiscount
number
The discount amount in the billing currency.
billingPrice
number
The price with the discount in the billing currency.
billingTaxes
number
The tax amount in the billing currency.
billingPriceWithTaxes
number
The price with the tax amount in the billing currency.
displayUnitPrice
number
The unit price in the currency that was provided in displayCurrency.
displayPriceBeforeDiscount
number
The price before the discount in the currency that was provided in displayCurrency.
displayDiscount
number
The discount amount in the currency that was provided in displayCurrency.
displayPrice
number
The price with the discount in the currency that was provided in displayCurrency.
displayTaxes
number
The tax amount in the currency that was provided in displayCurrency.
displayPriceWithTaxes
number
The price with the tax amount in the currency that was provided in displayCurrency.
sku
string
The product SKU value.
appliedCouponCode
string
The coupon code that was applied.
selections
array[object]
Selection items properties.
name
string
The product name.
quantity
integer
The product quantity.
billingUnitPrice
number
The unit price in the billing currency.
billingPriceBeforeDiscount
number
The price before the discount in the billing currency.
billingDiscount
number
The discount amount in the billing currency.
billingPrice
number
The price with the discount in the billing currency.
billingTaxes
number
The tax amount in the billing currency.
billingPriceWithTaxes
number
The tax amount in the billing currency.
displayUnitPrice
number
The unit price in the currency that was provided in displayCurrency.
displayPriceBeforeDiscount
number
The price before the discount in the currency that was provided in displayCurrency.
displayDiscount
number
The discount amount in the currency that was provided in displayCurrency.
displayPrice
number
The price with the discount in the currency that was provided in displayCurrency.
displayTaxes
number
The price with the discount in the currency that was provided in displayCurrency.
displayPriceWithTaxes
number
The price with the tax amount in the currency that was provided in displayCurrency.
sku
string
The product SKU value.
appliedCouponCode
string
The coupon code that was applied.
name
string
The product name.
quantity
integer
The product quantity.
billingUnitPrice
number
The unit price in the billing currency.
billingPriceBeforeDiscount
number
The price before the discount in the billing currency.
billingDiscount
number
The discount amount in the billing currency.
billingPrice
number
The price with the discount in the billing currency.
billingTaxes
number
The tax amount in the billing currency.
billingPriceWithTaxes
number
The tax amount in the billing currency.
displayUnitPrice
number
The unit price in the currency that was provided in displayCurrency.
displayPriceBeforeDiscount
number
The price before the discount in the currency that was provided in displayCurrency.
displayDiscount
number
The discount amount in the currency that was provided in displayCurrency.
displayPrice
number
The price with the discount in the currency that was provided in displayCurrency.
displayTaxes
number
The price with the discount in the currency that was provided in displayCurrency.
displayPriceWithTaxes
number
The price with the tax amount in the currency that was provided in displayCurrency.
sku
string
The product SKU value.
appliedCouponCode
string
The coupon code that was applied.
appliedCouponCodes
array[string]
The coupon codes that were applied. If any of provided
the coupon codes were not applied, they are not included.
the coupon codes were not applied, they are not included.
request
object
couponCodes
array[string]
Coupon codes to apply.
useTestMode
boolean
Use test mode.
secretKey
string
Test mode secret key.
paymentMethod
integer
Payment method id. Defaults to Credit Card.
ipAddress
string
Customer IP address. Used for BillingCountry first and then Currency detection.
currency
string
Currency code. Detected based on BillingCountry if omitted.
language
string
Language code.
billingCountry
string
Billing country code. Detected based on IpAddress if omitted.
billingState
string
Billing state code.
billingZip
string
Billing zip code.
products
array[object]
Products list.
productId
integer
Product id.
quantity
integer
Product quantity.
vendorAccountId
integer
Vendor account id.
apiSecretKey
string
Vendor account API secret key.
errors
array[object]
propertyWithError
string
propertyErrorMessages
array[string]
isSuccess
boolean
Request Sample
{
"couponCodes": [
"coupon code 1",
"coupon code 2"
],
"useTestMode": true,
"secretKey": "your_secret_key",
"paymentMethod": 1,
"ipAddress": "192.168.0.1",
"currency": "USD",
"language": "en",
"billingCountry": "US",
"billingState": "US-AL",
"billingZip": "12345",
"products": [
{
"productId": 12345,
"quantity": 1
},
{
"productId": 12345,
"quantity": 1
}
],
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
}
Response Sample
{
"response": {
"useTestMode": true,
"paymentMethod": 2,
"language": "en",
"ipAddress": "192.168.0.1",
"ipAddressCountry": "US",
"billingCountry": "US",
"billingState": "US-AL",
"billingZip": "12345",
"billingCurrency": "USD",
"displayCurrency": "USD",
"appliedTaxNames": ["Sales Tax"],
"productPricings": [{
"productId": 12345,
"logoUrl": "your_logo_url",
"recurring": {
"selections": [],
"name": "Test_product",
"quantity": 1,
"billingUnitPrice": 100.0,
"billingPriceBeforeDiscount": 100.0,
"billingDiscount": 0.0,
"billingPrice": 100.0,
"billingTaxes": 8.0,
"billingPriceWithTaxes": 108.0,
"displayUnitPrice": 100.0,
"displayPriceBeforeDiscount": 100.0,
"displayDiscount": 0.0,
"displayPrice": 100.0,
"displayTaxes": 8.0,
"displayPriceWithTaxes": 108.0,
"sku": null,
"appliedCouponCode": null
},
"selections": [],
"name": "Test_product",
"quantity": 1,
"billingUnitPrice": 100.0,
"billingPriceBeforeDiscount": 100.0,
"billingDiscount": 20.0,
"billingPrice": 80.00,
"billingTaxes": 6.40,
"billingPriceWithTaxes": 86.40,
"displayUnitPrice": 100.0,
"displayPriceBeforeDiscount": 100.0,
"displayDiscount": 20.00,
"displayPrice": 80.00,
"displayTaxes": 6.40,
"displayPriceWithTaxes": 86.40,
"sku": null,
"appliedCouponCode": "coupon_code_2"
},{
"productId": 12345,
"logoUrl": "your_logo_url",
"recurring": {
"selections": [],
"name": "Test_product_2",
"quantity": 1,
"billingUnitPrice": 25.00,
"billingPriceBeforeDiscount": 25.00,
"billingDiscount": 0.0,
"billingPrice": 25.0,
"billingTaxes": 2.0,
"billingPriceWithTaxes": 27.00,
"displayUnitPrice": 25.00,
"displayPriceBeforeDiscount": 25.00,
"displayDiscount": 0.0,
"displayPrice": 25.00,
"displayTaxes": 2.0,
"displayPriceWithTaxes": 27.00,
"sku": null,
"appliedCouponCode": null
},
"selections": [],
"name": "Test_product_2",
"quantity": 1,
"billingUnitPrice": 10.00,
"billingPriceBeforeDiscount": 10.00,
"billingDiscount": 2.0,
"billingPrice": 8.0,
"billingTaxes": 0.64,
"billingPriceWithTaxes": 8.64,
"displayUnitPrice": 10.00,
"displayPriceBeforeDiscount": 10.00,
"displayDiscount": 2.0,
"displayPrice": 8.0,
"displayTaxes": 0.64,
"displayPriceWithTaxes": 8.64,
"sku": null,
"appliedCouponCode": "coupon_code_2"
}],
"appliedCouponCodes": ["coupon_code_2"]
},
"request": {
"couponCodes": [
"coupon_code_1",
"coupon_code_2"
],
"useTestMode": true,
"secretKey": "your_secret_key",
"paymentMethod": 1,
"ipAddress": "192.168.0.1",
"currency": "USD",
"language": "en",
"billingCountry": "US",
"billingState": "US-AL",
"billingZip": "12345",
"products": [{
"productId": 12345,
"quantity": 1
},{
"productId": 12345,
"quantity": 1
}],
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
},
"errors": [],
"isSuccess": true
}