v1

latestOpenAPI 3.1.02026-07-24170121.2 MB

Create a Charge - Keyed

This endpoint enables you to securely initiate payment transactions by submitting charge details via a POST request.

post/v1/charges

Headers

Acceptstring required

Indicates which content types, expressed as MIME types, the client is able to understand.

Content-Typestring required

Indicates the media type of the resource sent in the HTTP message body. r /r /Possible Values:/br / application/jsonr /application/x-www-form-urlencoded

Idempotency-Keystring

Ensures that a request is processed only once, even if it is retried due to network timeouts or errors. When provided, the server uses the key to identify and return the result of a previous request with the same key, preventing duplicate operations (e.g., duplicate payments or record creation).

Request body

amountinteger required

A positive integer in cents representing how much to charge. Example: 9 would be $0.09; 99999999 would be $999,999.99. In the sandbox environtment the minimum amount allowed is $0.50 USD.

currencystring required

Three-letter ISO currency code, in lowercase. Currency must be 'usd'

customer_idstring

The unique alphanumeric identifier for a customer. A transaction is associated with a customer when a customer ID is included in the sale request. IMPORTANT: Customer_id is accepted when none of the following values are present in the request: token_id, card_number.

card_idstring

The unique alphanumeric identifier for a card.

statement_descriptionstring

An arbitrary string to be displayed on your customer’s credit card statement.

token_idstring

An alphanumeric that represents a credit card or a debit card. This is obtained by using the 'Create a Token' API. IMPORTANT: token_id is accepted when none of the following are present in the request: customer_id, card_number.

captureinteger

Boolean option to capture charge immediately or pre-authorize and capture at a later date. 1 represents that the charge has to be captured immediately. 0 represents the charge issues an authorization (or pre-authorization) and will need to be captured later. Uncaptured charges expire in seven days.

card_level'LEVEL2' | 'LEVEL3'

Indicates the extent of information to be provided for a transaction. IMPORTANT: If card_level is not specified, then PAYARC will process the transaction as LEVEL1.

sales_taxinteger

Sales tax amount represented in cents. Examples: 9 would be $0.09; 999999999999 would be $9,999,999,999.99. Note: Applicable for LEVEL2 or LEVEL3 transactions. If the transaction is tax-exempt, then enter 0 for the value.

terminal_idstring

The alphanumeric terminal ID from which the transaction was made.

tip_amountinteger

The tip amount of the transaction. Example: 9 would be $0.09; 999999999999 would be $9,999,999,999.99

purchase_orderstring

The value used by the customer to identify an order. Issued by the buyer to the seller. Applicable for LEVEL2 or LEVEL3 transactions.

order_datestring

The date the order was processed. Format: YYYY-MM-DD. Applicable for LEVEL2 for AMEX transactions and all LEVEL3 transactions.

customer_ref_idstring

The reference identifier supplied by the commercial cardholder. Alphanumeric and Whitespace. Applicable for LEVEL2 for AMEX transactions and all LEVEL3 transactions.

ship_to_zipinteger

The postal code for the address to which the goods are being shipped. Alphanumeric. Applicable for LEVEL2 for AMEX transactions and all LEVEL3 transactions.

amex_descriptorstring

The value of the Transaction Advice Addendum field that displays descriptive information about a transaction on a customer's AMEX card statement. Alphanumeric and Whitespace. IMPORTANT: Applicable for LEVEL2 transactions for AMEX only.

supplier_reference_numberstring

This field contains a reference number that is used by AMEX to obtain supporting information on a transaction from a supplier. Alphanumeric and Whitespace. Applicable for LEVEL2 for AMEX transactions and all LEVEL3 transactions.

tax_amountinteger

The tax amount. Example: 9 would be $0.99; 999999999999 would be $9,999,999,999.99. Applicable for all LEVEL3 transactions. If tax amount is $0.00, enter 0 as the value.

tax_category'SERVICE' | 'DUTY' | 'VAT' | 'ALTERNATE' | 'NATIONAL' | 'TAX_EXEMPT'

The type of tax.

customer_vat_numberstring

Government-assigned tax identification number of the merchant. Indicates the customer's government-assigned tax identification number or the identification number assigned to their purchasing company by the tax authorities. Applicable for LEVEL3 transactions.

summary_commodity_codestring

The international description code of the overall goods or services being supplied. Alphanumeric and Whitespace. Applicable for LEVEL3 transactions. Merchants can request an updated listing of the currently defined codes.

shipping_chargesinteger

The dollar amount for shipping or freight charges applied to a product or transaction. Example: 9 would be $0.09; '9999' would be '$99.99'Applicable for LEVEL3 transactions. If shipping costs are '$0.00' enter '0' as the value.

duty_chargesinteger

