Reference
Stripe (API Key)
Connect Stripe to Alter Vault using an API key for secure API access
Overview
Section titled “Overview”Use Stripe credentials to make authenticated API calls through Alter Vault without exposing API keys in code.
| Property | Value |
|---|---|
| Provider ID | stripe |
| Category | Payments |
| Credential Type | Bearer Token |
Step 1: Get Credentials
Section titled “Step 1: Get Credentials”Log in to the Stripe Dashboard
Log in to the Stripe Dashboard at dashboard.stripe.com.
Open the API keys page
From the Developers menu open Workbench and click Manage on the API keys widget, or go directly to dashboard.stripe.com/apikeys.
Create a restricted key
Under Restricted keys, click Create restricted key, name it, and grant the resources the integration needs plus Read on Balance. Stripe recommends restricted keys over secret keys, especially for a key handed to an agent. Alternatively, under Standard keys reveal and copy the existing secret key, or click Create secret key where the page offers it.
Copy the key
Copy the key. A key you create in live mode is shown once; sandbox keys and Stripe’s default secret key can be revealed again. Restricted keys start with rk_, secret keys with sk_.
Step 2: Add to Alter Vault
Section titled “Step 2: Add to Alter Vault”Open the Developer Portal
Go to portal.alterauth.com and navigate to the application.
Add Stripe
Go to Managed Secrets > Add Provider > Stripe.
Enter credentials
Paste the API key into the credential field.
Save
Click Save. You’ll receive a grant_id to use with the SDK.
Using in Code
Section titled “Using in Code”response = await alter_app.request( HttpMethod.GET, "https://api.stripe.com/v1/charges", grant_id="YOUR_GRANT_ID",)- Sandbox keys start with
rk_test_orsk_test_; live keys withrk_live_orsk_live_. - The save-time check reads the account balance. A restricted key without Read on Balance is still saved, but the portal reports that Stripe could not confirm the credential (Stripe answers HTTP 403, which the check treats as inconclusive); grant the permission or verify the key with a test request.
Policy-cataloged operations
Section titled “Policy-cataloged operations”Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.
| Operation ID | Families | Method | Provider path |
|---|---|---|---|
PostInvoicesInvoiceSend | payment, send | POST | /v1/invoices/{invoice}/send |
DeleteCouponsCoupon | delete, payment | DELETE | /v1/coupons/{coupon} |
DeleteInvoiceitemsInvoiceitem | delete, payment | DELETE | /v1/invoiceitems/{invoiceitem} |
DeleteInvoicesInvoice | delete, payment | DELETE | /v1/invoices/{invoice} |
PostApplicationFeesFeeRefundsId | payment | POST | /v1/application_fees/{fee}/refunds/{id} |
PostApplicationFeesIdRefund | payment | POST | /v1/application_fees/{id}/refund |
PostApplicationFeesIdRefunds | payment | POST | /v1/application_fees/{id}/refunds |
PostChargesCharge | payment | POST | /v1/charges/{charge} |
PostChargesChargeCapture | payment | POST | /v1/charges/{charge}/capture |
PostChargesChargeDispute | payment | POST | /v1/charges/{charge}/dispute |
PostChargesChargeDisputeClose | delete, payment | POST | /v1/charges/{charge}/dispute/close |
DeleteAccountsAccount | delete | DELETE | /v1/accounts/{account} |
DeleteAccountsAccountBankAccountsId | delete | DELETE | /v1/accounts/{account}/bank_accounts/{id} |
DeleteAccountsAccountExternalAccountsId | delete | DELETE | /v1/accounts/{account}/external_accounts/{id} |
DeleteAccountsAccountPeoplePerson | delete | DELETE | /v1/accounts/{account}/people/{person} |
DeleteAccountsAccountPersonsPerson | delete | DELETE | /v1/accounts/{account}/persons/{person} |
DeleteApplePayDomainsDomain | delete | DELETE | /v1/apple_pay/domains/{domain} |
DeleteCustomersCustomer | delete | DELETE | /v1/customers/{customer} |
DeleteCustomersCustomerBankAccountsId | delete | DELETE | /v1/customers/{customer}/bank_accounts/{id} |
DeleteCustomersCustomerCardsId | delete | DELETE | /v1/customers/{customer}/cards/{id} |
DeleteCustomersCustomerDiscount | delete | DELETE | /v1/customers/{customer}/discount |
PostAccounts | admin, write | POST | /v1/accounts |
PostCustomersCustomerCashBalance | admin, write | POST | /v1/customers/{customer}/cash_balance |
PostEphemeralKeys | admin, write | POST | /v1/ephemeral_keys |
PostTerminalConnectionTokens | admin, write | POST | /v1/terminal/connection_tokens |
PostTestHelpersConfirmationTokens | admin, write | POST | /v1/test_helpers/confirmation_tokens |
PostAccountsAccountBankAccounts | write | POST | /v1/accounts/{account}/bank_accounts |
PostAccountsAccountExternalAccounts | write | POST | /v1/accounts/{account}/external_accounts |
PostAccountsAccountLoginLinks | write | POST | /v1/accounts/{account}/login_links |
PostAccountsAccountPeople | write | POST | /v1/accounts/{account}/people |
PostAccountsAccountPersons | write | POST | /v1/accounts/{account}/persons |
PostCustomersCustomer | write | POST | /v1/customers/{customer} |
PostCustomersCustomerBalanceTransactions | write | POST | /v1/customers/{customer}/balance_transactions |
PostCustomersCustomerBalanceTransactionsTransaction | write | POST | /v1/customers/{customer}/balance_transactions/{transaction} |
GetApplicationFeesFeeRefundsId | read | GET | /v1/application_fees/{fee}/refunds/{id} |
GetApplicationFeesIdRefunds | read | GET | /v1/application_fees/{id}/refunds |
GetChargesCharge | read | GET | /v1/charges/{charge} |
GetChargesChargeDispute | read | GET | /v1/charges/{charge}/dispute |
GetChargesChargeRefunds | read | GET | /v1/charges/{charge}/refunds |
GetChargesChargeRefundsRefund | read | GET | /v1/charges/{charge}/refunds/{refund} |