> For the complete documentation index, see [llms.txt](https://docs.solapayments.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.solapayments.com/mobile-wallets/apple-pay-hosted-checkout/apple-pay-hosted-checkout-objects-reference-response.md).

# Apple Pay Hosted Checkout Objects Reference (Response)

## **Response objects**

For the Full Response example click [here](https://docs.solapayments.com/mobile-wallets/apple-pay-hosted-checkout/apple-pay-hosted-checkout-sample-code.md)

***

### ApplePayload Object

| **Name**        | **Type**                                                                                                                                                          | **Always exists** | **Description**                                                                    |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------------------------------------------------------------- |
| billingContact  | [PaymentContact](https://docs.cardknox.com/cardknox-products/apple-pay-hosted-checkout/apple-pay-hosted-checkout-objects-reference-request#paymentcontact-object) | No                | Contains all transaction data. For more details please click on the link.          |
| shippingContact | [PaymentContact](https://docs.cardknox.com/cardknox-products/apple-pay-hosted-checkout/apple-pay-hosted-checkout-objects-reference-request#paymentcontact-object) | No                | This is a response object that's returned by Apple after a payer approves payment. |
| token           | PaymentToken                                                                                                                                                      | Yes               | This is a response object that's returned by Apple after a payer approves payment. |

***

### PaymentToken Object

| **Name**              | **Type**                                                                                                                                                        | **Always exists** | **Description**                                                                                                                          |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| paymentData           | JSON                                                                                                                                                            | Yes               | An object containing the encrypted payment data. **This is the object that needs to be Base64 Encoded and sent to gateway as** xCardNum. |
| paymentMethod         | [PaymentMethod](https://docs.cardknox.com/cardknox-products/apple-pay-hosted-checkout/apple-pay-hosted-checkout-objects-reference-request#paymentmethod-object) | Yes               | Information about the card used in the transaction.                                                                                      |
| transactionIdentifier | String                                                                                                                                                          | Yes               | A unique identifier for this payment                                                                                                     |

**paymentData use example**

```
var reqGateway = new
{
  .........
  xcardnum = Convert.ToBase64String(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(req.paymentData)))
  .........
};
```

***

### PaymentComplete Object

An object returned from onPaymentAuthorize ajax call - typically a Gateway Response\
An example of PaymentComplete Response returned by iFields is below:

```
{
  "xResult": "A",
  "xStatus": "Approved",
  "xError": "",
  "xErrorCode": "00000",
  "xRefNum": "481244058",
  "xExp": "0424",
  "xAuthCode": "OK8853",
  "xBatch": "6332569",
  "xAvsResultCode": "YYY",
  "xAvsResult": "Address: Match & 5 Digit Zip: Match",
  "xCvvResultCode": "S",
  "xCvvResult": "Should be On card but Not so indicated",
  "xAuthAmount": "1.12",
  "xMaskedCardNumber": "5xxxxxxxxxxx6344",
  "xCardType": "MasterCard",
  "xName": "Test Applepay",
  "xToken": "34q9h58n68qh24p7719m76m0nhm013hh",
  "xMID": "xxxxxxxxxxx0661",
  "xTID": "xxxx0003",
  "xDate": "7/13/2021 7:18:02 PM",
  "xAuthNetwork": "3",
  "xEntryMethod": "Keyed",
  "xCAVV": "ALyaPlPZZIgIADhFniB+AoABFA==",
  "xEciFlag": "01"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.solapayments.com/mobile-wallets/apple-pay-hosted-checkout/apple-pay-hosted-checkout-objects-reference-response.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
