---
title: "Save In-App Purchase Key"
method: PUT
path: "/v2/projects/{id}/applications/{application_id}/integrations/in-app-purchase/configuration"
tags: ["Projects V2"]
---

# Save In-App Purchase Key

`PUT /v2/projects/{id}/applications/{application_id}/integrations/in-app-purchase/configuration`

Validates an App Store Server / In-App Purchase key (Key ID, Issuer ID, .p8, bundle ID) against Apple and, when accepted, persists it to the application with the private key sealed at rest. A rejection is returned as `{ valid: false, error }`, not an HTTP error. Requires applications:write scope.

## Path parameters

- `id` string, required — Project ID
- `application_id` string, required — Application ID

## Request body

- object
  - `bundle_id` string, required — App bundle ID the key must have access to
  - `key_id` string, required — In-App Purchase Key ID (10-char alphanumeric)
  - `issuer_id` string, required — App Store Connect Issuer ID (UUID)
  - `private_key` string, required — Contents of the downloaded .p8 private key (PEM)

## Response `200`

Success

- object
  - `object` 'app_store_credentials_save_result', required
  - `valid` boolean, required
  - `error` string, nullable, required

## Other responses

- `400` — The request did not match the expected schema
- `401` — No API key was provided in the request
- `403` — The API key does not have permission to perform this action
- `404` — The requested resource was not found
- `429` — Too many requests have been made in a short period
- `500` — An unexpected error occurred on the server

---

[API](https://skmtc.dev/superwall/apis/superwall-api-v2.md) · [All operations](https://skmtc.dev/superwall/apis/superwall-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/superwall/superwall-api-v2/revisions/13937437c787/schema)
