Skip to main content
POST
Create payment method
Creates a payment method of the given type.
  • Keys in settings depend on type, see the table in the settings field. Unknown keys are dropped and text values are trimmed.
  • name must be unique within the account, case-insensitive.
  • Only one telegramstars method is allowed per account: a second one returns 409.
  • For manually, requisites need both name and value, and the resulting bot message must fit into 4000 characters.
  • attach_to_all_offers adds the method to every offer whose currency and minimum amount it supports.
For stripe, a webhook is registered in Stripe with the given secret_key before saving. If Stripe rejects the key, nothing is saved and 422 is returned with the error under settings.secret_key.
When creating a Stripe payment method or changing its secret_key, the trimmed key must start with sk_ or rk_, contain a non-empty value after that prefix, and contain no whitespace. There is no fixed-length check. Malformed keys return 422 under settings.secret_key before contacting Stripe. Stripe still verifies the key and its permissions when registering the webhook. An unchanged stored key is not revalidated. For stripe, settings.automatic_tax and settings.collect_billing_address are independent optional booleans, both disabled by default. Tax is added on top of the price. Existing subscriptions keep their original terms. The address is available in order details and order exports, not in the subscriber profile. Configure Stripe Tax and tax registrations in Stripe before enabling automatic tax. Updating these options does not recreate the Stripe webhook; omitted keys keep their stored values. The response includes both Stripe flags in settings as booleans. Omitted stored values are returned as false.

Authorizations

Authorization
string
header
required

API token from the Zenedu dashboard

Body

application/json
name
string
required

Internal name, unique within the account (case-insensitive)

Maximum string length: 255
type
string
required

Payment method type, see List payment method types

public_name
string | null

Name shown to subscribers; empty or null shows the type name

Maximum string length: 255
settings
object

Settings for the payment method type. Allowed keys depend on type — see List payment method types. Unknown keys are dropped, text values are trimmed, and every credential key of the type is required.

For manually, every text key except manualIcon and manualTextIntroShop is required, and manualTextRequisites must contain at least one row with both name and value filled. The resulting bot message must fit into 4000 characters.

attach_to_all_offers
boolean
default:false

Attach the new method to every offer whose currency and minimum amount it supports

Response

Payment method created

data
object