---
title: "Link Stripe Customer"
method: POST
path: "/v2/applications/{application_id}/stripe_customer_links"
tags: ["Stripe Customer Links V2"]
---

# Link Stripe Customer

`POST /v2/applications/{application_id}/stripe_customer_links`

## Request

- Base URL: `https://api.superwall.com`
- URL: `https://api.superwall.com/v2/applications/{application_id}/stripe_customer_links`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `accounts_superwall_token`
  - HTTP bearer

Gives an app user access to a Stripe customer's outside purchases, for purchases that carry no user ID field. The Stripe app must track outside purchases for its Stripe account in that environment.

A Stripe customer has one linked app user. Linking a different user moves the customer's purchases to them; a subscription the customer starts later links its own user ID field instead. Webhooks and revenue events for the customer can carry the previous user for up to a minute.

Requires customers:write scope.

## Path parameters

- `application_id` string, required

## Request body

- object
  - `stripe_customer_id` string, required: Stripe customer ID, e.g. `cus_NffrFeUfNV2Hib`
  - `app_user_id` string, required: App user who owns the customer's purchases
  - `environment` 'live' | 'test', required: Stripe mode the customer belongs to

## Response `200`

Success

- object
  - `object` 'stripe_customer_link', required
  - `application_id` string, required
  - `stripe_customer_id` string, required
  - `environment` 'live' | 'test', required: Stripe mode the customer belongs to
  - `app_user_id` string, required: App user linked after the request; a newer purchase can keep its own user

## Other responses

- `400`: The request did not match the expected schema | The request was invalid or malformed
- `401`: No API key was provided in the request | The API key does not have a valid format | The API key is invalid or has been revoked | An error occurred while validating the API key | The session cookie is invalid or expired
- `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
- `502`: The upstream subscriptions service request failed

## Changes

- **2026-10-30** `73e2b4f97bc7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/superwall/apis/superwall-api-v2/changes/v2/applications/:application_id/stripe_customer_links/post.md)

---

[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.dev/superwall/apis/superwall-api-v2/revisions/523b4734dfab?raw)
