Sale
POST
/v2/Payment/SaleSale is the most common request that user to do payment on a terminal.All the responses have GeneralResponse section that informs about successful result or error. See Error Codes and Messages.
Body Parameters
Amount*
numberTipAmount
numberExternalReceipt
stringCustomFee
numberCart
Name*
stringValue*
numberName*
stringValue*
numberName*
stringPrice*
numberUnitPrice
numberQuantity*
numberAdditionalInfo
stringName*
stringValue*
numberName
stringName
stringPrice
numberQuantity
numberPaymentType*
enumReferenceId*
stringPrintReceipt
enumGetReceipt
enumMerchantNumber
numberInvoiceNumber
stringCaptureSignature
booleanGetExtendedData
booleanIsReadyForIS
booleanCallbackInfo
Url
stringReconId
stringIsvId
stringTpn
stringRegisterId
stringAuthkey
stringSPInProxyTimeout
numberCustomFields
CustomerEmail
stringCustomerMobile
stringPOST/v2/Payment/Sale
1curl --location 'https://test.spinpos.net/v2/Payment/Sale' \
2--header 'Content-Type: application/json' \
3--data '{
4 "Amount": 25,
5 "TipAmount": 2.5,
6 "ExternalReceipt": "",
7 "CustomFee": 25,
8 "Cart": {
9 "Amounts": [
10 {
11 "Name": "",
12 "Value": ""
13 }
14 ],
15 "CashPrices": [
16 {
17 "Name": "",
18 "Value": ""
19 }
20 ],
21 "Items": [
22 {
23 "Name": "",
24 "Price": "",
25 "UnitPrice": "",
26 "Quantity": "",
27 "AdditionalInfo": "",
28 "CustomInfos": [
29 {
30 "Name": "",
31 "Value": ""
32 }
33 ],
34 "Modifiers": [
35 {
36 "Name": "",
37 "Options": [
38 {
39 "Name": "",
40 "Price": "",
41 "Quantity": ""
42 }
43 ]
44 }
45 ]
46 }
47 ]
48 },
49 "PaymentType": "Credit",
50 "ReferenceId": "111",
51 "PrintReceipt": "No",
52 "GetReceipt": "No",
53 "MerchantNumber": "",
54 "InvoiceNumber": "",
55 "CaptureSignature": false,
56 "GetExtendedData": true,
57 "IsReadyForIS": false,
58 "CallbackInfo": {
59 "Url": ""
60 },
61 "ReconId": "",
62 "IsvId": "",
63 "Tpn": "",
64 "RegisterId": "",
65 "Authkey": "",
66 "SPInProxyTimeout": "",
67 "CustomFields": {
68 "CustomerEmail": "sai@gmail.com",
69 "CustomerMobile": "+15418996990"
70 }
71}'
Response
// Awaiting response…
Sample response
{
"GeneralResponse": {
"HostResponseCode": "00",
"HostResponseMessage": "Approved",
"ResultCode": "Ok",
"StatusCode": "0000",
"Message": "Approved",
"DetailedMessage": "APPROVAL VTLMC1",
"DelayBeforeNextRequest": null
},
"Amounts": {
"TotalAmount": 1.05,
"Amount": 1,
"TipAmount": null,
"FeeAmount": 0.03,
"TaxAmount": 0.02
},
"CardData": {
"CardType": "Mastercard",
"EntryType": "ChipContactless",
"Last4": "4111",
"First4": "5413",
"BIN": "541333",
"ExpirationDate": "1225",
"Name": "",
"CardBrand": ""
}
}