Skip to main content

Do Reference Charge

Make an immediate charge using the saved billing & payment information from the reference order.

Request Parametersapplication/json
DoChargeRequestModel
object
referencedOrderId
integer
The order ID that will be used as a reference to identify customer's billing and payment details.
productId
integer
A product ID to use for the charge. No new subscription
will be created even if the product's charging type is a subscription.
priceCurrencyCode
string
The currency code that will be used to charge the customer.
The list of available currency codes can be found here
priceValue
number
The price amount that will be charged. It will be ignored if OrderItemDetails is passed.
referenceChargeName
string
The name that will be used as the order item name in the invoice,
the customer confirmation email and the reports.
sku
string
The 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
string
The name that will used as an order item name and will be displayed
in the invoice, the customer confirmation email and the reports.
unitPriceValue
number
The price per one copy of the product.
quantity
integer
The product quantity.
affiliateAgreementId
integer
The ID of the affiliate agreement that will be assigned to the order.
convertToReferenceCurrency
boolean
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.
vendorAccountId
integer
required
The vendor account ID identifies your PayPro Global account.
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.
Response Parametersapplication/json
DoChargeResponseModel
object
response
object
orderId
integer
The order ID of the created order.
orderStatusName
string
The text representation of the order status.
orderStatusId
integer
The ID of the order status.
orderDeclineReason
string
The decline reason if the order gets Canceled status.
error
string
The error message if the order gets Canceled status.
request
object
referencedOrderId
integer
The order ID that will be used as a reference to identify customer's billing and payment details.
productId
integer
A product ID to use for the charge. No new subscription
will be created even if the product's charging type is a subscription.
priceCurrencyCode
string
The currency code that will be used to charge the customer.
The list of available currency codes can be found here
priceValue
number
The price amount that will be charged. It will be ignored if OrderItemDetails is passed.
referenceChargeName
string
The name that will be used as the order item name in the invoice,
the customer confirmation email and the reports.
sku
string
The 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
string
The name that will used as an order item name and will be displayed
in the invoice, the customer confirmation email and the reports.
unitPriceValue
number
The price per one copy of the product.
quantity
integer
The product quantity.
affiliateAgreementId
integer
The ID of the affiliate agreement that will be assigned to the order.
convertToReferenceCurrency
boolean
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.
vendorAccountId
integer
required
The vendor account ID identifies your PayPro Global account.
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.
errors
array[object]
propertyWithError
string
propertyErrorMessages
array[string]
isSuccess
boolean
Request 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
}