{"method":"POST","path":"https://api.revcent.com/v2/sales","summary":"Create A Sale","description":"Create a sale with payment. View markdown documentation at https://revcent.com/documentation/markdown/mcp/operation/CreateSale.md for an in-depth overview of this operation.","operationId":"CreateSale","requestBody":{"content":{"application/json":{"schema":{"title":"Sale Request Object","description":"","properties":{"campaign":{"type":"string","title":"Campaign ID","description":"A 20 character campaign ID.","minLength":20,"maxLength":20},"iso_currency":{"description":"The three digit ISO 4217 currency code.","type":"string","minLength":3,"maxLength":3},"ip_address":{"description":"The customer IP address.","type":"string"},"payment_type":{"description":"Indicates the payment type for the sale. If payment_type is credit_card, the credit_card object and payment_profile property are both required. If payment_type is paypal, the paypal_transaction_id property is required.","type":"string","enum":["credit_card","paypal","offline_payment","check_direct"]},"payment_profile":{"description":"Required if the payment_type is credit_card. The RevCent payment profile ID which will be used for routing the credit card payment request.","type":"string","minLength":20,"maxLength":20},"credit_card":{"additionalProperties":false,"description":"Required if the payment_type is credit_card and not providing an existing customer ID.","properties":{"card_number":{"description":"The full credit card number.","type":"string"},"exp_month":{"description":"The credit card expiration month as a one or two digit integer, i.e. MM.","type":"integer"},"exp_year":{"description":"The credit card expiration year as a two digit integer, i.e. YY.","type":"integer"},"card_code":{"description":"The credit card code as a string. Depending on the card type this can be different lengths.","type":"string"},"three_ds":{"description":"Optional 3DS if payment_type is credit_card. If you are using 3DS you can send RevCent the 3DS response values, which RevCent will pass to the processor.","additionalProperties":false,"properties":{"enabled":{"description":"Indicating whether or not RevCent should parse 3DS variables to send to the processor. Must be set to true if using 3DS during checkout and sending 3DS values to the processor. Default is false.","type":"boolean"},"version":{"description":"The 3DS version. Example: '2.1.0' or '2.2.0'.","type":"string"},"eci":{"description":"The eCommerce indicator. Indicates the result of the attempt to authenticate the cardholder. On successful authentications.","type":"string"},"cavv":{"description":"Cardholder Authentication Verification Value. On all successful authentications.","type":"string"},"xid":{"description":"The transaction identifier from authentication processing. Occasionally provided for some card brands.","type":"string"},"directory_server_id":{"description":"A transaction identifier assigned by the directory server. On all successful authentications.","type":"string"},"authentication_response":{"description":"Describing if a customer was successfully verified or attempted. On successful authentications.","type":"string"},"acs_transaction_id":{"description":"Access Control Server (ACS) transaction identifier.","type":"string"},"algorithm":{"description":"3DS algorithm used.","type":"string"},"directory_response":{"description":"3DS directory server response.","type":"string"},"enrollment_response":{"description":"Verify enrollment response/status.","type":"string"},"three_ds_server_transaction_id":{"description":"3DS server transaction id.","type":"string"},"gateway_id":{"description":"The gateway to use when 3DS is enabled and you wish to process using a specific gateway.","type":"string"}},"type":"object"}},"type":"object","required":["card_number","exp_month","exp_year"]},"paypal_transaction_id":{"type":"string","description":"Required if payment_type is paypal. The ID issued by PayPal for the transaction."},"customer":{"description":"The customer object receives first priority as details when creating a new customer. Not required if providing an existing customer ID.","additionalProperties":false,"properties":{"first_name":{"type":"string","description":"The customer first name."},"last_name":{"type":"string","description":"The customer last name."},"address_line_1":{"type":"string","description":"The customer first address line."},"address_line_2":{"type":"string","description":"The customer second address line."},"city":{"type":"string","description":"The customer city."},"state":{"type":"string","description":"The customer state."},"zip":{"type":"string","description":"The customer ZIP and or postal code."},"country":{"type":"string","description":"The customer country in three letter ISO 3166-1 alpha-3 format."},"company":{"type":"string","description":"The customer company."},"email":{"type":"string","format":"email","description":"The customer email."},"phone":{"type":"string","description":"The customer phone."}},"type":"object","required":["first_name","last_name","email"]},"bill_to":{"description":"To use as the billing information. If not present the customer object will be used. Useful when simultaneously adding a credit card with separate billing information. Not required if providing an existing customer ID.","additionalProperties":false,"properties":{"first_name":{"type":"string","description":"The bill to first name."},"last_name":{"type":"string","description":"The bill to last name."},"address_line_1":{"type":"string","description":"The bill to first address line."},"address_line_2":{"type":"string","description":"The bill to second address line."},"city":{"type":"string","description":"The bill to city."},"state":{"type":"string","description":"The bill to state."},"zip":{"type":"string","description":"The bill to ZIP and or postal code."},"country":{"type":"string","description":"The bill to country in three letter ISO 3166-1 alpha-3 format."},"company":{"type":"string","description":"The bill to company."},"email":{"type":"string","format":"email","description":"The bill to email."},"phone":{"type":"string","description":"The bill to phone."}},"type":"object","required":["first_name","last_name","email"]},"ship_to":{"description":"To use as the ship to information. If not present the customer object, or bill_to object will be used if either present in respective order. Not required if providing an existing customer ID and shipping address is the same.","additionalProperties":false,"properties":{"first_name":{"type":"string","description":"The shipping first name."},"last_name":{"type":"string","description":"The shipping last name."},"address_line_1":{"type":"string","description":"The shipping first address line."},"address_line_2":{"type":"string","description":"The shipping second address line."},"city":{"type":"string","description":"The shipping city."},"state":{"type":"string","description":"The shipping state."},"zip":{"type":"string","description":"The shipping ZIP and or postal code."},"country":{"type":"string","description":"The shipping country in three letter ISO 3166-1 alpha-3 format."},"company":{"type":"string","description":"The shipping company."},"email":{"type":"string","format":"email","description":"The shipping email."},"phone":{"type":"string","description":"The shipping phone."}},"type":"object","required":["first_name","last_name","email"]},"product":{"description":"The products to include in the sale request.","items":{"description":"An individual product","additionalProperties":false,"properties":{"id":{"title":"Product ID","type":"string","description":"A 20 character product ID.","minLength":20,"maxLength":20},"quantity":{"description":"The quantity being purchased. Default is 1.","type":"integer"},"price":{"description":"The price you wish to charge, if different from the product default price in RevCent.","type":"number","format":"float"},"metadata":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string","description":"A name paired to the value for the metadata object. Limited to 100 characters in length.","minLength":1,"maxLength":100},"value":{"type":"string","description":"A value paired to the name for the metadata object. Limited to 255 characters in length.","minLength":1,"maxLength":255}},"type":"object","required":["name","value"]},"type":"array","description":"You have the option to provide metadata for an individual product when creating a sale. This metadata will be passed to the eventual product sale for the product, which is extremely useful for business metrics.<br><br>For example, if an individual product within a sale is an upsell, you can include metadata with name: 'is_upsell' and value: 'true' for that product. This will allow you to easily run product level reports on all upsells by filtering for the metadata name of 'upsell' and value of 'true'."}},"type":"object","required":["id"]},"type":"array"},"shipping":{"description":"Shipping to include in the sale request. Please refer to our <a href=\"https://kb.revcent.com/en/revenue/shipping#provider-method-table\" target=\"_blank\">Provider Method Table</a> at our knowledge base for the provider and method IDs.","items":{"description":"An individual shipping entry.","additionalProperties":false,"properties":{"amount":{"description":"The amount to charge for the specific shipping entry. A shipping amount can be 0.","type":"number","format":"float"},"provider":{"description":"The shipping provider. This will be included when creating a shipment at a fulfillment center. Please refer to our <a href=\"https://kb.revcent.com/en/revenue/shipping#provider-method-table\" target=\"_blank\">Provider Method Table</a> at our knowledge base for the correct provider id.","type":"string"},"provider_method":{"description":"The shipping provider method. This will be included when creating a shipment at a fulfillment center. Please refer to our <a href=\"https://kb.revcent.com/en/revenue/shipping#provider-method-table\" target=\"_blank\">Provider Method Table</a> at our knowledge base for the correct method id corresponding to the provider.","type":"string"},"name":{"description":"An optional name for the shipping entry.","type":"string"},"description":{"description":"An optional description for the shipping entry.","type":"string"},"metadata":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string","description":"A name paired to the value for the metadata object. Limited to 100 characters in length.","minLength":1,"maxLength":100},"value":{"type":"string","description":"A value paired to the name for the metadata object. Limited to 255 characters in length.","minLength":1,"maxLength":255}},"type":"object","required":["name","value"]},"type":"array","description":"You have the option to provide metadata for an individual shipping entry when creating a sale. This metadata will be passed to the eventual shipping item for the sale."}},"type":"object","required":["amount"]},"type":"array"},"tax":{"description":"Tax to charge in the sale request. Can create multiple tax entries to itemize separate taxes.","items":{"description":"An individual tax entry.","additionalProperties":false,"properties":{"amount":{"description":"The amount to charge for the specific tax entry.","type":"number","format":"float"},"name":{"description":"An optional name for the tax entry.","type":"string"},"description":{"description":"An optional description for the tax entry.","type":"string"},"metadata":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string","description":"A name paired to the value for the metadata object. Limited to 100 characters in length.","minLength":1,"maxLength":100},"value":{"type":"string","description":"A value paired to the name for the metadata object. Limited to 255 characters in length.","minLength":1,"maxLength":255}},"type":"object","required":["name","value"]},"type":"array","description":"You have the option to provide metadata for an individual tax entry when creating a sale. This metadata will be passed to the eventual tax item for the sale."}},"type":"object","required":["amount"]},"type":"array"},"coupon":{"description":"Include one or more coupon codes which will be used to automatically apply discounts to a sale.","items":{"description":"An individual tax entry.","additionalProperties":false,"properties":{"coupon_code":{"description":"A coupon code which exists in RevCent.","type":"string"}},"type":"object","required":["coupon_code"]},"type":"array"},"discount":{"description":"Include one or more discount entries which will be used to automatically apply discounts to a sale. Can be a fixed amount or a percentage of the sales total.","items":{"description":"An individual discount entry.","additionalProperties":false,"properties":{"discount_value":{"description":"The coupon discount value relative to the discount_type.","type":"number","format":"float"},"discount_type":{"description":"The coupon discount type, either percent or amount. RevCent will calculate the discount if percent.","type":"string","enum":["percent","amount"]},"name":{"description":"An optional name for the discount entry.","type":"string"},"description":{"description":"An optional description for the discount entry.","type":"string"},"apply_to_product":{"description":"Whether to apply the discount to products purchased. Default is true. Set to false if discount should only apply to shipping.","type":"boolean"},"apply_to_shipping":{"description":"Whether to apply the discount to shipping. Default is true. Set to false if discount should only apply to products purchased.","type":"boolean"}},"type":"object","required":["discount_value","discount_type"]},"type":"array"},"sale_id":{"description":"The RevCent sale ID of a previously created sale that failed payment and is in a pending state. I.e. If re-attempting a failed payment on a sale that hasn't changed. Similar to the ProcessPendingSale operation.","type":"string","minLength":20,"maxLength":20},"customer_id":{"type":"string","description":"If a customer already exists and you wish to make a purchase on their behalf using their default credit card, provide the customers' 20 character customer ID.","minLength":20,"maxLength":20},"internal_sale_id":{"description":"An optional internal sale ID, i.e. a third party order ID. For records purposes only.","type":"string"},"internal_customer_id":{"description":"An optional internal customer ID, i.e. a third party customer ID. For records purposes only.","type":"string"},"metadata":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string","description":"A name paired to the value for the metadata object. Limited to 100 characters in length.","minLength":1,"maxLength":100},"value":{"type":"string","description":"A value paired to the name for the metadata object. Limited to 255 characters in length.","minLength":1,"maxLength":255}},"type":"object","required":["name","value"]},"type":"array","description":"You have the option to provide metadata for a sale, which will be passed down to all items created as a result of the sale, i.e. the customer, product sales, shipping, tax. This is extremely useful for adding information you wish to view or use for reporting.<br><br><em>Visitor Tracking</em>: If the sale took place on a website, and you have tracking domain DNS set up in RevCent for the website, you must include the following metadata from the visitor/session cookie for the sale:<br>1. {'name': 'revcent_track_id', 'value': '[the value of visitor/session cookie.revcent_track_id]'}<br>2. {'name': 'revcent_entry_id', 'value': '[the value of visitor cookie.revcent_entry_id]'}<br><br><em>Offline Payments</em>: For offline payment sales involving a third party payment processor you must include three metadata entries to ensure proper association of the sale within RevCent to the third party:<br>1. {'name': 'offline_payment_third_party', 'value': 'sezzle | afterpay | klarna | affirm | amazon_pay'}<br>2. {'name': 'offline_payment_third_party_transaction_id', 'value': '[the transaction ID from the third party]'}<br>3. {'name': 'offline_payment_third_party_integration_id', 'value': '[the RevCent ID of the third party integration within your account for the third party processor]'}"}},"type":"object","additionalProperties":false,"required":["campaign","product","payment_type","ip_address"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"title":"Credit Card Sale Success Response","description":"The API call result for a successful credit card sale.","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"type":"integer"},"amount":{"description":"The sale amount.","type":"number","format":"float"},"amount_original_total":{"description":"The total calculated amount when an item is first created. I.e. the sum of all products, tax and shipping without discounts applied.","type":"number","format":"float"},"amount_total":{"description":"The current total amount after any refunds and discounts applied. amount_original_total - (amount_refunded + amount_discounted)","type":"number","format":"float"},"amount_gross":{"description":"The current gross amount, money actually transacted. payments - payments_refunded","type":"number","format":"float"},"amount_net":{"description":"The current net amount. amount_gross - amount_fees","type":"number","format":"float"},"amount_fees":{"description":"The current amount of calculated fees deducted by a payment processor. amount_gross * processor_fee_percentage","type":"number","format":"float"},"amount_captured":{"description":"The current amount captured but not yet settled.","type":"number","format":"float"},"amount_settled":{"description":"The current amount settled.","type":"number","format":"float"},"amount_remaining":{"description":"The current amount remaining to be processed. I.e. trials not yet expired or salvage transactions not yet salvaged. amount_to_salvage + awaiting_trial_expirations","type":"number","format":"float"},"amount_refunded":{"description":"The current amount of any refunds, including cancelled trial amounts.","type":"number","format":"float"},"amount_discounted":{"description":"The amount of any discounts.","type":"number","format":"float"},"amount_to_salvage":{"description":"The current amount of any salvage transactions not yet salvaged.","type":"number","format":"float"},"campaign_id":{"type":"string","title":"Campaign ID","description":"A 20 character campaign ID.","minLength":20,"maxLength":20},"campaign_name":{"type":"string","description":"The campaign name."},"customer":{"type":"object","description":"The customer response object contains the details of the customer related to the item.","additionalProperties":false,"properties":{"address_line_1":{"type":"string","description":"The customer first address line."},"address_line_2":{"type":"string","description":"The customer second address line."},"blocked":{"type":"boolean","description":"Whether the customer is blocked."},"city":{"type":"string","description":"The customer city."},"company":{"type":"string","description":"The customer company."},"country":{"type":"string","description":"The customer country in three letter ISO 3166-1 alpha-3 format."},"email":{"type":"string","format":"email","description":"The customer email."},"first_name":{"type":"string","description":"The customer first name."},"internal_id":{"type":"string","description":"An internal ID given by the user for the customer."},"last_name":{"type":"string","description":"The customer last name."},"phone":{"type":"string","description":"The customer phone."},"state":{"type":"string","description":"The customer state."},"zip":{"type":"string","description":"The customer ZIP and or postal code."},"created_date_unix":{"description":"The unix timestamp of when the item was created.","type":"integer","format":"unix-time"},"id":{"title":"Customer ID","type":"string","description":"A 20 character customer ID.","minLength":20,"maxLength":20},"enabled":{"type":"boolean","description":"Whether the customer is enabled."},"metadata":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string","description":"A name paired to the value for the metadata object. Limited to 100 characters in length.","minLength":1,"maxLength":100},"value":{"type":"string","description":"A value paired to the name for the metadata object. Limited to 255 characters in length.","minLength":1,"maxLength":255}},"type":"object","required":["name","value"]},"type":"array","description":"An array of metadata objects, each metadata object being a name and value pair."},"updated_date_unix":{"description":"The unix timestamp of when the item was last updated.","type":"integer","format":"unix-time"}}},"customer_card_id":{"type":"string","description":"A 20 character customer card ID.","minLength":20,"maxLength":20},"customer_id":{"title":"Customer ID","type":"string","description":"A 20 character customer ID.","minLength":20,"maxLength":20},"discount_created":{"type":"array","description":"An array of any discounts created.","items":{"type":"object","additionalProperties":false,"description":"A discount item.","properties":{"id":{"type":"string","description":"A 20 character discount ID.","minLength":20,"maxLength":20},"name":{"type":"string","description":"The discount name."},"description":{"type":"string","description":"The discount description."},"discount_amount":{"type":"number","format":"float","description":"The discount dollar amount."},"discount_percent":{"type":"number","format":"float","description":"The calculated discount percentage of the sale total."}}}},"fraud_detection_response":{"type":"object","additionalProperties":false,"description":"The response of any Sentinel fraud checks that occurred, including third party checks.","properties":{"code":{"type":"integer","description":"The fraud detection code. 0 = Error, 1 = No Fraud,  5 = Fraud,","enum":[0,1,5]},"fraud_detected":{"type":"boolean","description":"Indicates whether fraud was detected."},"fraud_detection_created":{"items":{"type":"string","description":"A 20 character fraud detection ID.","minLength":20,"maxLength":20},"type":"array","description":"An array containing the ID's of any fraud detections created."},"fraud_detection_requests":{"type":"array","description":"An array of fraud detection requests related to the Sentinel checks.","items":{"type":"object","additionalProperties":false,"properties":{"code":{"description":"The fraud detection request code. 0 = Error, 1 = No Fraud,  5 = Fraud,","enum":[0,1,5]},"fraud_detected":{"type":"boolean","description":"Indicates whether the specific fraud detection request resulted in fraud."},"fraud_score":{"type":"integer","description":"The specific fraud detection request score."},"id":{"type":"string","description":"A 20 character fraud detection request ID.","minLength":20,"maxLength":20},"message":{"type":"string","description":"Human readable message of the fraud request."}}}},"message":{"type":"string","description":"The final fraud check message."}}},"gateway":{"type":"string","description":"The gateway which processed the successful sale."},"gateway_id":{"type":"string","description":"A 20 character user gateway ID.","minLength":20,"maxLength":20},"gateway_raw_response":{"type":"string","description":"The stringified JSON response returned from the gateway."},"has_fraud_alert":{"type":"boolean","description":"Whether the sale has a fraud alert"},"internal_customer_id":{"description":"An optional internal customer ID, i.e. a third party customer ID. For records purposes only.","type":"string"},"internal_sale_id":{"description":"An optional internal sale ID, i.e. a third party order ID. For records purposes only.","type":"string"},"ip_address":{"type":"string","description":"The customer IP address."},"iso_currency":{"description":"The three digit ISO 4217 currency code.","type":"string","minLength":3,"maxLength":3},"metadata":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string","description":"A name paired to the value for the metadata object. Limited to 100 characters in length.","minLength":1,"maxLength":100},"value":{"type":"string","description":"A value paired to the name for the metadata object. Limited to 255 characters in length.","minLength":1,"maxLength":255}},"type":"object","required":["name","value"]},"type":"array","description":"An array of metadata objects, each metadata object being a name and value pair."},"payment_type":{"type":"string","description":"The sale payment type."},"product_sale_created":{"type":"array","description":"Product sales created as a result of the sale.","items":{"type":"object","additionalProperties":false,"properties":{"amount_original_total":{"description":"The total calculated amount when an item is first created. I.e. the sum of all products, tax and shipping without discounts applied.","type":"number","format":"float"},"amount_total":{"description":"The current total amount after any refunds and discounts applied. amount_original_total - (amount_refunded + amount_discounted)","type":"number","format":"float"},"amount_gross":{"description":"The current gross amount, money actually transacted. payments - payments_refunded","type":"number","format":"float"},"amount_net":{"description":"The current net amount. amount_gross - amount_fees","type":"number","format":"float"},"amount_fees":{"description":"The current amount of calculated fees deducted by a payment processor. amount_gross * processor_fee_percentage","type":"number","format":"float"},"amount_captured":{"description":"The current amount captured but not yet settled.","type":"number","format":"float"},"amount_settled":{"description":"The current amount settled.","type":"number","format":"float"},"amount_remaining":{"description":"The current amount remaining to be processed. I.e. trials not yet expired or salvage transactions not yet salvaged. amount_to_salvage + awaiting_trial_expirations","type":"number","format":"float"},"amount_refunded":{"description":"The current amount of any refunds, including cancelled trial amounts.","type":"number","format":"float"},"amount_discounted":{"description":"The amount of any discounts.","type":"number","format":"float"},"amount_to_salvage":{"description":"The current amount of any salvage transactions not yet salvaged.","type":"number","format":"float"},"id":{"type":"string","description":"A 20 character product sale ID.","minLength":20,"maxLength":20},"price":{"type":"number","description":"The product price specific to the product sale."},"quantity":{"type":"integer","description":"The product quantity specific to the product sale."},"product":{"type":"object","additionalProperties":false,"description":"The product Schema","properties":{"id":{"title":"Product ID","type":"string","description":"A 20 character product ID.","minLength":20,"maxLength":20},"name":{"type":"string","description":"The product name specific to the product sale."},"internal_id":{"type":"string","description":"The product internal ID specific to the product sale."},"sku":{"type":"string","description":"The product SKU specific to the product sale."}}},"subscription":{"type":"object","additionalProperties":false,"description":"The ID of a subscription created specific to the product sale.","properties":{"id":{"type":"string","description":"A 20 character subscription ID.","minLength":20,"maxLength":20}}},"trial":{"type":"object","additionalProperties":false,"description":"The ID of a trial created specific to the product sale.","properties":{"id":{"type":"string","description":"A 20 character trial ID.","minLength":20,"maxLength":20}}}}}},"sale_id":{"type":"string","description":"A 20 character sale ID.","minLength":20,"maxLength":20},"salvage_transaction":{"type":"object","additionalProperties":false,"description":"Will be present if a salvage transaction was created.","properties":{"id":{"type":"string","description":"A 20 character salvage transaction ID.","minLength":20,"maxLength":20},"amount":{"type":"number","format":"float","description":"The salvage transaction amount."}}},"salvage_transaction_created":{"type":"boolean","description":"Indicates whether a salvage transaction was created."},"ship_to":{"title":"Ship To Object","type":"object","additionalProperties":false,"description":"The ship to response object contains the details of the shipping destination related to the item.","properties":{"first_name":{"type":"string","description":"The shipping first name."},"last_name":{"type":"string","description":"The shipping last name."},"address_line_1":{"type":"string","description":"The shipping first address line."},"address_line_2":{"type":"string","description":"The shipping second address line."},"city":{"type":"string","description":"The shipping city."},"state":{"type":"string","description":"The shipping state."},"zip":{"type":"string","description":"The shipping ZIP and or postal code."},"company":{"type":"string","description":"The shipping company."},"country":{"type":"string","description":"The shipping country in three letter ISO 3166-1 alpha-3 format."},"email":{"type":"string","format":"email","description":"The shipping email."},"phone":{"type":"string","description":"The shipping phone."}}},"shipping_created":{"type":"array","description":"An array of any shipping created.","items":{"type":"object","additionalProperties":false,"properties":{"amount_original_total":{"description":"The total calculated amount when an item is first created. I.e. the sum of all products, tax and shipping without discounts applied.","type":"number","format":"float"},"amount_total":{"description":"The current total amount after any refunds and discounts applied. amount_original_total - (amount_refunded + amount_discounted)","type":"number","format":"float"},"amount_gross":{"description":"The current gross amount, money actually transacted. payments - payments_refunded","type":"number","format":"float"},"amount_net":{"description":"The current net amount. amount_gross - amount_fees","type":"number","format":"float"},"amount_fees":{"description":"The current amount of calculated fees deducted by a payment processor. amount_gross * processor_fee_percentage","type":"number","format":"float"},"amount_captured":{"description":"The current amount captured but not yet settled.","type":"number","format":"float"},"amount_settled":{"description":"The current amount settled.","type":"number","format":"float"},"amount_remaining":{"description":"The current amount remaining to be processed. I.e. trials not yet expired or salvage transactions not yet salvaged. amount_to_salvage + awaiting_trial_expirations","type":"number","format":"float"},"amount_refunded":{"description":"The current amount of any refunds, including cancelled trial amounts.","type":"number","format":"float"},"amount_discounted":{"description":"The amount of any discounts.","type":"number","format":"float"},"amount_to_salvage":{"description":"The current amount of any salvage transactions not yet salvaged.","type":"number","format":"float"},"id":{"type":"string","description":"A 20 character shipping ID.","minLength":20,"maxLength":20},"provider":{"description":"The shipping provider. This will be included when creating a shipment at a fulfillment center. Please refer to our <a href=\"https://kb.revcent.com/en/revenue/shipping#provider-method-table\" target=\"_blank\">Provider Method Table</a> at our knowledge base for the correct provider id.","type":"string"},"provider_method":{"description":"The shipping provider method. This will be included when creating a shipment at a fulfillment center. Please refer to our <a href=\"https://kb.revcent.com/en/revenue/shipping#provider-method-table\" target=\"_blank\">Provider Method Table</a> at our knowledge base for the correct method id corresponding to the provider.","type":"string"}}}},"subscription_created":{"type":"array","description":"An array of any subscriptions created as a result of the sale.","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"A 20 character subscription ID.","minLength":20,"maxLength":20},"start_date_unix":{"description":"Unix timestamp of when the subscription starts.","type":"integer","format":"unix-time"},"next_renewal_date_unix":{"description":"Unix timestamp of when the next renewal date is.","type":"integer","format":"unix-time"},"product_sale":{"type":"object","additionalProperties":false,"description":"The product sale related to the subscription.","properties":{"id":{"type":"string","description":"A 20 character product sale ID.","minLength":20,"maxLength":20}}},"product":{"type":"object","additionalProperties":false,"description":"The product related to the subscription.","properties":{"id":{"title":"Product ID","type":"string","description":"A 20 character product ID.","minLength":20,"maxLength":20},"name":{"type":"string","description":"The product name specific to the subscription."},"internal_id":{"type":"string","description":"The product internal ID specific to the subscription."},"sku":{"type":"string","description":"The product SKU specific to the subscription."}}},"trial":{"type":"object","additionalProperties":false,"description":"Any trial related to the subscription.","properties":{"id":{"type":"string","description":"A 20 character trial ID.","minLength":20,"maxLength":20}}}}}},"tax_created":{"type":"array","description":"Any tax created as a result of the sale.","items":{"type":"object","additionalProperties":false,"properties":{"amount_original_total":{"description":"The total calculated amount when an item is first created. I.e. the sum of all products, tax and shipping without discounts applied.","type":"number","format":"float"},"amount_total":{"description":"The current total amount after any refunds and discounts applied. amount_original_total - (amount_refunded + amount_discounted)","type":"number","format":"float"},"amount_gross":{"description":"The current gross amount, money actually transacted. payments - payments_refunded","type":"number","format":"float"},"amount_net":{"description":"The current net amount. amount_gross - amount_fees","type":"number","format":"float"},"amount_fees":{"description":"The current amount of calculated fees deducted by a payment processor. amount_gross * processor_fee_percentage","type":"number","format":"float"},"amount_captured":{"description":"The current amount captured but not yet settled.","type":"number","format":"float"},"amount_settled":{"description":"The current amount settled.","type":"number","format":"float"},"amount_refunded":{"description":"The current amount of any refunds, including cancelled trial amounts.","type":"number","format":"float"},"id":{"type":"string","description":"A 20 character tax ID.","minLength":20,"maxLength":20},"name":{"description":"The name for the tax entry.","type":"string"},"description":{"description":"The description for the tax entry.","type":"string"},"rate":{"type":"number","format":"float","description":"The calculated tax rate."}}}},"third_party_shop":{"description":"The originating user shop, if applicable.","additionalProperties":false,"properties":{"id":{"type":"string","description":"A 20 character user shop ID.","minLength":20,"maxLength":20},"name":{"description":"The user shop name.","type":"string"}},"type":"object"},"transaction_id":{"type":"string","description":"A 20 character transaction ID.","minLength":20,"maxLength":20},"trial_created":{"type":"array","description":"The trial_created Schema","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"A 20 character trial ID.","minLength":20,"maxLength":20},"num_days":{"type":"integer","description":"The total duration of the trial in days"},"end_date_unix":{"description":"Unix timestamp of when the trial is set to expire.","type":"integer","format":"unix-time"},"product_sale":{"type":"object","additionalProperties":false,"description":"The product sale related to the trial.","properties":{"id":{"type":"string","description":"A 20 character product sale ID.","minLength":20,"maxLength":20}}},"product":{"type":"object","additionalProperties":false,"description":"The product related to the trial.","properties":{"id":{"title":"Product ID","type":"string","description":"A 20 character product ID.","minLength":20,"maxLength":20},"name":{"type":"string","description":"The product name specific to the trial."},"internal_id":{"type":"string","description":"The product internal ID specific to the trial."},"sku":{"type":"string","description":"The product SKU specific to the trial."}}},"subscription":{"type":"object","additionalProperties":false,"description":"Any subscription related to the trial.","properties":{"id":{"type":"string","description":"A 20 character subscription ID.","minLength":20,"maxLength":20}}}}}},"result":{"type":"string"}},"type":"object","additionalProperties":false}]}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"Errors specific to requests involving a payment being sent to a processor.","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error, of which can be either 0 = RevCent Error, 2 = Processor Decline, 3 = Processor Error, 4 = Processor Hold, 5 = Fraud Detected","type":"integer","enum":[0,2,3,4,5]},"campaign_id":{"type":"string","title":"Campaign ID","description":"A 20 character campaign ID.","minLength":20,"maxLength":20},"campaign_name":{"type":"string","description":"The campaign name."},"customer":{"type":"object","description":"The customer response object contains the details of the customer related to the item.","additionalProperties":false,"properties":{"address_line_1":{"type":"string","description":"The customer first address line."},"address_line_2":{"type":"string","description":"The customer second address line."},"blocked":{"type":"boolean","description":"Whether the customer is blocked."},"city":{"type":"string","description":"The customer city."},"company":{"type":"string","description":"The customer company."},"country":{"type":"string","description":"The customer country in three letter ISO 3166-1 alpha-3 format."},"email":{"type":"string","format":"email","description":"The customer email."},"first_name":{"type":"string","description":"The customer first name."},"internal_id":{"type":"string","description":"An internal ID given by the user for the customer."},"last_name":{"type":"string","description":"The customer last name."},"phone":{"type":"string","description":"The customer phone."},"state":{"type":"string","description":"The customer state."},"zip":{"type":"string","description":"The customer ZIP and or postal code."},"created_date_unix":{"description":"The unix timestamp of when the item was created.","type":"integer","format":"unix-time"},"id":{"title":"Customer ID","type":"string","description":"A 20 character customer ID.","minLength":20,"maxLength":20},"enabled":{"type":"boolean","description":"Whether the customer is enabled."},"metadata":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string","description":"A name paired to the value for the metadata object. Limited to 100 characters in length.","minLength":1,"maxLength":100},"value":{"type":"string","description":"A value paired to the name for the metadata object. Limited to 255 characters in length.","minLength":1,"maxLength":255}},"type":"object","required":["name","value"]},"type":"array","description":"An array of metadata objects, each metadata object being a name and value pair."},"updated_date_unix":{"description":"The unix timestamp of when the item was last updated.","type":"integer","format":"unix-time"}}},"sale_id":{"type":"string","description":"A 20 character sale ID.","minLength":20,"maxLength":20},"error_code":{"description":"The specific error code.","type":"string"},"gateway_raw_response":{"type":"string","title":"The stringified JSON response returned from the gateway."},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIPaymentErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}