Skip to content

Create payment method specification.

POST
/api/web/namespaces/{namespace}/billing/payment_methods
curl --request POST \
--url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/web/namespaces/example/billing/payment_methods \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "contact": { "address1": "example", "address2": "example", "city": "example", "contact_type": "MAILING", "country": "example", "county": "example", "phone_number": "example", "state": "example", "state_code": "example", "zip_code": "example" }, "namespace": "example", "role": "PAYMENT_METHOD_ROLE_UNKNOWN", "token": "example" }'

Creates a new payment method with a specific role.

Examples of this operation.

namespace
required
string

Namespace This namespace specifies the namespace in which the payment method will be created. If not provided, the default ‘system’ namespace will be used.

Media typeapplication/json
CreateRequest is used to create an instance of payment_method

This is the input message of the ‘Create’ RPC.

object
contact
object
address1
address1

Network address or location

string
<= 1024 characters
address2
address2

Network address or location

string
<= 1024 characters
city
city

Configuration parameter for city

string
<= 1024 characters
contact_type
string
default: MAILING
Allowed values: MAILING BILLING PAYMENT
country
country

Configuration parameter for country

string
<= 1024 characters
county
county

Configuration parameter for county

string
<= 1024 characters
phone_number
phone_number

Configuration parameter for phone number

string
<= 1024 characters
state
state

Current state of the resource

string
<= 1024 characters
state_code
state code

Configuration parameter for state code

string
<= 1024 characters
zip_code
zip_code

IP address configuration

string
<= 1024 characters
namespace
Namespace

This namespace specifies the namespace in which the payment method will be created. If not provided, the default ‘system’ namespace will be used.

string
>= 6 characters <= 1024 characters
role
string
default: PAYMENT_METHOD_ROLE_UNKNOWN
Allowed values: PAYMENT_METHOD_ROLE_UNKNOWN PAYMENT_METHOD_ROLE_PRIMARY PAYMENT_METHOD_ROLE_SECONDARY PAYMENT_METHOD_ROLE_NORMAL
token
Token

Token associated with this payment method. This token needs to be obtained from a designated payment method provider e.g. Stripe.

string
<= 1024 characters

A successful response.

Media typeapplication/json
object
name
Name

Name of the newly created payment method object.

string
>= 6 characters <= 1024 characters
Examplegenerated
{
"name": "example"
}

Returned when operation is not authorized.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when there is no permission to access resource.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when resource is not found.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation on resource is conflicting with current value.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation has been rejected as it is happening too frequently.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server encountered an error in processing API.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when service is unavailable temporarily.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server timed out processing request.

Media typeapplication/json
string format: string
Examplegenerated
example