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": {}
}
}Updates 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": {}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes
Show child attributes
"Test Payment Method"
"This is a test payment method"
Spree::Gateway::Bogus, Spree::PaymentMethod::Check "Spree::Gateway::Bogus"
both, back_end, front_end "both"
Was this page helpful?