Create a Charge - Swipe

Changed on

THIS IS NOT A PUBLIC ENDPOINT - IT IS NOT APPROVED TO BE PUBLISHED - The solution is not fully approved/validated

post/v1/charges/swipe

Request

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

Headers

Acceptstring

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

Content-Typestring

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.

currencystring required

Three-letter ISO currency code, in lowercase.

card_sourcestring required

This field indicates how the data was captured at the point of sale.

track2Datastring required

This field reflects the credit card's magnetic stripe track 2 data.

ksnstring required

The KSN used for encryption. The KSN should change with every transaction.

track1Datastring

This field reflects the credit card's magnetic stripe track 1 data.

encryptionTypestring

The type of encryption used when capturing the card information.

data_keyinteger

The type of key used to decrypt track data of card.

statement_descriptionstring

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

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.

email_receiptstring

The cardholder's email address.

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

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