Indicates the total charges for any import or export duties included in the order. Examples: 9 would be $0.09; 999999999999 would be $9,999,999,999.99. Applicable for LEVEL3 transactions.

ship_from_zipinteger

The postal code for the address from which the goods were shipped. Alphanumeric. Applicable for LEVEL3 transactions.

destination_country_codestring

The destination country code indicator. Alphanumeric. Applicable for LEVEL3 transactions.

tax_typestring

The type of tax. Alphanumeric. Applicable for LEVEL3 transactions.

vat_invoicestring

The Value Added Tax (VAT) invoice number associated with the transaction.Min Lengthtext-Max Lengthtext-NotesAlphanumeric and Whitespace0 characters15 charactersApplicable for LEVEL3 transactions.

tax_rateinteger

The type of tax rate. This field is used if tax_category is not used. The default sales tax rate in percentage must be between 0.1% - 22%. Applicable for LEVEL3 transactions.

emailstring

The cardholder’s email address. Alphanumeric and Special Characters

cvvinteger

The three or four-digit security code on the card. IMPORTANT: Required when customer_id is passed and the card is not authorized/verified. Refer to the Create a Token API to authorize a card.

phone_numberinteger

The cardholder’s phone number.

surchargeinteger

A positive number representing the surcharge percentage to be added for the charge.

avs_parametersinteger

AVS transaction parameters that provide post-authorization instructions. Mapping: 1 = If AVS ZIP matches but AVS Street Fails, then block the transaction.2 = If AVS ZIP matches but AVS Street Fails, then pass the transaction. 3 = If AVS ZIP fails but AVS Street matches, then block the transaction. 4 = If AVS ZIP fails but AVS Street matches, then pass the transaction. 5 = If AVS ZIP fails and AVS Street fails, then block the transaction. 6 = If AVS ZIP fails and AVS Street fails, then pass the transaction.

bin_location_parametersinteger

BIN location transaction parameters that provide post-authorization instructions. Mapping: 1 = If BIN is not equal to USA, then void. 2 If BIN is not equal to USA and Canada, then void.

bin_card_type_parametersinteger

BIN card type transaction parameters that provide post-authorization instructions. Mapping: 1 = If BIN is a credit card then void. 2= If BIN is a debit card then void. 3 = If BIN is a prepaid card then void. 4 = If BIN is a prepaid and/or debit card then void.

metadatastring

Metadata is useful for storing additional, structured information on an object. You can specify up to 50 keys, with key names up to 20 characters long and values up to 100 characters long.

do_not_send_email_to_customer'yes' | 'no'

To prevent sending an email to the customer for a transaction. By default, the system will send an email.

do_not_send_sms_to_customer'yes' | 'no'

To prevent sending an SMS to the customer.

card_numberstring

The 14-19 digit card number used for the transaction. IMPORTANT: The field is accepted when none of the following are present in the request. customer_id, token_id.

exp_monthstring

The month value, MM displayed on the card used for the transaction. IMPORTANT: The field is accepted when none of the following are present in the request: customer_id, token_id.

exp_yearinteger

The YYYY value mentioned on the card used for the transaction. IMPORTANT: The field is accepted when none of the following are present in the request. customer_id, token_id.

card_holder_namestring

Name of the cardholder as mentioned on the card used to carry out a transaction. IMPORTANT: The field is accepted when none of the following are present in the request. customer_id, token_id.

address_line1string

The cardholder's billing address for line 1. Alphanumeric and Whitespace. IMPORTANT: The field is accepted when none of the following are present in the request. customer_id, token_id. Payfac Max Length: 30 characters.

address_line2string

The cardholder's billing address for line 2. Alphanumeric and Whitespace. IMPORTANT: The field is accepted when none of the following are present in the request. customer_id, token_id. Payfac Max Length: 30 characters.

citystring

The cardholder's city name. Can be a City/District/Suburb/Town/Village. IMPORTANT:The field is accepted when none of the following are present in the request. customer_id, token_id.

statestring

The cardholder's state name. Can be State/County/Province/Region. IMPORTANT: The field is accepted when none of the following are present in the request. customer_id, token_id.

zipinteger

The cardholder's billing ZIP code. IMPORTANT: The field is accepted when none of the following are present in the request. customer_id, token_id.

countrystring

The cardholder's country name. IMPORTANT: The field is accepted when none of the following are present in the request. customer_id, token_id.

secure_codestring

The 3D Secure Code, automatically generated by the merchant's software. Note: This alphanumeric field must use uppercase letters otherwise it will result in a re-enter error.

eci_indicator'2' | '3' | '4' | '5' | '6' | '7' | '8' | 'A' | 'R' | 'T'

The ECI indicates the security level of the payment information provided to the merchant.

