Skip to Content
Docs
API referenceManagement API

Billing payment methods

POST
/billing/customers/{customer_id}/payment-method-session

billing.payment.v1.PaymentMethodService/CreatePaymentMethodSession (32-billing-overview.md, API Surface, Customers; 38-payments-and-tax.md, API Surface, Payment methods).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

customer_id*string

id

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

A PaymentMethodSession object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X POST 'https://api.us.pontive.com/v1/billing/customers/string/payment-method-session'
Example Response
{  "id": "string",  "object": "string"}
GET
/billing/customers/{customer_id}/payment-methods

billing.payment.v1.PaymentMethodService/ListPaymentMethods (38-payments-and-tax.md, API Surface, Payment methods).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

customer_id*string

id

Query Parameters

page?integer

Page number, from 1

limit?integer

Items per page, 1 to 100, default 25

Response Body

A list of PaymentMethod objects with pagination

application/json
  1. response
data?array<>
object?string
pagination?

Pagination is the page answered (api-route-review D9).

Example Request
curl -X GET 'https://api.us.pontive.com/v1/billing/customers/string/payment-methods'
Example Response
{  "data": [    {      "id": "string",      "object": "string"    }  ],  "object": "string",  "pagination": {    "limit": 0,    "page": 0,    "total": 0,    "total_pages": 0  }}
DELETE
/billing/customers/{customer_id}/payment-methods/{payment_method_id}

billing.payment.v1.PaymentMethodService/DetachPaymentMethod (38-payments-and-tax.md, API Surface, Payment methods). A warning payment_method_required comes back when it was the last reusable method (38-payments-and-tax.md, Payment methods, Removal).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

customer_id*string

id

payment_method_id*string

payment_method_id, the spec's {pm}

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

The detached PaymentMethod object, with warnings

application/json
  1. response
Example Request
curl -X DELETE 'https://api.us.pontive.com/v1/billing/customers/string/payment-methods/string'
Example Response
{}