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.

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