POST | /PSBINCheckForToken |
---|
import Foundation
import ServiceStack
// @DataContract
public class PSBINCheckForTokenRequest : Codable
{
// @DataMember
public var credentials:RequestorCredentials
// @DataMember
public var token:String
required public init(){}
}
public class RequestorCredentials : Codable
{
// @Required()
public var merchantId:String?
// @Required()
public var userName:String?
// @Required()
public var password:String?
// @Required()
public var version:String?
required public init(){}
}
// @DataContract
public class PSBINCheckForToken : PaysecureResponseInternal
{
// @DataMember
public var token:String
// @DataMember
public var bin:String
// @DataMember
public var internetPinDebit:Bool
// @DataMember
public var ecomEBTSNAP:Bool
// @DataMember
public var ecomEBTCash:Bool
// @DataMember
public var posFlag:Bool
// @DataMember
public var pinlessEcommerce:Bool
// @DataMember
public var pinlessBillPay:Bool
// @DataMember
public var onDemandPaymentCredit:Bool
// @DataMember
public var onDemandPaymentDebit:Bool
// @DataMember
public var pinlessA2ACredit:Bool
// @DataMember
public var pinlessA2ADebit:Bool
// @DataMember
public var pinlessPrePaidLoad:Bool
// @DataMember
public var dualMessage:Bool
// @DataMember
public var recurring:Bool
// @DataMember
public var cardVerify:Bool
// @DataMember
public var posPinlessDualMessageFlag:Bool
// @DataMember
public var otp:Bool
// @DataMember
public var fastFunds:String
// @DataMember
public var errorMessage:String
// @DataMember
public var errorCode:String
// @DataMember
public var incrementalAuth:Bool
// @DataMember
public var wic:Bool
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case token
case bin
case internetPinDebit
case ecomEBTSNAP
case ecomEBTCash
case posFlag
case pinlessEcommerce
case pinlessBillPay
case onDemandPaymentCredit
case onDemandPaymentDebit
case pinlessA2ACredit
case pinlessA2ADebit
case pinlessPrePaidLoad
case dualMessage
case recurring
case cardVerify
case posPinlessDualMessageFlag
case otp
case fastFunds
case errorMessage
case errorCode
case incrementalAuth
case wic
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
token = try container.decodeIfPresent(String.self, forKey: .token)
bin = try container.decodeIfPresent(String.self, forKey: .bin)
internetPinDebit = try container.decodeIfPresent(Bool.self, forKey: .internetPinDebit)
ecomEBTSNAP = try container.decodeIfPresent(Bool.self, forKey: .ecomEBTSNAP)
ecomEBTCash = try container.decodeIfPresent(Bool.self, forKey: .ecomEBTCash)
posFlag = try container.decodeIfPresent(Bool.self, forKey: .posFlag)
pinlessEcommerce = try container.decodeIfPresent(Bool.self, forKey: .pinlessEcommerce)
pinlessBillPay = try container.decodeIfPresent(Bool.self, forKey: .pinlessBillPay)
onDemandPaymentCredit = try container.decodeIfPresent(Bool.self, forKey: .onDemandPaymentCredit)
onDemandPaymentDebit = try container.decodeIfPresent(Bool.self, forKey: .onDemandPaymentDebit)
pinlessA2ACredit = try container.decodeIfPresent(Bool.self, forKey: .pinlessA2ACredit)
pinlessA2ADebit = try container.decodeIfPresent(Bool.self, forKey: .pinlessA2ADebit)
pinlessPrePaidLoad = try container.decodeIfPresent(Bool.self, forKey: .pinlessPrePaidLoad)
dualMessage = try container.decodeIfPresent(Bool.self, forKey: .dualMessage)
recurring = try container.decodeIfPresent(Bool.self, forKey: .recurring)
cardVerify = try container.decodeIfPresent(Bool.self, forKey: .cardVerify)
posPinlessDualMessageFlag = try container.decodeIfPresent(Bool.self, forKey: .posPinlessDualMessageFlag)
otp = try container.decodeIfPresent(Bool.self, forKey: .otp)
fastFunds = try container.decodeIfPresent(String.self, forKey: .fastFunds)
errorMessage = try container.decodeIfPresent(String.self, forKey: .errorMessage)
errorCode = try container.decodeIfPresent(String.self, forKey: .errorCode)
incrementalAuth = try container.decodeIfPresent(Bool.self, forKey: .incrementalAuth)
wic = try container.decodeIfPresent(Bool.self, forKey: .wic)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if token != nil { try container.encode(token, forKey: .token) }
if bin != nil { try container.encode(bin, forKey: .bin) }
if internetPinDebit != nil { try container.encode(internetPinDebit, forKey: .internetPinDebit) }
if ecomEBTSNAP != nil { try container.encode(ecomEBTSNAP, forKey: .ecomEBTSNAP) }
if ecomEBTCash != nil { try container.encode(ecomEBTCash, forKey: .ecomEBTCash) }
if posFlag != nil { try container.encode(posFlag, forKey: .posFlag) }
if pinlessEcommerce != nil { try container.encode(pinlessEcommerce, forKey: .pinlessEcommerce) }
if pinlessBillPay != nil { try container.encode(pinlessBillPay, forKey: .pinlessBillPay) }
if onDemandPaymentCredit != nil { try container.encode(onDemandPaymentCredit, forKey: .onDemandPaymentCredit) }
if onDemandPaymentDebit != nil { try container.encode(onDemandPaymentDebit, forKey: .onDemandPaymentDebit) }
if pinlessA2ACredit != nil { try container.encode(pinlessA2ACredit, forKey: .pinlessA2ACredit) }
if pinlessA2ADebit != nil { try container.encode(pinlessA2ADebit, forKey: .pinlessA2ADebit) }
if pinlessPrePaidLoad != nil { try container.encode(pinlessPrePaidLoad, forKey: .pinlessPrePaidLoad) }
if dualMessage != nil { try container.encode(dualMessage, forKey: .dualMessage) }
if recurring != nil { try container.encode(recurring, forKey: .recurring) }
if cardVerify != nil { try container.encode(cardVerify, forKey: .cardVerify) }
if posPinlessDualMessageFlag != nil { try container.encode(posPinlessDualMessageFlag, forKey: .posPinlessDualMessageFlag) }
if otp != nil { try container.encode(otp, forKey: .otp) }
if fastFunds != nil { try container.encode(fastFunds, forKey: .fastFunds) }
if errorMessage != nil { try container.encode(errorMessage, forKey: .errorMessage) }
if errorCode != nil { try container.encode(errorCode, forKey: .errorCode) }
if incrementalAuth != nil { try container.encode(incrementalAuth, forKey: .incrementalAuth) }
if wic != nil { try container.encode(wic, forKey: .wic) }
}
}
// @DataContract
public class PaysecureResponseInternal : Codable
{
// @DataMember(EmitDefaultValue=false)
public var timestamps:RequestTimestamps
required public init(){}
}
// @DataContract
public class RequestTimestamps : Codable
{
// @DataMember(EmitDefaultValue=false)
public var appLayer:InOutTimes
// @DataMember(EmitDefaultValue=false)
public var parentLookup:InOutTimes
// @DataMember(EmitDefaultValue=false)
public var retryLookup:InOutTimes
// @DataMember(EmitDefaultValue=false)
public var getCardData:InOutTimes
// @DataMember(EmitDefaultValue=false)
public var cardTokenize:InOutTimes
// @DataMember(EmitDefaultValue=false)
public var cardEncrypt:InOutTimes
// @DataMember(EmitDefaultValue=false)
public var dbInsert:InOutTimes
// @DataMember(EmitDefaultValue=false)
public var backendProcess:InOutTimes
// @DataMember(EmitDefaultValue=false)
public var dbUpdate:InOutTimes
// @DataMember(EmitDefaultValue=false)
public var parentUpdate:InOutTimes
// @DataMember(EmitDefaultValue=false)
public var network:InOutTimes
required public init(){}
}
// @DataContract
public class InOutTimes : Codable
{
required public init(){}
}
Swift PSBINCheckForTokenRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /PSBINCheckForToken HTTP/1.1
Host: api.paysecure.acculynk.net
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Credentials":{"MerchantId":"String","UserName":"String","Password":"String","Version":"String"},"Token":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Token":"String","BIN":"String","InternetPinDebit":false,"EcomEBTSNAP":false,"EcomEBTCash":false,"POSFlag":false,"PinlessEcommerce":false,"PinlessBillPay":false,"OnDemandPaymentCredit":false,"OnDemandPaymentDebit":false,"PinlessA2ACredit":false,"PinlessA2ADebit":false,"PinlessPrePaidLoad":false,"DualMessage":false,"Recurring":false,"CardVerify":false,"POSPinlessDualMessageFlag":false,"OTP":false,"FastFunds":"String","ErrorMessage":"String","ErrorCode":"String","IncrementalAuth":false,"WIC":false,"Timestamps":{"AppLayer":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"ParentLookup":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"RetryLookup":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"GetCardData":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"CardTokenize":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"CardEncrypt":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"DBInsert":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"BackendProcess":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"DBUpdate":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"ParentUpdate":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"Network":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"}}}