Update a payment method
How to update an existing payment method via API
To update an existing payment method, send a PATCH
request to the /api/payment_methods/:id
endpoint, where id
is the ID of the resource that you want to update.
Here below the list of all the possible arguments that you can pass with the request body.
Request
PATCH https://yourdomain.commercelayer.io/api/payment_methods/:id
Arguments
Body Parameter | Type | Required |
---|---|---|
type |
| Required |
id |
| Required |
attributes.name |
| Optional |
attributes.payment_source_type |
| Optional |
attributes.currency_code |
| Optional |
attributes.moto |
| Optional |
attributes.require_capture |
| Optional |
attributes.auto_place |
| Optional |
attributes.auto_capture |
| Optional |
attributes.price_amount_cents |
| Optional |
attributes.auto_capture_max_amount_cents |
| Optional |
attributes._disable |
| Optional |
attributes._enable |
| Optional |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.metadata |
| Optional |
relationships.market |
| Optional |
relationships.payment_gateway |
| Optional |
Example
The following request updates the payment method identified by the ID "xYZkjABcde":
Last updated