ApplyPayment
Apply a partial or complete payment to an order created (In-store or outside the store) or to orders that are not auto-closed at a location.
Request Parameters
-
OrderId
long— Specify the OrderId you would like to add a payment to. -
Payment
NewExternalPayment— A NewOrderPayment with an External tender.NewExternalPayment Properties
-
Amount
decimal— Amount charged to the external account from this NewExternalPayment -
Id
int— Incremental Id within the NewOrder -
ReferenceDetails
Array of PaymentReferenceDetail— Optional list of reference details to include about this NewExternalPaymentPaymentReferenceDetail Properties
- Name
string— Name of the reference item, e.g. "Card Type" - Value
string— Value of the reference item, e.g. "Visa"
- Name
-
TenderId
int— Maps to the Id of the Tender of this NewExternalPayment -
TipAmount
decimal— Tip amount for this NewExternalPayment, if applicable
-
Response Parameters
- Message
string— Returns a PAR POS Error message if the request did not go through. Otherwise, this field will be null. - ResultCode
int— Returns one of the following:- 0 — Success
- 1 — Unknown Error
- 2 — Invalid Request
- 3 — Server Unavailable
- 4 — Access Denied
- 101 — Payment could not be processed
- 102 — Order not found
- 103 — Order already closed
- 104 — The store did not respond, please try again
- 106 — Error corresponding to the tender specified in the ApplyPayment request
- Type: stringS
O A P Action required
SOAP envelope containing the ApplyPayment request with OrderId and Payment.
- text/xml; charset=utf-8
curl --request POST \
--url 'https://{server_name_goes_here}.parpos.com/Ordering.svc?ApplyPayment' \
--header 'Content-Type: text/xml; charset=utf-8' \
--header 'AccessToken: your-access-token' \
--header 'LocationToken: your-location-token' \
--header 'SOAPAction: "http://www.brinksoftware.com/webservices/ordering/20140219/IOrderingWebService/ApplyPayment"' \
--data '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.brinksoftware.com/webservices/ordering/20140219">
<soapenv:Header/>
<soapenv:Body>
<ns:ApplyPayment>
<ns:request>
<ns:OrderId>12345</ns:OrderId>
<ns:Payment>
<ns:Amount>10.75</ns:Amount>
<ns:Id>1</ns:Id>
<ns:TenderId>1</ns:TenderId>
<ns:TipAmount>0</ns:TipAmount>
<ns:ReferenceDetails>
<ns:PaymentReferenceDetail>
<ns:Name>Card Type</ns:Name>
<ns:Value>Visa</ns:Value>
</ns:PaymentReferenceDetail>
</ns:ReferenceDetails>
</ns:Payment>
</ns:request>
</ns:ApplyPayment>
</soapenv:Body>
</soapenv:Envelope>'
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<ApplyPaymentResponse xmlns="http://www.brinksoftware.com/webservices/ordering/20140219">
<ApplyPaymentResult>
<Message>Success</Message>
<ResultCode>0</ResultCode>
</ApplyPaymentResult>
</ApplyPaymentResponse>
</s:Body>
</s:Envelope>