Skip to main content

Multi Payment

Initiating Multi Payments

URL

The endpoint and http method information to initiate payment with multi payment are stated below.

POST/payment/v1/multi-payments/init

Parameters for Initiating Multi Payments

Unlike other payments, the callbackUrl parameter must be sent for payments to be made via the multi payments and card information is not expected. The cardUserKey parameter can be filled in so that the relevant user can use the stored cards. In this context, the parameters required to initiate a payment with the multi payments are as follows.

conversationId
string

"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.

externalId
string

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.

orderId
string

Order id parameter to be transmitted to the banks or alternative payment methods when receiving the payment. Since it is optional, it is recommended not to send it and the orderId value is generated by Craftgate.

price
decimal
required

Total basket price. The sum of the item prices in the basket must be equal to total basket price.

paidPrice
decimal
required

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.

buyerMemberId
number

ID of the buyer that is returned from member creation.

currency
Currency
required
Values:
TRY
USD
EUR
GBP
CNY
ARS
BRL
AED
IQD
AZN
KZT
KWD
SAR
BHD
RUB
JPY
EGP
paymentGroup
PaymentGroup
Values:
PRODUCT
LISTING_OR_SUBSCRIPTION
paymentSource
PaymentSource
Values:
API
CHECKOUT_FORM
PAY_BY_LINK
paymentPhase
PaymentPhase

See: Payment Phases - For Post Auth See: Post Auth

Values:
AUTH
PRE_AUTH
POST_AUTH
paymentChannel
string

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.

callbackUrl
string
required

The URL to be used to send the result returned from the bank to the merchant

cardUserKey
string

Card user key that represents the card holder.

allowOnlyCreditCard
boolean

If true, payment form only allows credit card for the payment.

allowOnlyStoredCards
boolean

If true, the user can only pay using their stored card. cardUserKey parameter is required, if this parameter is true.

alwaysStoreCardAfterPayment
boolean

If true, card number that the user is used for the payment will be stored. If this parameter is true, allowOnlyStoredCards should not be sent.

allowDeleteStoredCard
boolean

If true or omitted, the delete action appears next to stored cards on the common payment page; only when explicitly set to false is the delete option hidden.

allowInstallmentOnlyCommercialCards
boolean

If true, installment options are only valid for the commercial cards.

forceAuthForNonCreditCards
boolean

If true, authorization payment is forced for non credit cards.

disableStoreCard
boolean

If sent as true, the user will not be given the option to save their card.

forceThreeDS
boolean

Information on whether 3DSecure payment is required.

ttl
long

Time to Live (TTL) value in minutes for this initialized request

items
PaymentItem[]
required

Ödemeye ilişkin kırılım bilgileri. En az bir kırılım gönderilmesi ve gönderilen kırılımların tutarlarının toplamının price alanına eşit olması zorunludur

masterpassGsmNumber
string

(See: Masterpass) If the user is required to pay with Masterpass, the phone number associated with the user's Masterpass must be entered starting with 90. If you do not enter it or if the phone number you entered has not been linked with Masterpass before, the Masterpass tab will not be opened in the payment form.

masterpassUserId
string

(See: Masterpass) If the user is required to be able to pay with Masterpass, and the user's Masterpass account has been previously linked with the merchant through an environment other than the Craftgate integration, the userId value used in the link phase.

apmUserIdentity
string

(See. Payoneer) If the user is required to be able to pay with Payoneer, the unique value associated with the user.

enabledPaymentMethods
PaymentMethod[]

You can manage the payment methods to be displayed on the Payment Form with this parameter. If this parameter is [CARD], payment form accepts only card payment. See all available payment methods (see. Payment methods) . All available payment methods are shown when the parameter never sent.

maximumSplitPaymentCount
number

This is the maximum number of successful payments allowed under the multi payment process.

additionalParams
map

Additional parameters required for the process can be sent here.

Response Parameters

The parameters returned as a result of the payment transaction with the multi payment are 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:

Multi Payment Inquiry

With the token forwarded to the callback URL or webhook call, the result of multi payment can be queried.

URL

The endpoint and http method information to inquiry multi payment are stated below.

GET/payment/v1/multi-payments/:token

Multi Payment Inquiry Response Parameters

The response to inquiry requests for multi payment is stated below.

id
number

Multi Payment ID. Unique identifier that created by craftgate for multi payment.

multiPaymentStatus
MultiPaymentStatus

Multi Payment Status

token
string

Multi payment token

tokenExpireDate
date

Expiry date for multi payment

paidPrice
decimal

Total price to be collected

remainingAmount
decimal

Remaining amount to be collected

conversationId
string

conversationId value sent in initial request

externalId
string

externalId value sent in initial request

paymentIds
array

Payment id values of all payments created with multi payment tokenParçalı ödeme için gerçekleştirilen başarılı ve başarısız tüm ödemelere ait id bilgisi

Sample Codes

You can review the sample codes in the open source Craftgate API clients.