GET | /sales/paymentProfile/balanceInquiry | Look up Factor 4 gift card balance | This endpoint has two inquiry styles. If only the AcctToken is provided, it can look up balance of a factor4 gift card that has already been imported into ClubReady. If both PaymentProfile and AcctToken are provided, this endpoint will add the profile to the user before looking up the balance. If you provide both parameters, a separate call to 'sales/paymentProfile/import' is unnecessary. The AcctToken and ProfileToken are created by the ClubReadyGateway API. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ClubReady.Web.Api.Sales
Imports ClubReady.Payments
Imports ClubReady.Web.Api.Sales.Model
Namespace Global
Namespace ClubReady.Payments
Public Partial Class PaymentProfileBalanceInquiryRequest
Public Overridable Property TerminalIpAddress As String
Public Overridable Property AcctToken As String
Public Overridable Property ProfileToken As String
Public Overridable Property StoreId As Integer
End Class
End Namespace
Namespace ClubReady.Web.Api.Sales
<ApiResponse(Description:="Looks up the balance of a payment profile created by the Vault API", ResponseType:=GetType(PaymentProfileBalanceInquiryResponse), StatusCode:=200)>
Public Partial Class PaymentProfileBalanceInquiryEndpoint
Inherits PaymentProfileBalanceInquiryRequest
Implements IApiKeyEndpoint
'''<Summary>
'''Api Authentication Key
'''</Summary>
<ApiMember(Description:="Api Authentication Key", IsRequired:=true, ParameterType:="query")>
Public Overridable Property ApiKey As String
'''<Summary>
'''Store Id
'''</Summary>
<ApiMember(Description:="Store Id", IsRequired:=true, ParameterType:="query")>
Public Overridable Property StoreId As Integer
'''<Summary>
'''Encoded data uniquely identifying the payment profile. Long term storage of AcctToken is not recommended, as the token may change over time (for example, by processes like Account Updater). The length is usually 80 characters.
'''</Summary>
<ApiMember(Description:="
Encoded data uniquely identifying the payment profile.
Long term storage of AcctToken is not recommended, as the token may change over time (for example, by processes like Account Updater).
The length is usually 80 characters.", IsRequired:=true)>
Public Overridable Property AcctToken As String
'''<Summary>
'''Encoded data containing non-PCI information about the Payment Profile. ProfileTokens contain a timestamp. If the ClubReady API does not process the token within 5 minutes,it cannot be accepted and a new profile will have to be created with a new AcctToken. The timevalidation is to prevent old tokens from be re-played at a later time. The length is variable, but generally around 1,000 characters.
'''</Summary>
<ApiMember(Description:="
Encoded data containing non-PCI information about the Payment Profile.
ProfileTokens contain a timestamp. If the ClubReady API does not process the token within 5 minutes,
it cannot be accepted and a new profile will have to be created with a new AcctToken. The time
validation is to prevent old tokens from be re-played at a later time.
The length is variable, but generally around 1,000 characters.")>
Public Overridable Property ProfileToken As String
End Class
End Namespace
Namespace ClubReady.Web.Api.Sales.Model
Public Partial Class PamentProfileBalanceInquiryEndpointResponse
Public Overridable Property Success As Boolean
Public Overridable Property Last4 As String
Public Overridable Property AccountBalance As Nullable(Of Decimal)
Public Overridable Property ResponseCode As String
Public Overridable Property Message As String
End Class
End Namespace
End Namespace
VB.NET PaymentProfileBalanceInquiryEndpoint DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /sales/paymentProfile/balanceInquiry HTTP/1.1 Host: clubready.com Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Success":false,"Last4":"String","AccountBalance":0,"ResponseCode":"String","Message":"String"}