POST
/
attach
import { Autumn as autumn } from 'autumn-js'

const response = await autumn.attach({
  customer_id: 'user_123',
  product_id: 'pro'
})
{
  "checkout_url": "https://checkout.stripe.com/c/pay/<hash>"
}

If the customer_id you send doesn’t already exist, Autumn will automatically create a new customer. You can optionally set the properties of this new customer through the customer_data field.

Authorizations

Authorization
string
header
required

Use your Autumn Secret Key as the Bearer token.

Body

application/json

The body is of type object.

Response

200 - application/json

Device attached

The response is of type object.