Skip to content

Connect a payment account

POST
/payments/account
curl --request POST \
--url https://example.com/payments/account \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token>

Creates an account with the selected provider and returns where to finish setup. Call it again for a fresh link whenever setup was left half done.

provider
string

The account, with somewhere to go next

Media typeapplication/json
object
status
required
string
Allowed values: none pending ready
provider
required
object
id
required
string
name
required
string
manageUrl
required
string | null format: uri
capabilities
required
Array<string>
Allowed values: account_onboarding connect_existing payment_links payment_link_cancellation hosted_checkout account_summary card_present
chargesEnabled
required
boolean
detailsSubmitted
required
boolean
onboardingUrl
required
string | null format: uri
existingAccountAvailable
boolean

Example

{
"status": "none",
"provider": {
"capabilities": [
"account_onboarding"
]
}
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not a member, or without the permission this needs

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

A different provider is already connected

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Payments are not configured on this installation

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}