Skip to main content
Recurring Plans API

Create Recurring Plan

POST /recurring-plans/create

The endpoint creates a Recurring Plan object

Request Body

description

string

The description of this Recurring Plan.

Example value:  "Recurring Plan #1234567 for transaction 123455"

processing_method

string
REQUIRED

Recurring Plan processing method.

Example value:  AUTOMATIC | SEND_REQUEST

start_date

string

If not set, uses the actual date.

end_date

string

If false, not set date.

total_cycle_count

string

Count of the cycles

cycle_frequency

string

Frequency of the Recurring Plan

Example value: DAILY | WEEKLY | MONTHLY | SEMI_ANNUALLY | YEARLY

existing_end_user_id

string

The end user id

Example value: eur_ff6c5094-1cd1-11ec-9621-0242ac130002

new_end_user_details

EndUser
REQUIRED

The user information.

See more here.

This field is REQUIRED only if existing_end_user_id is empty

origin_account_id

string

The ID of the account used to fund this transaction.

Example value: acc_7985e8a4-8f38-4eab-8b27-a5d1c6dbf340

destination_account_id

string

The ID of the account that should receive the funds for this transaction.

Example value: acc_663f0b44-9bdb-499c-925b-2515b45dbe35

transaction

object
REQUIRED

The transaction information of the Recurring Plan.

Section

tenant_id String REQUIRED The ID of the Tenant that originated the transaction. ten_0521aadc-5fbd-4b3c-af0a-a4f4b8d6f20a
type String REQUIRED PAYMENT | PAYOUT | TRANSFER
currency String The type of currency, in ISO 4217 format. See Currency for values. For example, the currency code for US dollars is USD. USD
amount integer REQUIRED The amount of money, in the smallest denomination of the currency indicated by currency, including the values after the decimal separator. For example, when currency is USD, amount is in cents. $10.00 USD is 1000. 10000
statement_descriptor String Description that DRUO will report to institutions so that it appears on your customers’ statements. This request may or may not be honored by the institutions. Must contain at least one letter, and be between 4 and 22 characters. NOVO BILLING* INV12324
primary_reference String The transaction secondary reference. Can be any value to associate the transactions created by this Recurring Plan in an external system. 23423524
secondary_reference String The transaction secondary reference. Can be any value to associate the transactions created by this Recurring Plan in an external system. bj39fhow39fhqp3f0hfae4344
metadata String Set of key-value pairs that you can attach to an object. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. {“order_id”: “6735”}
primary_reference

string

The connect link’s primary reference. Can be any value to associate the connected account to an entity in an external system.

Example value:  23423524

secondary_reference

string

The connect link’s primary reference. Can be any value to associate the connected account to an entity in an external system.

Example value:  bj39fhow39fhqp3f0hfae4344

metadata

string

Set of key-value pairs that you can attach to an object. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long.

Example value:  {"order_id": "6735"}

POST /recurring-plans/create
curl --location 'https://api.druo.com/recurring-plans/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--data-raw '{
  "description": "Insurance policy renewal - INV12324",
  "processing_method": "AUTOMATIC",
  "start_date": "2023-08-16",
  "end_date": "2023-10-16",
  "total_cycle_count": "3",
  "cycle_frequency": "MONTHLY",
  "origin_account_id": "acc_f5f1cd79-5efe-4a21-b516-f586dc9105b7",
  "destination_account_id": "acc_f5f1cd79-5efe-4a21-b516-f586dc9105b7",
  "statement_descriptor": "NOVO BILLING* INV12324",
  "primary_reference": "ABC123",
  "secondary_reference": "bj39fhow39fhqp3f0hfae4344",
  "metadata": {
    "order_id": "6735"
  },
  "transaction": {
    "tenant_id": "ten_22637d15-5b37-4fb2-90e5-aa8751970469",
    "type": "PAYMENT",
    "currency": "USD",
    "amount": 10000,
    "statement_descriptor": "NOVO BILLING* INV12324",
    "primary_reference": "Transaction primary reference",
    "secondary_reference": "Transaction secondary reference",
    "metadata": {
      "transaction_xyz": "JOHN SMITH",
      "id_user": "69440"
    }
  },
  "existing_end_user_id": "eur_22637d16-5b37-4fb2-90e5-aa8751970843"
}'

Response Fields

uuid

string

The Recurring Plan’s UUID.

Example value:  rcp_747536f4-1efd-4cad-91b3-cc8aaeed93e3

code

string

The Recurring Plan’s code.

Example value:  SCSCDSVFGH

description

string

The description of the created Recurring Plan.

Example value:  "Recurring Plan #1234567 for transaction 123455"

processing_method

string

The Recurring Plan’s processing method.

Example value:  AUTOMATIC

status

string

The Recurring Plan’s status.

