1. Initiate Payment (By ID)
It is a method used to initiate payments with connected APM providers. This method requires an external connection Id. You can obtain the relevant Id information using the "List" method.
Initiate Payment (ID)
POST {{Base Adres}}/api/paywall/apm/pay/byid
Important: To use the APM Payment Initiation service, you need to include the 'apikeypublic' and 'apiclientpublic' parameters in the 'Header' field.
The headers parameters that need to be sent to the service are as follows:
apikeypublic
string
Yes
The Public Key obtained from the merchant panel.
apiclientpublic
string
Yes
The Public Client obtained from the merchant panel.
The parameters that need to be sent to the service in the BODY are as follows:
ApmId
int
Yes
APM provider connection identity information returned during listing
CurrencyId
int
Yes
Currency in which the payment is requested See: Currency
MerchantUniqueCode
string
Yes
Unique number you created for the payment
MerchantSuccessBackUrl
string
Yes
Address to which the successful payment result will be sent receives Post Body response
MerchantFailBackUrl
string
Yes
Address to which the successful payment result will be sent receives Post Body response
Amount
decimal
Yes
Payment amount
* If IsRecurring is true this value represents the maximum amount to be charged
Description
string
Yes
Description of the payment Depending on the provider this description may be displayed on the payment screen
IsRecurring
bool
No
If the APM provider supports receiving payment instructions this parameter should be sent as true
Supported Provider Masterpass
ExpireDay
int
No
Used if the APM provider supports expiration date on the relevant page/payment flow expects number of days and adds it on top of the current active day Supported Provider Masterpass
IsAutoCommit
bool
No (true)
By default, the value is "true". If you want to change it, it should be set to "false"
When true is sent โ After the 3D process, once the payment is completed on the screen, the amount is immediately charged from the card
When false is sent โ After the payment, a callback is triggered and then a separate commit request must be sent
Payer
Payer
Yes
Object containing the payer information for the payment
The required fields within this object may vary depending on the parameters expected by the provider
It is recommended to send all information
Payer :
Fullname
string
Yes (Conditional)
Payer full name
CardNumber
string
Yes (Conditional)
Payer card number (e.g., meal card, etc.)
CardId
string
Yes (Conditional)
Payer card identity number (works if the card is stored in the APM provider)
Phone
string
Yes (Conditional)
Payer phone number
string
Yes (Conditional)
Payer email address
UserIdentity
string
Yes (Conditional)
Payer identity information in your system (TCKN/VKN)
ConsumerIdentity
string
Yes (Conditional)
Payer identity information in your system (UserId)
Birthday
DateTime
No
Payer date of birth
CardAlias
string
Yes (Conditional)
Label of the card belonging to the payer (Masterpass)
An example JSON file to be sent to the service is as follows:
The parameters returned from the service are as follows:
ErrorCode
int
Error code. If the transaction is successful, it returns a value of '0'.
Result
bool
It returns a boolean value where 'true' indicates a successful transaction.
Message
string
If the transaction fails, this message specifies the error and provides language support based on the 'locale' parameter.
Body
object
If the transaction fails, this object provides details about the error.
Last updated