Skip to main content

Update a Scheduled Payment

Use this endpoint to update an existing scheduled payment according to its unique GUID.

PUT
/users/{user_guid}/scheduled_payments/{scheduled_payment_guid}

Parameters

FieldRequiredType

amount

The amount of the scheduled_payment.

Optional
Decimal

description

A human-readable description of the scheduled_payment, for example, Power bill.

Optional
String

is_completed

This indicates whether the scheduled_payment has been paid or not.

Optional
Boolean

is_recurring

This indicates whether the scheduled_payment will be recurring.

Optional
Boolean

merchant_guid

The unique identifier for the merchant identified in the scheduled_payment.

Optional
Boolean

occurs_on

The date on which the payment is scheduled to occur.

Optional
Boolean

recurrence_day

Required when is_recurring is true. An error will be returned if is_recurring is not true. The day of recurrence. See Recurrence Types and Days for more info.

Optional
Boolean

recurrence_type

Required when is_recurring is true. An error will be returned if is_recurring is not true. The type of recurrence schedule. See Recurrence Types and Days for more info.

Optional
Boolean

transaction_type

The type of transaction. This will be either CREDIT or DEBIT.

Optional
Boolean

Request sample

Language:shell

_10
curl -L -X PUT 'https://int-api.mx.com/users/USR-11141024-90b3-1bce-cac9-c06ced52ab4c/scheduled_payments/SCP-54bed778-6600-4262-908c-8822f141cc30' \
_10
-u 'client_id:api_key' \
_10
-H 'Accept: application/vnd.mx.api.v1+json' \
_10
-H 'Content-Type: application/json' \
_10
-d '{
_10
"scheduled_payment": {
_10
"name": "Electric bill"
_10
}
_10
}'

Response sample

200
Language:json

_17
{
_17
"scheduled_payment": {
_17
"transaction_type": "CREDIT",
_17
"recurrence_type": null,
_17
"amount": 45.63,
_17
"created_at": "2021-05-20T19:27:36+00:00",
_17
"description": "Electric bill",
_17
"guid": "SCP-54bed778-6600-4262-908c-8822f141cc30",
_17
"is_completed": false,
_17
"is_recurring": null,
_17
"merchant_guid": "MCH-bbe0f849-fcd1-5d64-ad5d-1dbbea56b31c",
_17
"occurs_on": "2021-05-30",
_17
"recurrence_day": null,
_17
"updated_at": "2021-05-20T19:27:36+00:00",
_17
"user_guid": "USR-11a448aa-5e7b-70db-45d6-d6927092043e"
_17
}
_17
}