REST API
Return
POST/v2/Payment/Return

Return (refund) is used to refund a previously processed payment back to the cardholder. All the responses have GeneralResponse section that informs about successful result or error. See Error Codes and Messages.

Body Parameters

Amount*
number
PaymentType*
enum
ReferenceId*
string
PrintReceipt
enum
GetReceipt
enum
MerchantNumber
number
InvoiceNumber
string
CaptureSignature
boolean
GetExtendedData
boolean
IsReadyForIS
boolean
CallbackInfo
object
ReconId
string
IsvId
string
Tpn
string
RegisterId
string
Authkey*
string
SPInProxyTimeout
number
CustomFields
object
POST/v2/Payment/Return
1curl --location 'https://test.spinpos.net/v2/Payment/Return' \
2--header 'Content-Type: application/json' \
3--data '{
4 "Amount": 1,
5 "PaymentType": "Credit",
6 "ReferenceId": "3ecebccef5d4",
7 "PrintReceipt": "No",
8 "GetReceipt": "No",
9 "MerchantNumber": "",
10 "InvoiceNumber": "3",
11 "CaptureSignature": false,
12 "GetExtendedData": true,
13 "IsReadyForIS": false,
14 "CallbackInfo": {
15 "Url": ""
16 },
17 "ReconId": "",
18 "IsvId": "",
19 "Tpn": "",
20 "RegisterId": "",
21 "Authkey": "",
22 "SPInProxyTimeout": "",
23 "CustomFields": {
24 "CustomerEmail": "sai@gmail.com",
25 "CustomerMobile": "+15418996990"
26 }
27}'
Response

// Awaiting response…

Sample response
{
  "GeneralResponse": {
    "HostResponseCode": "",
    "HostResponseMessage": "",
    "ResultCode": "0",
    "StatusCode": "0000",
    "Message": "",
    "DetailedMessage": "",
    "DelayBeforeNextRequest": null
  },
  "PaymentType": "Credit",
  "TransactionType": "",
  "Amounts": {
    "TotalAmount": null,
    "Amount": null,
    "TipAmount": null,
    "FeeAmount": null,
    "TaxAmount": null
  },
  "AuthCode": "",
  "ReferenceId": "",
  "InvoiceNumber": "",
  "SerialNumber": "",
  "BatchNumber": "",
  "TransactionNumber": "",
  "Voided": false,
  "Signature": "",
  "IPosToken": "",
  "Token": "",
  "RRN": "",
  "PNReferenceId": "",
  "MerchantNumber": null,
  "MerchantName": "",
  "ExtendedDataByApplication": {},
  "CardData": {
    "CardType": "None",
    "EntryType": "None",
    "Last4": "",
    "First4": "",
    "BIN": "",
    "ExpirationDate": "",
    "Name": "",
    "CardBrand": ""
  },
  "EMVData": {
    "ApplicationName": "",
    "AID": "",
    "TVR": "",
    "TSI": "",
    "IAD": "",
    "ARC": ""
  },
  "Receipts": {
    "Customer": "",
    "Merchant": ""
  },
  "L2L3ValidationError": {
    "Description": "",
    "PoNumber": "",
    "PurchaseIdentifier": "",
    "SummaryCommodityCode": "",
    "LineItemCount": "",
    "TaxAmount": "",
    "Quantity": "",
    "UnitOfMeasure": "",
    "UnitCost": "",
    "TaxRate": "",
    "DiscountAmount": "",
    "DebitCreditIndicator": "",
    "ExtLineAmount": "",
    "QuantityExpIndicator": "",
    "UnitPriceDecimal": ""
  },
  "AutoRentalValidationError": {
    "AdjustmentAmount": "",
    "AdjustmentAuditIndicatorCode": "",
    "AgreementReferenceNumber": "",
    "PickupAddress": "",
    "PickupCity": "",
    "PickupCountry": "",
    "PickupCountryCode": "",
    "PickupDate": "",
    "PickupLocation": "",
    "PickupRegionCode": "",
    "PickupState": "",
    "RentalDistance": "",
    "RentalDistanceUnitofMeasure": "",
    "RentalDuration": "",
    "RentalPeriod": "",
    "RentalRate": "",
    "RentalTime": "",
    "ReturnAddress": "",
    "ReturnDate": "",
    "ReturnLocationId": "",
    "ReturnRegionCode": "",
    "ReturnStateCountry": "",
    "ReturnTime": "",
    "ServiceMobile": "",
    "VehicleMake": "",
    "VehicleModel": ""
  }
}