> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Configure Apple Pay for paypoint

POST https://api-sandbox.payabli.com/api/Wallet/applepay/configure-paypoint
Content-Type: application/json

Configure and activate Apple Pay for a Payabli paypoint

Reference: https://docs.payabli.com/developers/api-reference/wallet/applepay/applepay-configure-paypoint

## Authentication

- `Authorization` header (bearer token, required)
- `requestToken` header (required) — Long-lived API token sent in the `requestToken` header. See [API token authentication](/developers/api-tokens).

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Body (application/json)

- `entry` (string, optional) — The entity's entrypoint identifier. [Learn more](/developers/api-reference/api-overview#entrypoint-vs-entry).
- `isEnabled` (boolean, optional) — When `true`, Apple Pay is enabled.

## Response

### 200

Success

- `responseText` (string, required) — Response text for operation: 'Success' or 'Declined'.
- `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure.
- `pageIdentifier` (string, optional) — Auxiliary validation used internally by payment pages and components.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/developers/api-reference/api-responses).
- `responseData` (object, optional)
  - `entry` (string, optional) — The entity's entrypoint identifier. [Learn more](/developers/api-reference/api-overview#entrypoint-vs-entry).
  - `isEnabled` (boolean, optional) — When `true`, the service is enabled.
  - `walletType` (string, optional) — The wallet type. In this context it will always be `applepay`.
  - `walletData` (object, optional) — The wallet data.
    - `entry` (string, optional) — The entity's entrypoint identifier. [Learn more](/developers/api-reference/api-overview#entrypoint-vs-entry).
    - `applePayMerchantId` (string, optional) — The Apple Pay merchant identifier.
    - `domainNames` (list of string, optional) — A list of domain names that are enabled for this paypoint.
    - `paypointName` (string, optional) — The paypoint name.
    - `paypointUrl` (string, optional, nullable) — The paypoint URL.
    - `markedForDeletionAt` (datetime, optional) — The date and time a paypoint's Apple Pay registration was scheduled for deletion. The paypoint will be unregistered from Apple Pay permanently 30 days from this value.
    - `createdAt` (datetime, optional) — Timestamp of when record was created, in UTC.
    - `updatedAt` (datetime, optional) — Timestamp of when record was last updated, in UTC.
    - `id` (string, optional) — Internal ID for the Apple Pay paypoint registration update.
    - `type` (string, optional) — The record type, in this context it will always be `ApplePayRegistration`.
- `roomId` (long, optional, nullable) — Field not in use on this endpoint

## Examples

**Request**

```json
{
  "entry": "8cfec329267",
  "isEnabled": true
}
```

**Response**

```json
{
  "responseText": "Success",
  "isSuccess": true,
  "pageIdentifier": "null",
  "responseCode": 1,
  "responseData": {
    "entry": "8cfec329267",
    "isEnabled": true,
    "walletType": "applepay",
    "walletData": {
      "entry": "8cfec329267",
      "applePayMerchantId": "applePayMerchantId",
      "domainNames": [
        "subdomain.domain.com"
      ],
      "paypointName": "Alaskan Domes",
      "paypointUrl": null,
      "markedForDeletionAt": "2022-07-01T15:00:01Z",
      "createdAt": "2022-07-01T15:00:01Z",
      "updatedAt": "2022-07-01T15:00:01Z",
      "id": "id",
      "type": "ApplePayRegistration"
    }
  },
  "roomId": null
}
```

**SDK Code**

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        clientId: "YOUR_CLIENT_ID",
        clientSecret: "YOUR_CLIENT_SECRET",
    });
    await client.wallet.configureApplePayPaypoint({
        entry: "8cfec329267",
        isEnabled: true,
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.wallet.configure_apple_pay_paypoint(
    entry="8cfec329267",
    is_enabled=True,
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.wallet.requests.ConfigurePaypointRequestApplePay;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.wallet().configureApplePayPaypoint(
            ConfigurePaypointRequestApplePay
                .builder()
                .entry("8cfec329267")
                .isEnabled(true)
                .build()
        );
    }
}
```

```ruby
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.wallet.configure_apple_pay_paypoint(
  entry: "8cfec329267",
  is_enabled: true
)

```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Wallet.ConfigureApplePayPaypointAsync(
            new ConfigurePaypointRequestApplePay {
                Entry = "8cfec329267",
                IsEnabled = true
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.ConfigurePaypointRequestApplePay{
        Entry: payabli.String(
            "8cfec329267",
        ),
        IsEnabled: payabli.Bool(
            true,
        ),
    }
    client.Wallet.ConfigureApplePayPaypoint(
        context.TODO(),
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Wallet\Requests\ConfigurePaypointRequestApplePay;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->wallet->configureApplePayPaypoint(
    new ConfigurePaypointRequestApplePay([
        'entry' => '8cfec329267',
        'isEnabled' => true,
    ]),
);

```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "entry": "8cfec329267",
  "isEnabled": true
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Wallet/applepay/configure-paypoint")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```