Start a Stripe-hosted page for adding a payment method
POST
/api/portal/payment-methods/setup-session
const url = 'https://api.getvespy.com/api/portal/payment-methods/setup-session';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.getvespy.com/api/portal/payment-methods/setup-session \ --header 'Authorization: Bearer <token>'Returns the URL of a Stripe-hosted page where the tenant adds a card or bank account. Stripe runs the bank login, ACH mandate and confirmation there, then returns to /tenant/payments?setup_session={id}. Save the method by sending that id as checkoutSessionId to POST /api/portal/payment-methods.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
url
required
string format: uri
Examplegenerated
{ "url": "https://example.com"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}