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 org

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

Configure and activate Apple Pay for a Payabli organization

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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: payabliApi
  version: 1.0.0
paths:
  /Wallet/applepay/configure-organization:
    post:
      operationId: configure-apple-pay-organization
      summary: Configure Apple Pay for an organization
      description: Configure and activate Apple Pay for a Payabli organization
      tags:
        - subpackage_wallet
      parameters:
        - name: requestToken
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/type_:ConfigureApplePayOrganizationApiResponse
        '400':
          description: Bad request/ invalid data
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal API Error
          content:
            application/json:
              schema:
                description: Any type
        '503':
          description: Database connection error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:PayabliApiResponse'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cascade:
                  $ref: '#/components/schemas/type_:Cascade'
                isEnabled:
                  $ref: '#/components/schemas/type_:IsEnabled'
                orgId:
                  $ref: '#/components/schemas/type_:OrganizationId'
servers:
  - url: https://api-sandbox.payabli.com/api
  - url: https://api.payabli.com/api
components:
  schemas:
    type_:Cascade:
      type: boolean
      description: >-
        When `true`, the wallet service configuration cascades to all paypoints
        and suborganizations belonging to the parent entity.
      title: Cascade
    type_:IsEnabled:
      type: boolean
      description: When `true`, the service is enabled.
      title: IsEnabled
    type_:OrganizationId:
      type: integer
      format: int64
      description: Organization ID for the target organization.
      title: OrganizationId
    type_:IsSuccess:
      type: boolean
      description: >-
        Boolean indicating whether the operation was successful. A `true` value
        indicates success. A `false` value indicates failure.
      title: IsSuccess
    type_:PageIdentifier:
      type: string
      description: Auxiliary validation used internally by payment pages and components.
      title: PageIdentifier
    type_:Responsecode:
      type: integer
      description: >-
        Code for the response. Learn more in [API Response
        Codes](/developers/api-reference/api-responses).
      title: Responsecode
    type_:CreatedAt:
      type: string
      format: date-time
      description: Timestamp of when record was created, in UTC.
      title: CreatedAt
    type_:ApplePayId:
      type: string
      description: The internal identifier for Apple Pay-related information.
      title: ApplePayId
    type_:JobId:
      type: string
      description: The cascade process ID.
      title: JobId
    type_:JobStatus:
      type: string
      description: |-
        The cascade process status. Available values: 
          - `in_progress`
          - `completed`
          - `failed`
      title: JobStatus
    type_:ApplePayType:
      type: string
      description: The record type.
      title: ApplePayType
    type_:LastModified:
      type: string
      format: date-time
      description: Timestamp of when record was last updated, in UTC.
      title: LastModified
    type_:WalletCascade:
      type: boolean
      description: >-
        When `true`, the wallet service configuration cascades to all paypoints
        and suborganizations belonging to the parent entity.
      title: WalletCascade
    type_:WalletIsEnabled:
      type: boolean
      description: When `true`, wallet service is enabled.
      title: WalletIsEnabled
    type_:OrganizationUpdates:
      type: object
      properties:
        cascade:
          $ref: '#/components/schemas/type_:WalletCascade'
        isEnabled:
          $ref: '#/components/schemas/type_:WalletIsEnabled'
      title: OrganizationUpdates
    type_:ApplePayOrganizationUpdateData:
      type: object
      properties:
        createdAt:
          $ref: '#/components/schemas/type_:CreatedAt'
        id:
          $ref: '#/components/schemas/type_:ApplePayId'
          description: Internal ID for the Apple Pay organization update.
        jobId:
          $ref: '#/components/schemas/type_:JobId'
        jobStatus:
          $ref: '#/components/schemas/type_:JobStatus'
        organizationId:
          $ref: '#/components/schemas/type_:OrganizationId'
        type:
          $ref: '#/components/schemas/type_:ApplePayType'
          description: >-
            The record type, in this context it will always be
            `ApplePayOrganizationUpdate`.
        updatedAt:
          $ref: '#/components/schemas/type_:LastModified'
        updates:
          $ref: '#/components/schemas/type_:OrganizationUpdates'
      title: ApplePayOrganizationUpdateData
    type_:ResponseText:
      type: string
      description: 'Response text for operation: ''Success'' or ''Declined''.'
      title: ResponseText
    type_:ConfigureApplePayOrganizationApiResponse:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        pageIdentifier:
          $ref: '#/components/schemas/type_:PageIdentifier'
        responseCode:
          $ref: '#/components/schemas/type_:Responsecode'
        responseData:
          $ref: '#/components/schemas/type_:ApplePayOrganizationUpdateData'
        responseText:
          $ref: '#/components/schemas/type_:ResponseText'
      required:
        - responseText
      title: ConfigureApplePayOrganizationApiResponse
    type_:Responsedata:
      type: object
      additionalProperties:
        description: Any type
      description: The object containing the response data.
      title: Responsedata
    type_:PayabliApiResponse:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        responseData:
          $ref: '#/components/schemas/type_:Responsedata'
        responseText:
          $ref: '#/components/schemas/type_:ResponseText'
      required:
        - responseText
      title: PayabliApiResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: requestToken

```

## SDK Code Examples

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

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.wallet.configureApplePayOrganization({
        cascade: true,
        isEnabled: true,
        orgId: 901,
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.wallet.configure_apple_pay_organization(
    cascade=True,
    is_enabled=True,
    org_id=901,
)

```

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

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.Wallet.ConfigureApplePayOrganizationAsync(
            new ConfigureOrganizationRequestApplePay {
                Cascade = true,
                IsEnabled = true,
                OrgId = 901L
            }
        );
    }

}

```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/Wallet/applepay/configure-organization"

	payload := strings.NewReader("{\n  \"cascade\": true,\n  \"isEnabled\": true,\n  \"orgId\": 901\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("requestToken", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Wallet/applepay/configure-organization")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"cascade\": true,\n  \"isEnabled\": true,\n  \"orgId\": 901\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-sandbox.payabli.com/api/Wallet/applepay/configure-organization")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"cascade\": true,\n  \"isEnabled\": true,\n  \"orgId\": 901\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.payabli.com/api/Wallet/applepay/configure-organization', [
  'body' => '{
  "cascade": true,
  "isEnabled": true,
  "orgId": 901
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```swift
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "cascade": true,
  "isEnabled": true,
  "orgId": 901
] 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-organization")! 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()
```