Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/schemas/billing/invoices/PaymentResult.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ properties:
description: The status of a payment.
enum:
- success
- awaiting-direct-payment
- processing
- cancelled
- error
Expand Down
27 changes: 27 additions & 0 deletions components/schemas/billing/methods/sources/DirectPayment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
title: DirectPayment
description: A payment method that must be enabled by Cycle staff, solely for telling us they're going to send us checks, wires, ach, outside of Cycle.
type: object
required:
- type
- details
properties:
type:
type: string
enum:
- direct-payment
details:
type: object
required:
- preference
- instructions
properties:
preference:
type: string
description: The preference for how the payment will be sent.
enum:
- check
- wire
- ach
instructions:
type: string
description: Any additional instructions for an organization's billing dept., etc. that should be known about this payment method.
2 changes: 2 additions & 0 deletions components/schemas/billing/methods/sources/MethodSource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ discriminator:
mapping:
stripe-credit-card: ./StripeCreditCard.yml
stripe-us-bank-acct: ./StripeUsBankAcct.yml
direct-payment: ./DirectPayment.yml
oneOf:
- $ref: ./StripeCreditCard.yml
- $ref: ./StripeUsBankAcct.yml
- $ref: DirectPayment.yml
3 changes: 3 additions & 0 deletions components/schemas/hubs/HubBillingProfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ properties:
allow_prepaid:
type: boolean
description: A boolean where true represents this account being approved to use a prepaid card for billing transactions.
allow_direct_payments:
type: boolean
description: When true, this hub is allowed to create 'direct' payment methods.
pause_invoices:
type: boolean
description: A boolean where true represents invoices have been paused on this hub for one reason or another.
Expand Down
19 changes: 19 additions & 0 deletions platform/paths/billing/methods/methods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,25 @@ post:
type: string
description: The number of the bank account.
- type: "null"
direct_payment:
oneOf:
- type: object
description: Only available for hubs that have direct billing enabled. Contact Cycle staff at support@cycle.io for any questions.
required:
- preference
- instructions
properties:
preference:
type: string
description: The preference for how the payment will be sent.
enum:
- check
- wire
- ach
instructions:
type: string
description: Any additional instructions for an organization's billing dept., etc. that should be known about this payment method.
- type: "null"
responses:
201:
description: Returns a billing method.
Expand Down