ScheduleRecurringPayment
Description
The ScheduleRecurringPayment method creates the internal ID for a scheduled payment.
Syntax
string ScheduleRecurringPayment(SecurityToken securityToken, string customerInternalId, string paymentMethodProfileId, RecurringBilling recurringBilling)
Arguments
Type | Name | Description | |
|---|---|---|---|
securityToken | R | A unique token that is used to identify a merchant and authenticate the API request. | |
string | customerInternalId | R | Identifies the Customer object to schedule a recurring payment. Note: Use the same customer internal ID that was used to create the |
string | paymentMethodProfileId | R | Unique ID from the AddCustomerPaymentMethod response to create a recurring payment. |
recurringBilling | R | Details of the recurring billing. Required Fields
Fields to not include if unused
|
Return Value
| Type | Description |
|---|---|
| string | Returns a scheduledPaymentInternalId. Otherwise, a fault is returned. |
Example Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
<soapenv:Header />
<soapenv:Body>
<ebiz:ScheduleRecurringPayment>
<ebiz:securityToken>
<ebiz:SecurityId>*************766e-44e8*************</ebiz:SecurityId>
<ebiz:UserId />
<ebiz:Password />
</ebiz:securityToken>
<ebiz:customerInternalId>***************4330-9408*************</ebiz:customerInternalId>
<ebiz:paymentMethodProfileId>1863</ebiz:paymentMethodProfileId>
<ebiz:recurringBilling>
<ebiz:Amount>1000.00</ebiz:Amount>
<ebiz:Tax/>
<ebiz:Enabled/>
<ebiz:Start/>
<ebiz:Expire/>
<ebiz:Next/>
<ebiz:NumLeft/>
<ebiz:RepeatCount/>
<ebiz:Schedule>monthly</ebiz:Schedule>
<ebiz:CustomScheduleObject>
<ebiz:Interval/>
<ebiz:Frequency/>
</ebiz:CustomScheduleObject>
<ebiz:ScheduleName/>
<ebiz:ReceiptNote/>
<ebiz:ReceiptTemplateName/>
<ebiz:SendCustomerReceipt>false</ebiz:SendCustomerReceipt>
<ebiz:CustomerEmailList/>
</ebiz:recurringBilling>
</ebiz:ScheduleRecurringPayment>
</soapenv:Body>
</soapenv:Envelope>var client = new IeBizServiceClient();
SecurityToken securityToken = new SecurityToken
{
SecurityId = "************4bf0-91cd************",
UserId = "",
Password = ""
};
string customerInternalId = "************42e8-a8ca************";
string paymentMethodProfileId = "12097";
RecurringBilling recurringBilling = new RecurringBilling()
{
Amount = 500,
Tax = 0,
Enabled = true,
Start = DateTime.Today.AddDays(1),
Expire = DateTime.Today.AddDays(200),
Schedule = "daily",
ScheduleName = "Sample Schedule",
ReceiptNote = "",
SendCustomerReceipt = false
};
string scheduleInternalId = client.ScheduleRecurringPayment(securityToken, customerInternalId, paymentMethodProfileId, recurringBilling);
Console.WriteLine($"ScheduleId: {scheduleInternalId}");$client = new SoapClient('End Point URL');
$securityToken = array(
'SecurityId' => '***********421b-86ce***********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$params = array(
'securityToken' => $securityToken,
'customerInternalId' => '***********44c1-982b***********',
'paymentMethodProfileId' => '1312',
'recurringBilling' => array(
'Amount' => 15.63,
'Start' => '2021-07-07T00:00:00',
'Next' => '2022-01-01T00:00:00',
'Expire' => '2031-07-07T00:00:00',
'Schedule' => 'Monthly',
'ScheduleName' => 'Updated Schedule Name',
'SendCustomerReceipt' => false,
'ReceiptNote' => 'Updated receipt note'
)
);
$response = $client->ScheduleRecurringPayment($params);Example Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ScheduleRecurringPaymentResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<ScheduleRecurringPaymentResult>********f7f8-e35e*********</ScheduleRecurringPaymentResult>
</ScheduleRecurringPaymentResponse>
</s:Body>
</s:Envelope><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode>s:InvalidPaymentMethod</faultcode>
<faultstring xml:lang="en-US">Invalid PaymentMethod</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>Updated 4 months ago
