v1

latestOpenAPI 3.0.12026-07-242871595.3 MB
CHARGES

Create a charge

Charges a credit card or other payment source using data in the charge object. See Create a charge tutorial for more information.

post/v1/charges

Headers

User-Agentstring required

Identifies the application, operating system, vendor, and/or version of the requesting user agent. Format: <AppName>/<Version> <Comment>

x-forwarded-forstring required

Client internet protocol (IP) address of the web browser from which the customer’s payment originates. Note: Header x-forwarded-for is required for enhanced security and accuracy of Clover services. Requests that don’t include the header are not successful.

Request body

amountinteger required

Charge amount in cents. If the charge request includes tax (tax_rate_uuid or tax_amount), this value must be the sum of any item prices and any tax or tip. For example, if the item cost = $10 and the tax is $1, the amount is 1100 cents ($11). Format: cents

currencystring required

Three-letter ISO 4217 currency code. Note: Merchants in Canada and United States (US) can now accept customer payments in currency other than the US Dollar (USD). See Multi Currency Pricing. Format: Lower case Length: Max 3

captureboolean

Indicates whether to immediately capture the charge. Values: True - Default. False - Indicates the charge transaction type is AUTH (or PRE-AUTH), and the charge can be captured later using the capture a charge endpoint.

partial_redemptionboolean

Indicates whether the charge can be authorized for a lesser amount. Values: True False - Default

descriptionstring

Text describing the charge. This information is often displayed to users.

ecomind'ecom' | 'moto'

Indicates who entered the card data used for a charge - customer (ecom) or merchant (moto).

external_reference_idstring

Unique identifier (ID), such as an invoice or purchase order (PO) number, that is sent to the merchant's gateway and displayed in settlement records. Format: Supported for US—alphanumeric characters with in-between spaces. Length: Max 12, including spaces and alphanumeric characters.

external_customer_referencestring

Customer reference number from merchant’s order management system.

receipt_emailstring

Email address to which the charge receipt is sent. Receipts are sent only after the charge is paid. Note: Receipts are not sent in the sandbox environment.

site_urlstring

URL of the site performing the e-commerce transaction. Default: clover.com Constraints: Length: 4–13 characters. Allowed characters: Alphanumeric, periods (.), and hyphens (-) only. Note: Do not include protocol (for example, https://) or www.

sourcestring required

Payment source to charge, such as token or alternate_tender.

intent'save_credential_on_file'

Intent of the external token. Note: For a new TransArmor<sup>®</sup> token, select save_credential_on_file.

tax_rate_uuidstring

Tax rate universally unique identifiers (UUID). Use the Get all tax rates endpoint to retrieve merchant tax UUID information. The tax is not automatically added to the total amount. Your app must ensure the Amount property is the total final amount to charge the customer.

tax_amountinteger

Amount paid in taxes. This value is not automatically added to the total amount. Your app must ensure the Amount property is the total final amount to charge the customer.

tip_amountinteger

Amount paid in tips. This value is automatically added to the total amount when the transaction is finalized.

Response

Successful response. Charge created.

amountinteger required

Charge amount in cents. If the charge request includes tax (tax_rate_uuid or tax_amount), this value must be the sum of any item prices and any tax or tip. For example, if the item cost = $10 and the tax is $1, the amount is 1100 cents ($11). Format: cents

tax_amountinteger

Amount paid in taxes. This value is not automatically added to the total amount. Your app must ensure the Amount property is the total final amount to charge the customer.

tip_amountinteger

Amount paid in tips. This value is automatically added to the total amount when the transaction is finalized.

amount_refundedinteger required

Amount refunded in cents. This value can be less than the amount property on the charge if a partial refund is issued.

partial_authboolean

Indicates if the transaction was partially approved.

capturedboolean required

Indicates whether to immediately capture the charge. Values: True - Default. False - Indicates the charge transaction type is AUTH (or PRE-AUTH), and the charge can be captured later using the capture a charge endpoint.

createdinteger required

Charge creation time (Unix timestamp in milliseconds).

currencystring required

Three-letter ISO 4217 currency code. Format: Lower case Length: Maximum 3

customerstring

Unique identifier of the customer associated with the charge.

descriptionstring nullable

Detail description of the charge.

external_reference_idstring

Unique identifier (ID), such as an invoice or purchase order (PO) number, that is sent to the merchant's gateway and displayed in settlement records. Format: Supported for US—alphanumeric characters with in-between spaces. Length: Maximum 12, including spaces and alphanumeric characters.

external_customer_referencestring

Customer reference number from the merchant's order management system.

auth_codestring nullable

Authorization code of the charge, if available.

ref_numstring nullable

Reference number returned from the payment gateway when the transaction is successful.

failure_codestring nullable

Error code explaining the reason for the charge failure.

failure_messagestring nullable

Detailed information about the reason for the charge failure.

warning_messagestring nullable

Detailed warning information about the charge. Example: Missing original transaction identifer for c-token.

idstring required

Unique identifier of the charge.

livemodeboolean required

Indicates whether the token object is live in production.

metadatastring required

Set of key-value pairs that you can attach to the object. This parameter is useful for storing additional information about the object in a structured format. Length: Maximum 500 characters

object'charge' required

Object type.

orderstring

Unique identifier of the order.

paidboolean required

Indicates whether the charge was successful or authorized for capture.

payment_method_details'card' | 'ach' | 'paypal' | 'giftCard'

Indicates the payment method used for the charge.

on_behalf_ofboolean

Indicates the transaction was made on someone's behalf.

debt_payment'approved' | 'declined' | 'not_processed'

Indicates the status of the charge.

receipt_emailstring nullable

Email address to which the charge receipt is sent. Receipts are sent only after the charge is paid. Note: Receipts are not sent in the sandbox environment.

receipt_numberstring nullable

Receipt number of the charge.

receipt_urlstring required

URL where the charge receipt is accessible. The receipt displays the latest state of the charge, including any refunds. If the charge is for an invoice, the receipt is displayed as an invoice.

site_urlstring

URL of the site performing the e-commerce transaction. Default: clover.com Constraints: Length: 4–13 characters. Allowed characters: Alphanumeric, periods (.), and hyphens (-) only. Note: Do not include protocol (for example, https://) or www.

refundedboolean required

Indicates whether the charge was fully refunded or partial refunded. Values: True - Full refunded False - Partially refunded

status'succeeded' | 'pending' | 'failed' required

Payment status of the charge.

ecomind'ecom' | 'moto' | 'retail'

Indicates the source of the card data.

amount_capturedinteger

Total amount captured for pre-auth transactions.