Create a schedule

Create a schedule on the specified account.

To use this endpoint from the browser, you’ll need to specify the /accounts/{your-account-id}/transfers.write scope when generating a token.

POST
/accounts/{accountID}/schedules
cURL Go
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
curl X -POST "https://api.moov.io/accounts/{accountID}/schedules" \
  -H "Authorization: Bearer {token}" \
  --data-raw '{
    "description":"string",
    "recur": {
      "start": "2024-08-24T14:15:22Z",
      "recurrenceRule": "FREQ=DAILY;COUNT=5",
      "runTransfer": {
        "description": "string",
        "amount": {
          "currency": "USD",
          "value": 1204
        },
        "partnerAccountID": "UUID",
        "source": {
          "paymentMethodID": "UUID",
          "achDetails": {
            "companyEntryDescription": "Gym Dues",
            "originatingCompanyName": "Whole Body Fit"
          },
          "cardDetails": {
            "dynamicDescriptor": "WhlBdy *Yoga 11-12"
          }
        },
        "destination": {
          "paymentMethodID": "UUID",
          "achDetails": {
            "companyEntryDescription": "Gym Dues",
            "originatingCompanyName": "Whole Body Fit"
          },
          "cardDetails": {
            "dynamicDescriptor": "WhlBdy *Yoga 11-12"
          }
        }
      }
    },
    "occurrences": [
      {
        "occurrenceID": "UUID",
        "runTransfer": {
          "description": "string",
          "amount": {
            "currency": "USD",
            "value": 1204
          },
          "partnerAccountID": "UUID",
          "source": {
            "paymentMethodID":"UUID",
            "achDetails": {
              "companyEntryDescription": "Gym Dues",
              "originatingCompanyName": "Whole Body Fit"
            },
            "cardDetails": {
              "dynamicDescriptor": "WhlBdy *Yoga 11-12"
            }
          },
          "destination": {
            "paymentMethodID": "UUID",
            "achDetails": {
              "companyEntryDescription": "Gym Dues",
              "originatingCompanyName": "Whole Body Fit"
            },
            "cardDetails": {
              "dynamicDescriptor": "WhlBdy *Yoga 11-12"
            }
          }
        },
        "runOn": "2024-08-24T14:15:22Z",
        "canceled": false
      }
    ]
  }'\
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
mc, _ := moov.NewClient()

var accountID string
now := time.Now()
start := now.AddDate(0, 1, 0)

