Create a Charge - Keyed

Changed on

This endpoint enables you to securely initiate payment transactions by submitting charge details via a POST request. You can enhance transaction data with:

  • <a href="https://docs.payarc.net/reference/create-a-charge-keyed-copy#enhancing-charges-with-level-2-and-level-3-card-data" style="color: grey;">LEVEL 2 or LEVEL 3</a> card information.
  • <a href="https://docs.payarc.net/reference/create-a-charge-keyed-copy#metadata" style="color: grey;">Transaction metadata</a> for detailed insights into each charge.
<div style="text-align: right; margin-top: 20px;"> ❔ <a href="https://docs.payarc.net/docs/faq">FAQ</a> </div>
post/v1/charges (COPY)

Request

  • Base URL
    https://testapi.payarc.net
  • URL
    https://testapi.payarc.net/v1/charges (COPY)
  • Auth
    API key in header Authorization

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. <br /><br /><b>Possible Values:</b><br /> application/json<br />application/x-www-form-urlencoded

Request body

amountinteger required

A positive integer in cents representing how much to charge. <small> <span style="color: #777777;"> <br><b>Format:</b> Numeric (in cents)<br> <b>Min Length:</b> 1 digit<br> <b>Max Length:</b> 8 digits<br> <b>Examples:</b><br> * 9 would be $0.09<br> * 99999999 would be $999,999.99<br> <b>Note:</b> The minimum amount is $0.50 USD when testing in the test environment. </span> </small>

currencystring required

Three-letter ISO currency code, in lowercase.

customer_idstring

The unique number to identify a customer. A transaction is associated with a customer when a customer ID is included in the sale request.

card_idstring

ID of the customer's card that should be charged.

statement_descriptionstring

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

token_idstring

An ID that represents a credit card or a debit card. This is obtained by using 'Create a Token' API.

captureinteger

Option to capture charge immediately or pre-authorize and capture at a later date.

card_levelstring

Indicates extent of information to be provided for a transaction.

sales_taxinteger

Sales tax amount. The sales tax amount represents a value in cents.

terminal_idstring

The terminal ID from which the transaction was made.

tip_amountinteger

The tip amount of the transaction.

purchase_orderstring

The value used by the customer to identify an order. Issued by the buyer to the seller.

order_datestring

The date the order was processed.

customer_ref_idstring

The reference identifier supplied by the commercial cardholder.

ship_to_zipinteger

The postal code for the address to which the goods are being shipped.

amex_descriptorstring

The value of the Transaction Advice Addendum field that displays descriptive information about a transactions on a customer's AMEX card statement.

supplier_reference_numberstring

This field contains a reference number that is used by AMEX to obtain supporting information on a transaction from a supplier. The number can be any combination of characters and numbers defined by the merchant.

tax_amountinteger

The tax amount.

tax_categorystring

The type of tax. Formerly established through Tax Category messages.

customer_vat_numberstring

Government-assigned tax identification number of Merchant. Indicates the customer's government-assigned tax identification number or the identification number assigned to their purchasing company by the tax authorities.

summary_commodity_codestring

The international description code of the overall goods or services being supplied.

shipping_chargesinteger

The dollar amount for shipping or freight charges applied to a product or transaction.

duty_chargesinteger

Indicates the total charges for any import or export duties included in the order.

ship_from_zipinteger

The postal code for the address from which the goods were shipped.

destination_country_codestring

The destination country code indicator.

tax_typestring

The type of tax.

vat_invoicestring

The Value Added Tax (VAT) invoice number associated with the transaction.

tax_rateinteger

The type of tax rate.

emailstring

The cardholder's email address.

cvvinteger

The three or four digit security code on the card.

phone_numberinteger

The cardholder's phone number.

surchargeinteger

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

avs_parametersinteger

AVS transaction parameters that provide post authorization instructions.

bin_location_parametersinteger

BIN location transaction parameters that provide post authorization instructions.

bin_card_type_parametersinteger

BIN card type transaction parameters that provide post authorization instructions.

metadatastring

Metadata is useful for storing additional, structured information on an object. As an example, you could store your user's full name and corresponding unique identifier from your system on a Charge object. You can specify up to 50 keys, with key names up to 20 characters long and values up to 100 characters long. Note! Keys and Values both should be strings and the json format should be like hash.

do_not_send_email_to_customerstring

To prevent sending mail to customer for transaction. By default the system will sent mail

do_not_send_sms_to_customerstring

Do not send sms to customer. in order to prevent sending sms the value must be yes. If not present -sms will be send

card_numberinteger

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

exp_monthinteger

The month value displayed on the card used for the transaction. 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. 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. 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. The field is accepted when none of the following are present in the request. customer_id, token_id

address_line2string

The cardholder's billing address for line 2. The field is accepted when none of the following are present in the request. customer_id, token_id

citystring

The cardholder's city name. Can be a City/District/Suburb/Town/Village. 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.

zipinteger

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

countrystring

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

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"
    ]
  }
}

Changes