v1

latestOpenAPI 3.0.02026-07-24161215397.4 KB
Payment Details

Register pre-created Stripe payment details

Registers pre-created Stripe customer and payment method details.

Required scopes: flex.billing.paymentDetails.create

post/api/v2/organizations/{orgSlug}/payment-details/register

Path parameters

orgSlugstring required

organization slug

Request body

type'stripe' required

The payment provider type. Currently only Stripe is supported.

method'card' | 'ach' required

The payment method type. Used to calculate any method-specific processing fees in the summary.

paymentCustomerstring required

Stripe customer id.

paymentSourcestring required

Stripe payment method id.

isPersonalboolean required

Determines whether the card is recorded for the member themselves or for their company.

memberstring

The member for which the payment details are recorded.

companystring

The company for which the payment details are recorded.

locationsstring

OfficeRnD location ids for multi-location billing.

Example request

{
  "paymentCustomer": "cus_12EXMPLE34",
  "paymentSource": "pm_12EXMPLE34",
  "isPersonal": true,
  "member": "603dfbc260f4054084125d38",
  "company": "603dfbc260f4054084125d39",
  "authorization": {
    "authProvider": "seti_1NIX7tEk95fg2DONRZsfd8zM",
    "status": "not_required"
  },
  "details": {
    "id": "pm_1NISlsEk95fg2DONATjFxjZ1",
    "last4": "4242",
    "brand": "Visa",
    "expirationMonth": 12,
    "expirationYear": 2030,
    "name": "John Doe",
    "funding": "credit",
    "country": "US",
    "cvcCheck": "pass"
  }
}

Response

_idstring

The _id of the payment details.

type'stripe'

The payment provider type. Currently only Stripe is supported.

method'card' | 'ach'

The payment method type. Used to calculate any method-specific processing fees in the summary.

paymentCustomerstring

The _id of the card in Stripe. Same as the _id in the "card" object.

paymentSourcestring

The _id of the card in Stripe. Same as the _id in the "card" object.

locationsstring

An array containing the list of locations for which the payment details are valid.

createdAtstring date-time

The time when the payment details were created

createdBystring

The _id user that created the payment details

Example response

{
  "_id": "603dfbc260f4054084125d34",
  "details": {
    "id": "card_1NISlsEk95fg2DONATjFxjZ1",
    "name": "Test Member",
    "brand": "Visa",
    "funding": "credit",
    "expirationMonth": 2,
    "expirationYear": 2042,
    "country": "US",
    "cvcCheck": "pass",
    "last4": "4242"
  },
  "authorization": {
    "authProvider": "seti_1NIX7tEk95fg2DONRZsfd8zM",
    "status": "not_required"
  },
  "paymentCustomer": "cus_12EXMPLE34",
  "paymentSource": "card_12EXMPLE34",
  "createdAt": "2021-04-21T18:00:00.000Z",
  "createdBy": "603dfbc260f4054084125d30"
}