ACME Payments documentation is a draft & work in progress.  Updates may be published periodically.


TABLE OF CONTENTS


Sale Payment

This API is used in order to charge a customer for a set amount.


This API depends on having a Token and a Charge object.  


Once you have a token, you can use the sale API to charge the customer.  After completing the sale you can use the Refund API in order to cancel the transaction. 


POST v2/payment/{mid}/sale

Request Parameters

The merchant id of the seller performing the sale.


Request Body

Include a SaleRequest object as the body of the request.


Sample Request

POST https://sandX-api.acmeticketing.net/v2/payment/987-654-321/sale


Response

Returns a SaleResponse object.


SaleRequest Object


NameTypeDescriptionRequired
tokenstringEither a single use or a multi use tokenRequired
chargeCharge object (see below)The charge object for this sale.  The amount is requiredRequired


Charge Object


NameTypeDescriptionRequired
amountnumberThe amount of money the sale or refund is for.  Required
customerPresentbooleanTrue if the customer is part of the checkout flow during this payment, false otherwise.  Optional, true is default.



SaleResponse Object


NameTypeDescription
orderIdnumberThe order to which the charge is being applied.  
paymentIdstringUnique identifier for this payment



Sample Request Body


{
  "token" : "123-456-789",
  "charge": {
    "amount" : 50.00,
    "customerPresent" : false
  }
}



Sample Response Body


Successful Payment 

{
   "paymentId": "tx_123-abc-456",
   "orderId" : 123456
}