Managing debiting series of a COF purchase
The payment platform allows you to manage debiting for any COF purchase types by doing the following:
- getting information about debiting series
- updating COF purchase parameters: change debit amount and expiration date for all COF purchase types and modify debit schedule for regular COF purchases
- cancelling COF purchase at any time
Note that customer can at any time contact the issuer and have COF purchase cancelled. In this case, any following debiting operation is cancelled and the stored payment instrument credentials are deleted from the payment platform.
In addition, you can manage settings of regular COF purchases by using Dashboard.
Getting information about debiting series
There are several things you must consider when sending a request for information about debit series:
- You need to use a POST request to one of the /v2/payment/card/recurring/info endpoint.
- Your request must contain the following parameters and objects:
general
—object with general request identification information:project_id
—project ID obtained from ecommpaysignature
—signature created after you specify all the required parameters (For more information about signing requests, see Signature generation and verification.)
- ID of the debit series inside the
id
parameter of therecurring
object previously received in the callback with COF purchase registration information
Thus, complete request must contain project ID, signature, and ID of debit series.
The payment platform uses the standard format for response with debit series information. For more information about response format, see Response format.
The following response contains information about debiting 4,00 USD
to card 431422******0056
of the customer with ID customer_12
within the 42
project. The response also notifies that subsequent debiting is possible.
Updating debit series
There are several things you must consider when sending a request for updating debit series:
- You need to use a POST request to one of the /v2/payment/card/recurring/update endpoint.
- Your request must contain the following parameters and objects:
general
—object with general request identification information:project_id
—project ID obtained from ecommpaypayment_id
—payment ID, must be unique within the projectsignature
—signature created after you specify all the required parameters (For more information about signing requests, see Signature generation and verification.)
recurring
—object with the COF payment information:id
—ID of debit series received in the callback with COF purchase registration data
- You need also use other parameters of the
recurring
object:expiry_year
—expiration year of the COF purchaseexpiry_month
—expiration month of the COF purchaseexpiry_day
—expiration day of the COF purchaseinterval
—multiplicator to increase debiting period, for example if you need to run debiting every third week, you can setperiod
toW
andinterval
to3
. Possible values: from1
to100
amount
—amount to debit after registrationscheduled_payment_id
—identifier assigned to the payment within which scheduled debits are performed; it must differ from the identifier of the payment made to register a COF purchase and must be unique within the projectperiod
—debiting period:D
—dailyW
—weeklyM
—monthlyQ
—quarterlyY
—yearly
time
—time of subsequent debiting in thehh:mm:ss
formatstart_date
—date to perform the first debit
Thus, complete request must contain project ID, payment ID, signature, ID of debit series, and debit series parameters to update.
The payment platform uses the standard format for callbacks with information about updating debit series. For more information about callback format, see Callbacks.
The following callback affirms that COF purchase is set to perform debiting every third month at 12:00:00.
Cancel COF purchase
There are several things you must consider when sending a request to cancel COF purchase:
- You need to use a POST request to one of the /v2/payment/card/recurring/cancel endpoint.
- Your request must contain the following parameters and objects:
general
—object with general request identification information:project_id
—project ID obtained from ecommpaypayment_id
—payment ID, must be unique within the projectsignature
—signature created after you specify all the required parameters (For more information about signing requests, see Signature generation and verification.)
- ID of the debit series inside the
id
parameter of therecurring
object previously received in the callback with COF purchase registration information
Thus, complete request must contain project ID, payment ID, signature, and ID of debit series.
The payment platform uses the standard format for callbacks with information about cancelling COF purchase. For more information about callback format, see Callbacks.
The following callback update that the COF purchase with ID 1079
has been cancelled.