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": 5458995,
"productId": 37491,
"priceCurrencyCode": "USD",
"priceValue": 99.95,
"referenceChargeName": "Monthly premium subscription plan plus 5 extra packages for May-2017",
"sku": "ABF-478-5297-RI",
"customFields": {
"some-key-1": "your custom value 1",
"some-key-2": "your custom value 2"
},
"orderItemDetails": [
{
"orderItemName": "sample string 1",
"unitPriceValue": 2.0,
"quantity": 3
},
{
"orderItemName": "sample string 1",
"unitPriceValue": 2.0,
"quantity": 3
}
],
"affiliateAgreementId": 1,
"convertToReferenceCurrency": true,
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
}
Response Sample
{
"response": {
"orderId": 5458995,
"orderStatusName": "Processed",
"orderStatusId": 5,
"orderDeclineReason": "sample string 4",
"error": "sample string 5"
},
"request": {
"referencedOrderId": 5458995,
"productId": 37491,
"priceCurrencyCode": "USD",
"priceValue": 99.95,
"referenceChargeName": "Monthly premium subscription plan plus 5 extra packages for May-2017",
"sku": "ABF-478-5297-RI",
"customFields": {
"some-key-1": "your custom value 1",
"some-key-2": "your custom value 2"
},
"orderItemDetails": [
{
"orderItemName": "sample string 1",
"unitPriceValue": 2.0,
"quantity": 3
},
{
"orderItemName": "sample string 1",
"unitPriceValue": 2.0,
"quantity": 3
}
],
"affiliateAgreementId": 1,
"convertToReferenceCurrency": true,
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
},
"errors": [
{
"propertyWithError": "orderId",
"propertyErrorMessages": [
"Error message 1",
"Error message 2"
]
},
{
"propertyWithError": "orderId",
"propertyErrorMessages": [
"Error message 1",
"Error message 2"
]
}
],
"isSuccess": false
}