Initialize Hosted Purchase

This endpoint is used for buying e-pins. When you make a request, system reserves requested e-pins for a period of time (5 minutes) until you complete the process by confirming the purchase. This endpoint returns a token, which is used in confirming the purchase.

POST
/ hostedpurchases / init

Request Parameters

Parameter Type Required Description
CLIENT_ID String Yes Partner identifier provided by EpinTower
PRODUCT_PACK_CODE String Yes CODE acquired from products listing
QUANTITY Integer Yes Number of the pins requested. Maximum is 10 pins per request.
Note: For some products, only one pin is authorized per request and it is mentioned on the product list (Find more in get product).
TRANSACTION_ID String Yes The order id for the purchase transaction.
-It should by unique
-Max. length 45 characters Must contains only A-Z and/or 0-9 and/or - _ , no space
CUSTOMER_PHONE_NUMBER String Yes Customers phone number (with the country Code) eg. 905051234567.
CUSTOMER_EMAIL String No Customer's email
CUSTOMER_ID String No Customer's id eg. 123a4b. Only alphanumeric and "-", "_" characters are allowed
CUSTOMER_FULL_NAME String No Customer's full name
CUSTOMER_IDENTITY_NUMBER String No Customer's Turkish Identity Number
CUSTOMER_ADDRESS String No Customer's address
CUSTOMER_TOWN String No Customer's town
CUSTOMER_CITY String No Customer's city
SIGNATURE String Yes You need to calculate it as mentioned in security section.
- Data to sign in order : CLIENT ID, SECRET KEY, TRANSACTION ID

Response Parameters

Parameter Type Description
PURCHASE_TOKEN JSON Is used in requests when confirming the purchase
{"token": "2D19054B_F877_83D4_5361_3831905C5B6E", "expiresAt": "2025-01-07 19:05:00"} 
TRANSACTION_ID String The order id for the purchase transaction.
RESPONSE_CODE Integer Returned value of “0” implies transaction is successfully completed.
If the code is not "0", it means an error. See error codes section.
RESPONSE_MESSAGE String Response message for requested transaction
RESPONSE_ID String Response id for requested transaction
SIGNATURE String You need to calculate it as mentioned in security section.
- Data to sign in order : CLIENT ID, SECRET KEY, TRANSACTION ID