Skip to main content
PATCH
/
api
/
v2
/
platform
/
payment_methods
/
{id}
Update a Payment Method
curl --request PATCH \
  --url http://{defaultHost}/api/v2/platform/payment_methods/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "payment_method": {
    "name": "Test Payment Method",
    "active": true,
    "auto_capture": true,
    "description": "This is a test payment method",
    "type": "Spree::Gateway::Bogus",
    "display_on": "both",
    "store_ids": [
      "2"
    ],
    "public_metadata": {},
    "private_metadata": {}
  }
}
'
{
  "data": {
    "id": "<string>",
    "type": "<string>",
    "attributes": {},
    "relationships": {}
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Query Parameters

include
string

Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes

Body

application/json
payment_method
object
required

Response

Record updated

data
object
required