mc.CreateSchedule(ctx, accountID, moov.CreateSchedule{
  Description: "string",

  Occurrences: []moov.CreateOccurrence{
    {
      RunOn: now,
      RunTransfer: moov.RunTransfer{
        Description: "Gym Dues",
        Amount: moov.ScheduleAmount{
          Value:    1204,
          Currency: "USD",
        },
        PartnerAccountID: "UUID",
        Source: moov.SchedulePaymentMethod{
          PaymentMethodID: "UUID",
        },
        Destination: moov.SchedulePaymentMethod{
          PaymentMethodID: "UUID",
        },
      },
    },
  },

  Recur: &moov.Recur{
    Start:           &start,
    RecurrenceRule: "FREQ=MONTHLY;COUNT=5",
    RunTransfer: moov.RunTransfer{
      Description: "Gym Dues",
      Amount: moov.ScheduleAmount{
        Value:    1204,
        Currency: "USD",
      },
      PartnerAccountID: "UUID",
      Source: moov.SchedulePaymentMethod{
        PaymentMethodID: "UUID",
      },
      Destination: moov.SchedulePaymentMethod{
        PaymentMethodID: "UUID",
      },
    },
  },
})
200 400 422 429
Created schedule
[
  {
    "description": "string",
    "destinationAccountID": "90c0c8e8-98f5-4174-b30b-6840cf85c32a",
    "mode": "sandbox",
    "occurrences": [
      {
        "canceledOn": "2019-08-24T14:15:22Z",
        "error": {
          "message": "string"
        },
        "generated": true,
        "indefinite": true,
        "mode": "sandbox",
        "occurrenceID": "74fabb88-d79e-4e9e-b63b-2ddc96054e61",
        "ranOn": "2019-08-24T14:15:22Z",
        "ranTransferID": "761f3bb8-b7a6-45a9-b8f6-394ef8f68835",
        "runOn": "2019-08-24T14:15:22Z",
        "runTransfer": {
          "amount": {
            "currency": "USD",
            "value": 1204
          },
          "description": "string",
          "destination": {
            "achDetails": {
              "companyEntryDescription": "Gym Dues",
              "originatingCompanyName": "Whole Body Fit"
            },
            "cardDetails": {
              "dynamicDescriptor": "WhlBdy *Yoga 11-12"
            },
            "paymentMethodID": "b7a60692-ab86-4eb0-b961-3bb4a714aa42"
          },
          "partnerAccountID": "c197cd40-7745-4413-8f3b-ec962d1b5225",
          "source": {
            "achDetails": {
              "companyEntryDescription": "Gym Dues",
              "originatingCompanyName": "Whole Body Fit"
            },
            "cardDetails": {
              "dynamicDescriptor": "WhlBdy *Yoga 11-12"
            },
            "paymentMethodID": "b7a60692-ab86-4eb0-b961-3bb4a714aa42"
          }
        },
        "scheduleID": "b7aa2ee2-8783-4fc9-9fa6-a4720b30b20d",
        "status": "pending"
      }
    ],
    "ownerAccountID": "292371f0-0c0d-4018-aa97-b77545d5ce75",
    "partnerAccountID": "c197cd40-7745-4413-8f3b-ec962d1b5225",
    "recur": {
      "indefinite": true,
      "recurrenceRule": "FREQ=DAILY;COUNT=5",
      "runTransfer": {
        "amount": {
          "currency": "USD",
          "value": 1204
        },
        "description": "string",
        "destination": {
          "achDetails": {
            "companyEntryDescription": "Gym Dues",
            "originatingCompanyName": "Whole Body Fit"
          },
          "cardDetails": {
            "dynamicDescriptor": "WhlBdy *Yoga 11-12"
          },
          "paymentMethodID": "b7a60692-ab86-4eb0-b961-3bb4a714aa42"
        },
        "partnerAccountID": "c197cd40-7745-4413-8f3b-ec962d1b5225",
        "source": {
          "achDetails": {
            "companyEntryDescription": "Gym Dues",
            "originatingCompanyName": "Whole Body Fit"
          },
          "cardDetails": {
            "dynamicDescriptor": "WhlBdy *Yoga 11-12"
          },
          "paymentMethodID": "b7a60692-ab86-4eb0-b961-3bb4a714aa42"
        }
      },
      "start": "2019-08-24T14:15:22Z"
    },
    "scheduleID": "b7aa2ee2-8783-4fc9-9fa6-a4720b30b20d",
    "sourceAccountID": "c9fc70f7-3061-47a8-89e1-66c55f6542c7"
  }
]
Invalid request, an error message will be available in the response body.
Response for http requests that failed
{
  "error": "example error message"
}
Request was able to be parsed but failed validation
Request was refused due to rate limiting.

Retry-After

number

Path parameters

accountID

string <uuid> required
ID of the account.

Body

application/json
Describes the schedule to create or modify

description

string
Simple description of what the schedule is.

occurrences

array
Occurrences to either create or modify
Show child attributes

canceled

boolean
If set to true, will cancel the occurrence. If set false will resume the occurrence. If unset leaves the value unchanged.

occurrenceID

string<uuid>
If set this defines what occurrence to modify, if invalid will fail request. If null or "" it defines to add a new occurrence.

runOn

string<date-time>
Timestamp to run the transfer after. Value must be into the future.

runTransfer

object
Defines the attributes of a transfer
Show child attributes

amount

object required
An integer value representing money in a specific currency.
Show child attributes

currency

string <=3 characters Pattern
A 3-letter ISO 4217 currency code.

value

