Stripe Customer Links V2

Link Stripe Customer

Changed on

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.

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
    • HTTP bearer
    • or API key in cookie accounts_superwall_token
    • or HTTP bearer

Path parameters

application_idstring required

Request body

stripe_customer_idstring required

Stripe customer ID, e.g. cus_NffrFeUfNV2Hib

app_user_idstring required

App user who owns the customer's purchases

environment'live' | 'test' required

Stripe mode the customer belongs to

Response

Success

object'stripe_customer_link' required
application_idstring required
stripe_customer_idstring required
environment'live' | 'test' required

Stripe mode the customer belongs to

app_user_idstring required

App user linked after the request; a newer purchase can keep its own user

Changes