Create Payment
URL
The endpoint and http method information to create payment are stated below.
Request Parameters
The parameters expected to be sent in requests to create payment are listed under the table and subheadings below.
"boomerang" value that can be sent with the request and received with the response. It can be used to associate different requests with each other. Usually, the order number is used that is stored in merchant own system.
Special characters that may cause security problems should not be used in the data. Data cannot start with the +
or -
character, but it can be used in it.
It is generally used as a payment order number or basket number on the merchant side. You can search with this value later by using reporting services.
Special characters that may cause security problems should not be used in the data. Data cannot start with the +
or -
character, but it can be used in it.
Total basket price. The sum of the item prices in the basket must be equal to total basket price.
The final amount to be paid from the card by calculating differences such as commissions and discounts. The amount to be collected from the wallet is also included in this amount. If there is an interest in the transaction, the amount with the interest added should be entered in this parameter.
The amount to be collected from the wallet of the buyer specified in the buyerMemberId
parameter. It is required when wallet want to be used for the payment. (Default: 0
)
Installment number. Should be 1
for cash price.
ID of the buyer that is returned from member creation.
It is generally used to keep information specific to the payment channel on the merchant side. You can search with this value later by using reporting services.
Order id parameter to be transmitted to the bank when receiving the payment. Since it is optional, it is recommended not to send it and the orderId value is generated by Craftgate.
IP of the buyer.
(See: Card Information) Should not be sent when payments that will be collected entirely from the wallet (ie. payments where paid price
is equal to wallet Price
)
Represents the POS that payment will be collected.
You can decide to try another virtual pos after a specific payment error(invalid transaction, do not honor) occurred.
Parameters that can be sent for Fraud check. (See. Fraud Check Parameters)
Payment items related to payment. You must send at least one payment item and the sum of prices must be equal to the price
field.
Additional parameters related to payment. See: Payment Additional Parameters
Card Information
Card information must be sent when payments are made by card in whole or in part. This information may be the information of a credit card, debit card or prepaid card, as well as identifying information about a previously stored card.
If the cardUserKey
field in the card information is set, the fields in
the Stored Card Information section are valid. For other cases,
see: Credit Card, Debit Card or Prepaid Card Information.
Credit Card, Debit Card or Prepaid Card Information
Name or description of the card
Cardholder name
Card number
Expire year of the card number
Expire month of the card number
CVV of the card number
Set this parameter true
if card wants to be stored after successful payment? (Default: false
)
Card user key that represents the card holder.
Reward information requested to be used during payment. See Using Rewards and Points
Stored Card Information
Card user key that represents the card holder.
Card token that represents the card.
Reward information requested to be used during payment. See Using Rewards and Points
Payment Additional Parameters
GSM Number to send while receiving payment via Paycell
Response Parameters
Parameters returned as a result of payment are also subject to the rules specified in
the Response Formats section of the API documentation home page. In the absence of a systematic
or fictional error, the sub-parameters of the object returned in the data
parameter are as follows:
ID of the payment.
The date that payment is created
Basket price of the payment
Paid price of the payment
Wallet price of the payment
Buyer member ID of the payment
Installment number
Value of theconversationId
parameter sent in the payment request
externalId
value that sent in payment request by merchant
See: Payment Types
See: Payment Status
paymentChannel
value sent by the merchant in the payment request
Indicates whether the payment is 3D Secure payment
Interest rate to calculate paid price that buyer will pay
Interest amount. Equal to the difference between paidPrice
and price
values
Bank commission rate
Bank commission rate amount
Card user key that represents the card holder.
Card token that represents the card.
Indicates whether the payment was made with a stored card
Exist for the payments fully or partially collected from the card. First 8 digits of the card
Exist for the payments fully or partially collected from the card. Last 4 digits of the card
Card holder name surname
Card holder name surname retrieved from bank. The return value might be null for PF poses
authCode value retrieved from bank related to the payment. The return value might be null for PF poses
hostReference value retrieved from bank related to the payment
transId value retrieved from bank related to the payment. The return value might be null for PF poses
orderId value retrieved from bank related to the payment
Card Association
Brand of card. Exist for the payments fully or partially collected from the card
Value of theposAlias
parameter sent in the payment request
POS info that payment is received
Loyalty info that used in payment (See: Reward Usage)
Fraud Check Id if fraud rule matches (See: Fraud Checks)
Fraud Check Action if fraud rule matches (See: Fraud Actions)
It includes the transaction information sent when making the payment request, and the pricing and money transfer information of the payment based on these transactions
Additional data related to the payment
Sample Codes
You can review the sample codes in the open source Craftgate API clients.