integer<int64>
Quantity in the smallest unit of the specified currency. In USD this is cents, for example, $12.04 is ‘1204’ and $0.99 is ‘99’.

destination

object required
Defines a payment method to use for the scheduled transfer
Show child attributes

paymentMethodID

string<uuid> required
ID of the payment method to use.

achDetails

object
Show child attributes

companyEntryDescription

string [4 to 10] characters
An optional override of the default NACHA company entry description for a transfer.

originatingCompanyName

string [4 to 16] characters
An optional override of the default NACHA company name for a transfer.

cardDetails

object
Show child attributes

dynamicDescriptor

string [4 to 22] characters
An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.

partnerAccountID

string<uuid> required
AccountID of the Moov partner in the transfer.

source

object required
Defines a payment method to use for the scheduled transfer
Show child attributes

paymentMethodID

string<uuid> required
ID of the payment method to use.

achDetails

object
Show child attributes

companyEntryDescription

string [4 to 10] characters
An optional override of the default NACHA company entry description for a transfer.

originatingCompanyName

string [4 to 16] characters
An optional override of the default NACHA company name for a transfer.

cardDetails

object
Show child attributes

dynamicDescriptor

string [4 to 22] characters
An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.

description

string
Simple description to place on the transfer

recur

object
Defines configuration for recurring transfers
Show child attributes

recurrenceRule

