Add or update payment method
POST
/billing/v1/payment-methodsAttach a payment method to the organization
Authorization
Bearer Authorization<token>
In: header
Request Body
requiredapplication/json{
"$ref": "#/components/schemas/internal_billing.upsertPaymentMethodBody",
"$ref-value": {
"properties": {
"payment_method_id": {
"type": "string"
},
"set_as_default": {
"type": "boolean"
}
},
"type": "object"
}
}Response Body
200application/json
OK
type: unknown
{
"$ref": "#/components/schemas/billingv1.PaymentMethodDetails",
"$ref-value": {
"properties": {
"brand": {
"type": "string"
},
"exp_month": {
"type": "integer"
},
"exp_year": {
"type": "integer"
},
"id": {
"type": "string"
},
"is_default": {
"type": "boolean"
},
"last4": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}curl -X POST "https://api.rixl.com/billing/v1/payment-methods" \
-H "Content-Type: application/json" \
-d '{}'OK
application/json
{
"$ref": "#/components/schemas/billingv1.PaymentMethodDetails",
"$ref-value": {
"properties": {
"brand": {
"type": "string"
},
"exp_month": {
"type": "integer"
},
"exp_year": {
"type": "integer"
},
"id": {
"type": "string"
},
"is_default": {
"type": "boolean"
},
"last4": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}