# 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.1 info: title: Configure Apple Pay for an organization version: endpoint_wallet.ConfigureApplePayOrganization 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: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} 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' components: schemas: type_:Cascade: type: boolean type_:IsEnabled: type: boolean type_:OrganizationId: type: integer format: int64 type_:IsSuccess: type: boolean type_:PageIdentifier: type: string type_:Responsecode: type: integer type_:CreatedAt: type: string format: date-time type_:ApplePayId: type: string type_:JobId: type: string type_:JobStatus: type: string type_:ApplePayType: type: string type_:LastModified: type: string format: date-time type_:WalletCascade: type: boolean type_:WalletIsEnabled: type: boolean type_:OrganizationUpdates: type: object properties: cascade: $ref: '#/components/schemas/type_:WalletCascade' isEnabled: $ref: '#/components/schemas/type_:WalletIsEnabled' 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' type_:ResponseText: type: string 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 ``` ## SDK Code Examples ```python from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.wallet.configure_apple_pay_organization( cascade=True, is_enabled=True, org_id=901, ) ``` ```typescript import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.wallet.configureApplePayOrganization({ cascade: true, isEnabled: true, orgId: 901 }); ``` ```go import ( context "context" option "github.com/payabli/sdk-go/option" sdkgo "github.com/payabli/sdk-go" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.Wallet.ConfigureApplePayOrganization( context.TODO(), &sdkgo.ConfigureOrganizationRequestApplePay{ Cascade: sdkgo.Bool( true, ), IsEnabled: sdkgo.Bool( true, ), OrgId: sdkgo.Int64( 901, ), }, ) ``` ```csharp using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Wallet.ConfigureApplePayOrganizationAsync( new ConfigureOrganizationRequestApplePay { Cascade = true, IsEnabled = true, OrgId = 901, } ); ``` ```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"] = '' 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 HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/Wallet/applepay/configure-organization") .header("requestToken", "") .header("Content-Type", "application/json") .body("{\n \"cascade\": true,\n \"isEnabled\": true,\n \"orgId\": 901\n}") .asString(); ``` ```php 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' => '', ], ]); echo $response->getBody(); ``` ```swift import Foundation let headers = [ "requestToken": "", "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() ```