Skip to content

PaymentSource.add

POST /{namespace}/payment-sources/add

Add saves a new Payment Source for a Customer through Stripe’s embedded form on the Startup’s Domain, and can make it the default.

Mode
do
Event
PaymentSource.added

Inputs

InputTypeRequiredDescription
customerCustomerrequiredThe Customer who saves it.
kindstringrequiredHow it pays; the form offers only the kinds the Customer’s Market accepts.
defaultbooleanTrue to charge it for every new Invoice and renewal.

Outputs

OutputTypeRequiredDescription
paymentSourcePayment SourcerequiredThe saved Payment Source; Stripe holds its details.

Effects

  • Emits PaymentSource.added.
  • Performed by the Billing Specialist.
  • Two-way: it runs at once, in the try, send and do modes.
  • Collects the details in Stripe’s embedded form, so the Startup never holds a card or account number.
  • As the new default, charges each open charge Invoice that failed at once, ahead of the next dunning retry.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.PaymentSource.add

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled.