Subscriber Transactions
After each subscription payment, a default customerReferenceCode is generated for the customer whose details are provided. Currently, this reference code can only be used to retrieve and update customer information.
Customers are created or updated based on the email parameter. For example, a unique reference code, let's say 'A', is generated for a customer when a subscription is created with email address 'X'. If the email address 'X' is used in another subscription, the customer details sent in the request are updated, and once again, a unique reference code 'A' is generated.
There are 3 different methods that can be used on subscribers.
Update Subscriber
All details of a subscriber can be updated via an API request. To do this, a request for updating with the subscriber's reference code and the parameters to be updated is required.
Update Subscriber
POST
https://api.iyzipay.com/v2/subscription/customers/{customerReferenceCode}
Request Body
conversationId
String
A value that can be sent during the request and received in the response, used to match the request and response.
locale
String
It is used to set the language of the text returned as a result of the iyzico request. The default value is TR (Turkish).
name*
String
Name of subscriber
customerReferenceCode*
String
Subscriber reference code.
billingAddress.zipCode
String
Invoice postal code.
billingAddress.address*
String
Invoice address
billingAddress.country*
String
Invoice country.
billingAddress.city*
String
Invoice city.
billingAddress.contactName*
String
Invoice contact name.
identitynumber*
String
National ID of subscriber
surname*
String
Surname of subscriber
shippingAddress.zipCode
String
Shipping postal code.
shippingAddress.address*
String
Shipping address.
shippingAddress.country*
String
Shipping country.
shippingAddress.city*
String
Shipping city.
shippingAddress.contactName*
String
Shipping name
Update Subscriber Response;
status
String
It indicates the result of the request. If the transaction is successful, it returns a 'success' value
systemTime
Long
The returned result is the current Unix timestamp value at that moment.
referenceCode
String
The unique reference code created for the subscriber.
createdDate
Long
The date of subscriber creation.
status
String
Status of subscriber, default is ACTIVE
name
String
Name of subscriber
surname
String
Surname of subscriber
identityNumber
String
National ID of subscriber
String
Email address of subscriber
gsmNumber
String
GSM number of subscriber
billingAddress.contactName
String
Invoice contact name.
billingAddress.city
String
Invoice city.
billingAddress.country
String
Invoice country.
billingAddress.address
String
Invoice address.
billingAddress.zipCode
Number
Invoice postal code.
shippingAddress.contactName
String
Shipping contact name.
shippingAddress.city
String
Shipping city.
shippingAddress.country
String
Shipping country.
shippingAddress.address
String
Shipping address.
shippingAddress.zipCode
Number
Shipping zip code.
Get Subscriber
All the details of a subscriber can be retrieved with the reference code specific to that subscriber.
Get Subscriber
GET
https://api.iyzipay.com/v2/subscription/customers/{customerReferenceCode}
Request Body
customerReferenceCode*
String
Subscriber reference code.
Get Subscriber Response;
status
String
It indicates the result of the request. If the transaction is successful, it returns a 'success' value
systemTime
Long
The returned result is the current Unix timestamp value at that moment.
referenceCode
String
The unique reference code created for the subscriber.
createdDate
Long
The date of subscriber creation.
status
String
Status of subscriber, default is ACTIVE
name
String
Name of subscriber
surname
String
Surname of subscriber
identityNumber
String
National ID of subscriber
String
Email address of subscriber
gsmNumber
String
GSM number of subscriber
billingAddress.contactName
String
Invoice contact name.
billingAddress.city
String
Invoice city.
billingAddress.country
String
Invoice country.
billingAddress.address
String
Invoice address.
billingAddress.zipCode
Number
Invoice postal code.
shippingAddress.contactName
String
Shipping contact name.
shippingAddress.city
String
Shipping city.
shippingAddress.country
String
Shipping country.
shippingAddress.address
String
Shipping address.
shippingAddress.zipCode
Number
Shipping postal code.
List of Subscribers
You can list all subscribers and their details with this request.
List of Subscribers
GET
https://api.iyzipay.com/v2/subscription/customers
Request Body
page*
Integer
It retrieves all subscribers for the specified page
count*
Integer
It specifies how many subscribers will be listed per page.
List of Subscribers Response;
status
String
It indicates the result of the request. If the transaction is successful, it returns a 'success' value
systemTime
Long
The returned result is the current Unix timestamp value at that moment.
totalCount
String
It indicates the total number of results.
currentPage
Integer
It specifies which page the listing is for.
pageCount
Integer
It indicates the total number of pages of results.
items
Array Object
It is an array containing subscriber details.
Last updated