Skip to navigation

Make a payment method the default

Makes a method on file the one the company’s charges use. The body’s payment_method_id is the provider’s id of the method, the external_id the list returns; usePaymentMethods().setDefault calls this and reloads the list. A card saved during a checkout joins the methods on file and becomes the default the same way.

Authentication

X-Schematic-Api-Keystring

A temporary access token in the X-Schematic-Api-Key header. Your server mints it with POST /temporary-access-tokens on the secret-key API for a company, optionally for one of its users, and hands it to the page. The token fixes the company every request reads and writes.

Request

This endpoint expects an object.
payment_method_idstringRequired<=255 characters

Response

Created
dataobject
paramsobject
Input parameters

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error