<table> <tr><td>2</td><td>Recurring Mail/Telephone Order Transaction.</td></tr> <tr><td>3</td><td>Installment Payment of a Mail/Telephone Order Transaction.</td></tr> <tr><td>4</td><td>Unknown Classification/Other mail order.</td></tr> <tr><td>5</td><td>Secure electronic commerce transaction.</td></tr> <tr><td>6</td><td>Non-Authenticated Electronic Commerce Transaction.</td></tr> <tr><td>7</td><td>Channel Encrypted Transaction.</td></tr> <tr><td>8</td><td>Non-secure Transaction.</td></tr> <tr><td>A</td><td>In-App Authentication (only for Mastercard, AMEX and Discover).</td></tr> <tr><td>R</td><td>First recurring SecureCode Phone Order transaction (Mastercard Only)</td></tr> <tr><td>T</td><td>Single nonrecurring SecureCode Phone Order transaction (Mastercard Only)</td></tr> </tr></table>
ucaf_collection_indicator'0' | '1' | '2' | '5' | '6' | '7'

Universal Cardholder Authentication Field. Indicates the status of the AAV submitted with the transaction request.

<table> <tr><td>0</td><td>UCAF data is not supported by the merchant or the merchant has chosen not to send the indicator.</td></tr> <tr><td>1</td><td>UCAF data collection is supported by the merchant and UCAF data was present and contained an attempted AAV for MasterCard SecureCard.</td></tr> <tr><td>2</td><td>UCAF data collection is supported by the merchant and UCAF data was present and contained a fully authenticated AAV.</td></tr> <tr><td>5</td><td>Issuer Risk-Based Decisioning.</td></tr> <tr><td>6</td><td>Merchant Risk-Based Decisioning.</td></tr> <tr><td>7</td><td>Partial Shipment and recurring payment. Liability will depend on the original UCAF values provided and matching with the initial transaction.</td></tr> </table>
security_protocol'21' | '24'

The cardholder authentication method used for secure Mastercard transactions. Security protocol + UCAF is Electronic security level indicator.

<table> <tr><td>21</td><td>Channel encryption; cardholder certificate not used.</td></tr> <tr><td>24</td><td>Tokenized Payment</td></tr> </table>
directory_server_transaction_idstring

Transaction ID generated by the EMV 3DS Mastercard Directory Server- Applicable to Mastercard SecureCode transactions only. Allowed characters: a-z A-Z 0-9 Space @ # % ( ) / .(Dot) ' : $ , / _ -

program_protocol'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

Program Protocol / Cardholder Authentication Field. Mastercard SecureCode transactions only.

<table> <tr><td>1</td><td>EMV 3-D Secure Version 2.1</td></tr> <tr><td>2</td><td>EMV 3-D Secure Version 2.2</td></tr> <tr><td>3</td><td>EMV 3-D Secure Version 2.3</td></tr> <tr><td>4</td><td>EMV 3-D Secure Version 2.4</td></tr> <tr><td>5</td><td>EMV 3-D Secure Version 2.5</td></tr> <tr><td>6</td><td>EMV 3-D Secure Version 2.6</td></tr> <tr><td>7</td><td>EMV 3-D Secure Version 2.7</td></tr> <tr><td>8</td><td>EMV 3-D Secure Version 2.8</td></tr> <tr><td>9</td><td>EMV 3-D Secure Version 2.9</td></tr> </table>

Example request

{
  "currency": "usd",
  "statement_description": "A1 Company",
  "order_date": "2021-01-31",
  "tax_type": "VAT",
  "email": "someone@example.com",
  "metadata": "{\"FullCustomerName\":\"John Smith\",\"CustomerID\":\"1234567890\"}"
}

Response

201

OR

Example response

{
  "data": {
    "object": "Charge",
    "id": "nBoLWODLMLLoOXyb",
    "amount": 1200,
    "amount_captured": "1200",
    "payarc_fees": 35,
    "type": "Sale",
    "net_amount": 1165,
    "captured": 1,
    "status": "submitted_for_settlement",
    "auth_code": "TAS712",
    "statement_description": "statement description",
    "created_at": 1611924403,
    "updated_at": 1611924405,
    "email": "john.doe@example.com",
    "phone_number": "5417543010",
    "card_level": "LEVEL1",
    "created_by": "bubbles@eyepaste.com",
    "card": {
      "data": {
        "object": "Card",
        "id": "2mMPL029yyP50vyN",
        "card_source": "PHONE",
        "card_holder_name": "Test One",
        "is_default": 1,
        "exp_month": "12",
        "exp_year": "2022",
        "fingerprint": "9v09mPMLP5NMNM0m",
        "brand": "V",
        "last4digit": "1111",
        "first6digit": 411111,
        "customer_id": "4jAPDKVp44MVNxnM",
        "created_at": 1611924035,
        "updated_at": 1611924038
      }
    }
  },
  "meta": {
    "include": [
      "review"
    ]
  }
}