Purchase Keys
The keys your own server signs purchase reports with, for payments outside the App Store: the Report URL to copy, every key with when it was made and last used, and making or revoking one.
Purchase Keys lists the keys your app’s own server uses to report purchases to AirPayment, for payments the App Store doesn’t see, such as WeChat Pay or Stripe. It shows the Report URL your server sends reports to and every key, revoked ones included, and it’s where you make a new key or revoke one. Anyone in the Team can make and revoke keys.
A key’s secret shows only once, when it’s made, on Save Your New Key. This page never shows it.
Open it
On the AirPayment tab, tap Purchase Keys: at the foot of the tab, or under AirPayment’s page while it’s waiting for the first purchase. The row shows “n active” or “None active”.
On iPhone it opens as the next page; Back returns to the tab. On iPad beside the chat, it opens as a sheet; Done at the top right closes it.
New Key (with a +) sits in the bar at the bottom.
What’s on it
| Item | What it shows or does |
|---|---|
| Report URL | The address your server sends each purchase report to. Select it, or tap the copy button beside it. A long address is shortened in the middle; the copy button copies it whole. Under it: “Your server signs each purchase it reports with one of these keys, for payments outside the App Store such as WeChat Pay or Stripe.” |
| Keys | Every key, newest first, revoked ones included. |
| New Key | Opens New Purchase Key. With the +, at the bottom on iPhone and iPad; a button at the bottom left on the Mac. Dimmed until the keys have loaded. |
While the page loads, the Report URL shows as a placeholder with no copy button, and two placeholder rows show under Keys.
A key row
| Part | What it shows |
|---|---|
| Name | The name you gave the key. |
| Line under the name | When it was made and its state, side by side with a space between them, for example “Created 3 days ago” and “Last used 2 hours ago”. A key never used says Never used; a revoked one says when, for example “Revoked yesterday”. A narrow row keeps only the state. |
| Revoked | At the right, on a revoked key. |
Swipe a key left (iPhone and iPad), or touch and hold it (on the Mac, right-click), for:
| Item | What it does | When it shows |
|---|---|---|
| Copy Key ID | Copies the key’s ID. | In the menu, always |
| Revoke | Asks first. See Revoke a key. | Keys not yet revoked |
Make a key
- Tap New Key.
- Type a Key Name and tap Create. See New Purchase Key.
- Copy the secret from Save Your New Key to your server, then tap Done.
Revoke a key
- Swipe the key left, or touch and hold it (on the Mac, right-click), and choose Revoke.
- The app asks Revoke “name”?: “Purchases reported with this key stop at once. Create its replacement first. This can’t be undone.” Tap Revoke Key.
The key stays in the list, marked Revoked. Reports signed with it stop being accepted at once, so make its replacement and put it on your server first.
Messages
| Message | What it means | What to do |
|---|---|---|
| “No keys yet. Create one for a server hosted elsewhere.” | The app has no purchase keys. | Tap New Key if your server takes payments. |
| A reason with Try Again, under Keys | The keys couldn’t be read. | Tap Try Again. |
| A reason at the top of the page | Revoking a key failed. The key still works. | Try again. The reason goes away when you leave the page. |
Ask an Agent in the Project’s chat to set up the server side: it sends each purchase to the Report URL, signed with the key.