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 .soap11 suffix or ?format=soap11
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /soap11 HTTP/1.1
Host: tstsrvs.redhotpie.com.au
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: CreateUserPurchase
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CreateUserPurchase xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RHP_API.ServiceModel">
<Card>
<CCV>String</CCV>
<Month>0</Month>
<Number>String</Number>
<Year>0</Year>
</Card>
<Product>
<Token>String</Token>
</Product>
<PurchaseToken>String</PurchaseToken>
<Token>
<Token>String</Token>
<Type>ApplePay</Type>
</Token>
<UseDiamonds>false</UseDiamonds>
<UseStoredCard>false</UseStoredCard>
</CreateUserPurchase>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <PurchaseResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RHP_API.ServiceModel"> <ErrorCode>String</ErrorCode> <ErrorMessage>String</ErrorMessage> <PaymentResponse>TokenAcquisitionFailed</PaymentResponse> <PaymentSuccess>false</PaymentSuccess> <Receipt> <ABN>String</ABN> <Amount> <AmountLessTax>0</AmountLessTax> <Tax>0</Tax> <Total>0</Total> </Amount> <Company>String</Company> <CreditCardNumber>String</CreditCardNumber> <ReceiptNumber>String</ReceiptNumber> </Receipt> </PurchaseResponse> </soap:Body> </soap:Envelope>