POST | /User/Purchase |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
PurchaseToken | body | string | No | Purchase token |
Card | body | CreditCard | No | Credit card details |
Product | body | SelectedProduct | No | Selected product |
UseStoredCard | body | bool | No | UserStoredCard if set to true the stored card will be used to process the transaction. This field is not required. |
UseDiamonds | body | bool | No | UseDiamonds if set to true Diamonds will be used to process the transaction. This field is not required. |
Token | body | PaymentToken | No | Token from Apple or Google pay. This field is not required. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Number | form | string | No | Credit card number |
Month | form | int | No | 2 digit number representing the month |
Year | form | int | No | 2 digit number representing the year |
CCV | form | string | No | 3 digit security code |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Token | form | string | No | Product token, represents the selected product and duration |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Type | form | PaymentTokenType | No | |
Token | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
PaymentSuccess | form | bool | No | Indicates if a transaction has succeded |
PaymentResponse | form | PaymentResult | No | Provides additional detail to the payments status |
ErrorCode | form | string | No | If payment failed additional error code is returned |
ErrorMessage | form | string | No | If payment failed additional error message is returned |
Receipt | form | PurchaseReceipt | No | If payment has succeded the receipt details are returned |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Amount | form | ReceiptAmount | No | Payment amount |
Company | form | string | No | Company name, that is displayed on the user's bank statement |
ABN | form | string | No | Australian Business Number |
ReceiptNumber | form | string | No | Receipt number for the payment |
CreditCardNumber | form | string | No | Masked Credit Card number |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Total | form | decimal | No | Total amount of payment |
Tax | form | decimal | No | Tax included in the payment |
AmountLessTax | form | decimal | No | Total minus Tax |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /User/Purchase HTTP/1.1
Host: tstsrvs.redhotpie.com.au
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"PurchaseToken":"String","Card":{"Number":"String","Month":0,"Year":0,"CCV":"String"},"Product":{"Token":"String"},"UseStoredCard":false,"UseDiamonds":false,"Token":{"Type":"ApplePay","Token":"String"}}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"PaymentSuccess":false,"PaymentResponse":"TokenAcquisitionFailed","ErrorCode":"String","ErrorMessage":"String","Receipt":{"Amount":{"Total":0,"Tax":0,"AmountLessTax":0},"Company":"String","ABN":"String","ReceiptNumber":"String","CreditCardNumber":"String"}}