Example value:  ACTIVE

start_date

string

The Recurring Plan’s scheduled start date.

Example value:  2023-08-16T23:20:15.645+00:00

end_date

string

The Recurring Plan’s scheduled end date.

Example value:  2023-10-16T23:20:15.645+00:00

total_cycle_count

string

The Recurring Plan’s cycle count.

Example value:  4

cycle_frequency

string

The Recurring Plan’s cycle frequency.

Example value:  MONTHLY

end_user

EndUser

The full End User object related to this Account.

See more here.

origin_account

string

The Recurring Plan’s Origin account.

Example value:  acc_7985e8a4-8f38-4eab-8b27-a5d1c6dbf340

destination_account

string

The Recurring Plan’s destination account.

Example value:  acc_7985e8a4-8f38-4eab-8b27-a5d1c6dbf340

primary_reference

string

The connect link’s primary reference. Can be any value to associate the connected account to an entity in an external system.

Example value:  23423524

secondary_reference

string

The connect link’s primary reference. Can be any value to associate the connected account to an entity in an external system.
Example value:  bj39fhow39fhqp3f0hfae4344

transaction

object

The transaction information that belongs to the created Recurring Plan

{
"tenant": {
"uuid": "22637d15-5b37-4fb2-90e5-aa8751970469"
},
"type": "PAYMENT",
"currency": "USD",
"amount": 10000,
"statement_descriptor": "NOVO BILLING* INV12324",
"primary_reference": "Transaction primary reference",
"secondary_reference": "Transaction secondary reference",
"metadata": {
"id_user": "69440",
"transaction_xyz": "JOHN SMITH"
}
}
metadata

string

Set of key-value pairs that you can attach to an object. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long.

Example value:  {"order_id": "6735"}

date_created_gmt

date-time

Create date of the account

Example value:  2021-11-15T23:23:38Z

date_updated_gmt

date-time

Updated date of the account

Example value:  2021-11-15T23:23:38Z

Response
{
    "recurring_plan": {
        "uuid": "rcp_f22f82bc-4f6c-404c-95a9-aa8dbb27c8bd",
        "code": "S7JP08G6INJ",
        "description": "Insurance policy renewal - INV12324",
        "processing_method": "AUTOMATIC",
        "status": "ACTIVE",
        "start_date": "2023-08-16",
        "end_date": "2023-10-16",
        "total_cycle_count": null,
        "cycle_frequency": "MONTHLY",
        "end_user": {
            "uuid": "eur_cd621b34-dd18-4bce-a5bf-ae4ffb40f94a",
            "code": "EVIQ3W7K2F6",
            "type": "INDIVIDUAL",
            "organization": "DRUO",
            "email": "johnsmith@druo.com",
            "note": "Druo user for User JOHN SMITH",
            "metadata": {
                "name": "JOHN",
                "id_user": "69440"
            },
            "first_name": "JOHN",
            "last_name": "SMITH",
            "local_id": "1011234123",
            "local_id_type": null,
            "address": {
                "locality": "Bogotá D.C. ",
                "sublocality": null,
                "administrative_district": "Bogotá D.C. ",
                "postal_code": " ",
                "country": "COL",
                "address_line1": null,
                "address_line2": null,
                "address_line3": null
            },
            "local_id_country": "COL",
            "preferred_language": "es_CO",
            "date_of_birth": "2002-01-01",
            "phone_number": {
                "country_code": "57",
                "number": "3213214455"
            },
            "primary_reference": "End user primary reference ",
            "secondary_reference": "End user secondary reference ",
            "date_created_gmt": "2023-08-19T00:24:34.945Z",
            "date_updated_gmt": "2023-08-19T00:24:34.945Z"
        },
        "origin_account": {
            "uuid": "acc_f5f1cd79-5efe-4a21-b516-f586dc9105b7"
        },
        "destination_account": {
            "uuid": "acc_f5f1cd79-5efe-4a21-b516-f586dc9105b7"
        },
        "transaction": {
            "tenant": {
                "uuid": "22637d15-5b37-4fb2-90e5-aa8751970469"
            },
            "type": "PAYMENT",
            "currency": "USD",
            "amount": 10000,
            "statement_descriptor": "NOVO BILLING* INV12324",
            "primary_reference": "Transaction primary reference",
            "secondary_reference": "Transaction secondary reference",
            "metadata": {
                "id_user": "69440",
                "transaction_xyz": "JOHN SMITH"
            }
        },
        "primary_reference": "ABC123",
        "secondary_reference": "bj39fhow39fhqp3f0hfae4344",
        "metadata": {
            "order_id": "6735"
        },
        "date_created_gmt": "2023-08-19T00:24:34.945Z",
        "date_updated_gmt": "2023-08-19T00:24:34.945Z"
    }
}