Back to top

PaymentMethods

Payment Method Management

Retrieve all payment methods of an organization
GET
/organization/{id}/payment-methods

Returns all payment methods of an organization.

  • Parameters
  • id
    string  (required) in path

    Organization UUID

    include
    string in query

    related attributes to include

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide
  • Response  200   ok
  • {
    	"payment_methods": [
    		{
    			"id": "string",
    			"name": "string",
    			"type": "string",
    			"default": "boolean",
    			"created_at": "string",
    			"updated_at": "string",
    			"card_type": "string",
    			"expiration_month": "string",
    			"expiration_year": "string",
    			"cardholder_name": "string",
    			"billing_address": {
    				"street_address": "string",
    				"postal_code": "string",
    				"country_code_alpha2": "string"
    			},
    			"email": "string",
    			"created_by_user": {
    				"href": "string"
    			},
    			"organization": {
    				"href": "string"
    			},
    			"projects": [
    				{
    					"href": "string"
    				}
    			]
    		}
    	]
    } 
  • Response  401   unauthorized
  • Response  404   not found
Create a payment method
/organization/{id}/payment-methods

Creates a payment method.

  • Parameters
  • id
    string  (required) in path

    Organization UUID

    payment_method
     (required) in body

    Payment Method to create

    {
    	"name": "string",
    	"nonce": "string",
    	"default": "boolean"
    } 
  • Response  201   created
  • {
    	"id": "string",
    	"name": "string",
    	"type": "string",
    	"default": "boolean",
    	"created_at": "string",
    	"updated_at": "string",
    	"card_type": "string",
    	"expiration_month": "string",
    	"expiration_year": "string",
    	"cardholder_name": "string",
    	"billing_address": {
    		"street_address": "string",
    		"postal_code": "string",
    		"country_code_alpha2": "string"
    	},
    	"email": "string",
    	"created_by_user": {
    		"href": "string"
    	},
    	"organization": {
    		"href": "string"
    	},
    	"projects": [
    		{
    			"href": "string"
    		}
    	]
    } 
  • Response  401   unauthorized
  • Response  404   not found
  • Response  422   unprocessable entity
Retrieve a payment method
GET
/payment-methods/{id}

Returns a payment method

  • Parameters
  • id
    string  (required) in path

    Payment Method UUID

    include
    string in query

    related attributes to include

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide
  • Response  200   ok
  • {
    	"id": "string",
    	"name": "string",
    	"type": "string",
    	"default": "boolean",
    	"created_at": "string",
    	"updated_at": "string",
    	"card_type": "string",
    	"expiration_month": "string",
    	"expiration_year": "string",
    	"cardholder_name": "string",
    	"billing_address": {
    		"street_address": "string",
    		"postal_code": "string",
    		"country_code_alpha2": "string"
    	},
    	"email": "string",
    	"created_by_user": {
    		"href": "string"
    	},
    	"organization": {
    		"href": "string"
    	},
    	"projects": [
    		{
    			"href": "string"
    		}
    	]
    } 
  • Response  401   unauthorized
  • Response  404   not found
Update the payment method
PUT
/payment-methods/{id}

Updates the payment method.

  • Parameters
  • id
    string  (required) in path

    Payment Method UUID

    payment_method
     (required) in body

    Payment Method to update

    {
    	"name": "string",
    	"default": "boolean",
    	"cardholder_name": "string",
    	"expiration_month": "string",
    	"expiration_year": "integer",
    	"billing_address": "object"
    } 
  • Response  200   ok
  • {
    	"id": "string",
    	"name": "string",
    	"type": "string",
    	"default": "boolean",
    	"created_at": "string",
    	"updated_at": "string",
    	"card_type": "string",
    	"expiration_month": "string",
    	"expiration_year": "string",
    	"cardholder_name": "string",
    	"billing_address": {
    		"street_address": "string",
    		"postal_code": "string",
    		"country_code_alpha2": "string"
    	},
    	"email": "string",
    	"created_by_user": {
    		"href": "string"
    	},
    	"organization": {
    		"href": "string"
    	},
    	"projects": [
    		{
    			"href": "string"
    		}
    	]
    } 
  • Response  401   unauthorized
  • Response  404   not found
  • Response  422   unprocessable entity
Delete the payment method
/payment-methods/{id}

Deletes the payment method.

  • Parameters
  • id
    string  (required) in path

    Payment Method UUID

  • Response  204   no content
  • Response  401   unauthorized
  • Response  404   not found