Palbase IAP · API
/iap/apple/xcode-certificateTake Xcode's StoreKit Testing purchases
Sets the certificate Xcode signs a developer's StoreKit Testing purchases with (Editor › Save Public Certificate): from then on, what the app reports signed with it — environment Xcode alone, for one of the environment's iOS apps — is taken as a test purchase, the sandbox's, gated by sandbox_access, with or without an In-App Purchase key connected; nothing of it is asked of Apple. It never speaks for the App Store's sandbox or production. Set it on a development environment: Studio and the CLI refuse to on production. Set again, it replaces the one before.
Called by your server, with the project's secret key.
Headers
Idempotency-Keystring · optionalMakes the write safe to send again (at most 255 characters). A retry with the same key and the same request gets the first answer back, marked `Idempotent-Replayed: true`, and changes nothing; the same key with a different request is refused with 422, and while the first request still runs a retry gets 409 with Retry-After. Answers are kept for 24 hours.Request body
certificatestring · requiredThe saved .cer: PEM, or the base64 of its DER. A P-256 certificate that signed itself, not expired.curl -X PUT "https://<your-ref>.palbase.studio/iap/apple/xcode-certificate" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"certificate":"string"}'Responses
200The certificate
400The request is malformed, or a field breaks a rule (the error names which)
401No key, not a key of this project, or a token that is not valid (the edge's answer)
403Not the project's secret key (`secret_key_required`)
409A request with this Idempotency-Key is still running (`idempotency_key_in_use`, Retry-After)
413The body is over 32 KiB
422Not a certificate Xcode signs with — a P-256 certificate that signed itself (`invalid_certificate`) — or an expired one (`certificate_expired`); or the Idempotency-Key was sent with a different request (`idempotency_key_reused`)
429Over the project's request limit; Retry-After says when to try again
503Temporarily unavailable; retrying is safe after Retry-After
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation SetXcodeCertificate of iap's contract.