string required
RRule as defined by RFC 5545 (https://www.rfc-editor.org/rfc/rfc5545#section-3.3.10). Generators available online at the following sites - https://freetools.textmagic.com/rrule-generator https://jkbrzt.github.io/rrule/

runTransfer

object required
Defines the attributes of a transfer
Show child attributes

amount

object required
An integer value representing money in a specific currency.
Show child attributes

currency

string <=3 characters Pattern
A 3-letter ISO 4217 currency code.

value

integer<int64>
Quantity in the smallest unit of the specified currency. In USD this is cents, for example, $12.04 is ‘1204’ and $0.99 is ‘99’.

destination

object required
Defines a payment method to use for the scheduled transfer
Show child attributes

paymentMethodID

string<uuid> required
ID of the payment method to use.

achDetails

object
Show child attributes

companyEntryDescription

string [4 to 10] characters
An optional override of the default NACHA company entry description for a transfer.

originatingCompanyName

string [4 to 16] characters
An optional override of the default NACHA company name for a transfer.

cardDetails

object
Show child attributes

dynamicDescriptor

string [4 to 22] characters
An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.

partnerAccountID

string<uuid> required
AccountID of the Moov partner in the transfer.

source

object required
Defines a payment method to use for the scheduled transfer
Show child attributes

paymentMethodID

string<uuid> required
ID of the payment method to use.

achDetails

object
Show child attributes

companyEntryDescription

string [4 to 10] characters
An optional override of the default NACHA company entry description for a transfer.

originatingCompanyName

string [4 to 16] characters
An optional override of the default NACHA company name for a transfer.

cardDetails

object
Show child attributes

dynamicDescriptor

string [4 to 22] characters
An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.

description

string
Simple description to place on the transfer

indefinite

boolean
True if the RRule set runs indefinitely

start

string<date-time> <=24 characters

Response

application/json

description

string
Simple description of what the schedule is.

destinationAccountID

string<uuid>
AccountID tied to the destination of the transfers, this cannot change once created.

mode

string<enum>
sandbox or production status of this schedule.
Possible values: sandbox, production

occurrences

array
Occurrences that have already been created
Show child attributes

canceledOn

string<date-time>
Timestamp of when this occurrence was canceled. If set, this occurrence won’t run.

error

object
Contains details on why the occurrence errored
Show child attributes

message

string

generated

boolean
True if this was generated by a RRule

indefinite

boolean
True if the RRule that generated this runs indefinitely

mode

string<enum>
sandbox or production status of this schedule.
Possible values: sandbox, production

occurrenceID

string<uuid>
ID of this specific occurrence

ranOn

string<date-time>
Timestamp of when it was confirmed to start the transfer

ranTransferID

string<uuid>
ID of the transfer that was created

runOn

string<date-time>
Timestamp to run the transfer after

runTransfer

object
Defines the attributes of a transfer
Show child attributes

amount

object required
An integer value representing money in a specific currency.
Show child attributes

currency

string <=3 characters Pattern
A 3-letter ISO 4217 currency code.

value

integer<int64>
Quantity in the smallest unit of the specified currency. In USD this is cents, for example, $12.04 is ‘1204’ and $0.99 is ‘99’.

destination

object required
Defines a payment method to use for the scheduled transfer
Show child attributes

paymentMethodID

string<uuid> required
ID of the payment method to use.

achDetails

object
Show child attributes

companyEntryDescription

string [4 to 10] characters
An optional override of the default NACHA company entry description for a transfer.

originatingCompanyName

string [4 to 16] characters
An optional override of the default NACHA company name for a transfer.

cardDetails

object
Show child attributes

dynamicDescriptor

string [4 to 22] characters
An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.

partnerAccountID

string<uuid> required
AccountID of the Moov partner in the transfer.

source

object required
Defines a payment method to use for the scheduled transfer
Show child attributes

paymentMethodID

string<uuid> required
ID of the payment method to use.

achDetails

object
Show child attributes

companyEntryDescription

string [4 to 10] characters
An optional override of the default NACHA company entry description for a transfer.

originatingCompanyName

string [4 to 16] characters
An optional override of the default NACHA company name for a transfer.

cardDetails

object
Show child attributes

dynamicDescriptor

string [4 to 22] characters
An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.

description

string
Simple description to place on the transfer

scheduleID

string<uuid>
specific ID for this schedule

status

string<enum>
Status of the completed occurrence
Possible values: pending, failed, completed

ownerAccountID

string<uuid>
AccountID of the creator of the schedule and the only one able to modify it.

partnerAccountID

string<uuid>
AccountID tied to the partner of the transfers, this cannot change once created.

recur

object
Defines configuration for recurring transfers
Show child attributes

recurrenceRule

string required
RRule as defined by RFC 5545 (https://www.rfc-editor.org/rfc/rfc5545#section-3.3.10). Generators available online at the following sites - https://freetools.textmagic.com/rrule-generator https://jkbrzt.github.io/rrule/

runTransfer

object required
Defines the attributes of a transfer
Show child attributes

amount

object required
An integer value representing money in a specific currency.
Show child attributes

currency

string <=3 characters Pattern
A 3-letter ISO 4217 currency code.

value

integer<int64>
Quantity in the smallest unit of the specified currency. In USD this is cents, for example, $12.04 is ‘1204’ and $0.99 is ‘99’.

destination

object required
Defines a payment method to use for the scheduled transfer
Show child attributes

paymentMethodID

string<uuid> required
ID of the payment method to use.

achDetails

object
Show child attributes

companyEntryDescription

string [4 to 10] characters
An optional override of the default NACHA company entry description for a transfer.

originatingCompanyName

string [4 to 16] characters
An optional override of the default NACHA company name for a transfer.

cardDetails

object
Show child attributes

dynamicDescriptor

string [4 to 22] characters
An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.

partnerAccountID

string<uuid> required
AccountID of the Moov partner in the transfer.

source

object required
Defines a payment method to use for the scheduled transfer
Show child attributes

paymentMethodID

string<uuid> required
ID of the payment method to use.

achDetails

object
Show child attributes

companyEntryDescription

string [4 to 10] characters
An optional override of the default NACHA company entry description for a transfer.

originatingCompanyName

string [4 to 16] characters
An optional override of the default NACHA company name for a transfer.

cardDetails

object
Show child attributes

dynamicDescriptor

string [4 to 22] characters
An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.

description

string
Simple description to place on the transfer

indefinite

boolean
True if the RRule set runs indefinitely

start

string<date-time> <=24 characters

scheduleID

string<uuid>
specific ID for this schedule

sourceAccountID

string<uuid>
AccountID tied to the source of the transfers, this cannot change once created.