Do Reference Charge
Make an immediate charge using the saved billing & payment information from the reference order.
Post
https://store.payproglobal.com/api/Orders/DoReferenceChargeRequest Parameters
application/jsonDoChargeRequestModel
objectreferencedOrderId
integerrequired
The order ID that will be used as a reference to identify customer's billing and payment details.
productId
integerA product ID to use for the charge. No new subscription
will be created even if the product's charging type is a subscription.
will be created even if the product's charging type is a subscription.
priceCurrencyCode
stringrequired
The currency code that will be used to charge the customer.
The list of available currency codes can be found here
The customer will always be charged in the currency from the reference order specified by the referencedOrderId.
If the currencies differ, we will convert the amount to the appropriate currency during the processing of the API request.
The list of available currency codes can be found here
The customer will always be charged in the currency from the reference order specified by the referencedOrderId.
If the currencies differ, we will convert the amount to the appropriate currency during the processing of the API request.
priceValue
numberrequired
The price amount that will be charged. It will be ignored if OrderItemDetails is passed.
referenceChargeName
stringoptional
The name that will be used as the order item name in the invoice,
the customer confirmation email and the reports.
the customer confirmation email and the reports.
sku
stringoptional
The internal stock unity (SKU) number if needed.
customFields
dictionary<string,string>optional
Any custom data to associate with the order charge.
orderItemDetails
array[object]Pass orderItemDetails to define names and prices for several products.
orderItemName
stringoptional
The name that will used as an order item name and will be displayed
in the invoice, the customer confirmation email and the reports.
in the invoice, the customer confirmation email and the reports.
unitPriceValue
numberoptional
The price per one copy of the product.
quantity
integeroptional
The product quantity.
affiliateAgreementId
integeroptional
The ID of the affiliate agreement that will be assigned to the order.
convertToReferenceCurrency
booleanoptional
Possible values are true or false. It is used if the reference order ID was placed
in a local currency, and you define the value in priceCurrencyCode and priceValue
in the base product currency. If true, it automatically converts (according to the
exchange rate and that moment) the amount from the defined base product currency
into a local one. The new order ID will be placed in a local currency.
in a local currency, and you define the value in priceCurrencyCode and priceValue
in the base product currency. If true, it automatically converts (according to the
exchange rate and that moment) the amount from the defined base product currency
into a local one. The new order ID will be placed in a local currency.
vendorAccountId
integerrequired
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
stringrequired
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/jsonDoChargeResponseModel
objectresponse
objectorderId
integerThe order ID of the created order.
orderStatusName
stringThe text representation of the order status.
orderStatusId
integerThe ID of the order status.
orderDeclineReason
stringThe decline reason if the order gets Canceled status.
error
stringThe error message if the order gets Canceled status.
request
objectreferencedOrderId
integerThe order ID that will be used as a reference to identify customer's billing and payment details.
productId
integerA product ID to use for the charge. No new subscription
will be created even if the product's charging type is a subscription.
will be created even if the product's charging type is a subscription.
priceCurrencyCode
stringThe currency code that will be used to charge the customer.
The list of available currency codes can be found here
The customer will always be charged in the currency from the reference order specified by the referencedOrderId.
If the currencies differ, we will convert the amount to the appropriate currency during the processing of the API request.
The list of available currency codes can be found here
The customer will always be charged in the currency from the reference order specified by the referencedOrderId.
If the currencies differ, we will convert the amount to the appropriate currency during the processing of the API request.
priceValue
numberThe price amount that will be charged. It will be ignored if OrderItemDetails is passed.
referenceChargeName
stringThe name that will be used as the order item name in the invoice,
the customer confirmation email and the reports.
the customer confirmation email and the reports.
sku
stringThe internal stock unity (SKU) number if needed.
customFields
dictionary<string,string>Any custom data to associate with the order charge.
orderItemDetails
array[object]Pass orderItemDetails to define names and prices for several products.
orderItemName
stringThe name that will used as an order item name and will be displayed
in the invoice, the customer confirmation email and the reports.
in the invoice, the customer confirmation email and the reports.
unitPriceValue
numberThe price per one copy of the product.
quantity
integerThe product quantity.
affiliateAgreementId
integerThe ID of the affiliate agreement that will be assigned to the order.
convertToReferenceCurrency
booleanPossible values are true or false. It is used if the reference order ID was placed
in a local currency, and you define the value in priceCurrencyCode and priceValue
in the base product currency. If true, it automatically converts (according to the
exchange rate and that moment) the amount from the defined base product currency
into a local one. The new order ID will be placed in a local currency.
in a local currency, and you define the value in priceCurrencyCode and priceValue
in the base product currency. If true, it automatically converts (according to the
exchange rate and that moment) the amount from the defined base product currency
into a local one. The new order ID will be placed in a local currency.
vendorAccountId
integerrequired
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
stringrequired
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.
errors
array[object]propertyWithError
stringpropertyErrorMessages
array[string]isSuccess
booleanRequest Sample
{
"referencedOrderId": 12345678,
"productId": 12345,
"priceCurrencyCode": "USD",
"priceValue": 99.95,
"referenceChargeName": "Premium Upgrade",
"sku": "your_SKU",
"customFields": {
"some-key-1": "your custom value 1",
"some-key-2": "your custom value 2"
},
"orderItemDetails": [
{
"orderItemName": "Upgrade",
"unitPriceValue": 99.95,
"quantity": 3
},
{
"orderItemName": "Upgrade",
"unitPriceValue": 99.95,
"quantity": 3
}
],
"affiliateAgreementId": null,
"convertToReferenceCurrency": true,
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
}
Response Sample
{
"response": {
"orderId": 12345678,
"orderStatusName": "Processed",
"orderStatusId": 5,
"orderDeclineReason": null,
"error": null
},
"request": {
"referencedOrderId": 12345678,
"productId": 12345,
"priceCurrencyCode": "USD",
"priceValue": 99.95,
"referenceChargeName": "Premium Upgrade",
"sku": "your_SKU",
"customFields": {
"some-key-1": "your custom value 1",
"some-key-2": "your custom value 2"
},
"orderItemDetails": [{
"orderItemName": "Upgrade",
"unitPriceValue": 99.95,
"quantity": 3
},
{
"orderItemName": "Upgrade",
"unitPriceValue": 99.95,
"quantity": 3
}],
"affiliateAgreementId": null,
"convertToReferenceCurrency": true,
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
},
"errors": [],
"isSuccess": true
}