Create recurring transaction

A recurring transaction is a repeating transaction which has been agreed between a cardholder and a merchant.

Each payment in an active recurring series will be for a fixed amount; the same as the original value of the first transaction in the recurring series.

Please contact iSignthis Merchant support team to enable recurring options.

Unlike the one-off transactions, recurring needs to be set up a bit differently. The difference is that, in the transaction object a recurring flag is used.

Once that is done the following transactions in the recurring sequence will use the recurring_id.

First Transaction

Post

URL: “/v1/authorization/ “

Example: “https://test.com/v1/authorization/”

Body: Setting up the recurring flag

The JSON request is similar to the previous ones, the main difference is the recurring flag.

In the “transaction” object we insert the call “init_recurring” which has to be true.

Sample Json body

{
    "workflow": "Test_Workflow",

    "merchant":  { 
           "id": "Test_Merchant"
        },
    "transaction": {
        "id": "Test_ID",
        "amount": "100",
        "currency": "AUD",
        "reference": "Test_Ref",
	"init_recurring": "true"
 },
    "client": {
        "first_name": "Shana",
        "last_name": "Barrows",
        "email":"shana.barrows@isignthis.com",
        "mobile": "+61434444444",
        "billing_address_street": "Arthur Street",
        "billing_address_secondary": "PO Box 24",
        "billing_address_street_number": "42",
        "billing_address_city": "Ashfield",
        "billing_address_postal_code": "2131",
        "billing_address_subdivision": "NSW",
        "billing_address_country": "AU"
    },
    "account": {
        "identifier": "Test_ID"
    }
}

Extract Recurring ID

After the initial transaction with the recurring flag set to true is successful, a recurring id is returned.

The recurring_id attribute in the notifications that you received in your webhook. It can be found in the cardholder object.

Subsequent Transactions

Change URL

Set Post address to “v1/recurring/authorization/”

Change body

In the transaction object you will have to replace the relevant fields.

Please refer to the code, recurring transactions.

NOTE: YOU HAVE TO REMOVE 
“amount”,”currency” and “init_recurring” in their place include
“recurring_id” :”value that was captured” or else the transaction will fail!

“recurring_id” will be used for the subsequent transactions as it replaces card details information, amount and currency.

Please refer to the code, recurring transactions.

Note: For any subsequent recurring transactions, the same recurring api request body should be sent which holds the initial recurring id and fields of the first recurring transaction.

 

Sample JSON body recurring transactions

{
    "workflow": "Test_Workflow",
    
    "merchant":  { 
           "id": "Test_Merchant"
        },
    "transaction": {
        "id": "Test_ID",
        "reference": "Test_Ref",
	"recurring_id": "34de940d_168c"
 },
    "client": {
        "first_name": "Shana",
        "last_name": "Barrows",
        "email":"shana.barrows@isignthis.com",
        "mobile": "+61434444444",
        "billing_address_street": "Arthur Street",
        "billing_address_secondary": "PO Box 24",
        "billing_address_street_number": "42",
        "billing_address_city": "Ashfield",
        "billing_address_postal_code": "2131",
        "billing_address_subdivision": "NSW",
        "billing_address_country": "AU"
    },
    "account": {
        "identifier": "Test_ID"
    }
}

Additional Calls

Get Active Recurring

Get all the active recurring credentials and details from a recurring _id:

Request Method: GET

URL: “/v1/recurring/active/iSignthis-identity-ID”

example : https://test.com/v1/recurring/active/34de940d_168c

The response objects can be found under Recurring Credentials details. See Recurring Credential Object.

Deactivate Recurring

Deactivate the recurring credentials for a given recurring id

Request Method: POST

URL: “/v1/recurring/iSignthis-recurring-ID/deactivate

example : https://test.com/v1/recurring/34de940d_168c/deactivate

You will receive an HTTP status code back. Please check HTTP code status for more info.