2. Payment Initiate (Id)
This is a method you can use to initiate payments with connected APM providers. This method requires an external connection Id. You can obtain the relevant Id information through 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 send the 'apikeypublic' and 'apiclientpublic' parameters in the 'Header' section.
The (HEADERS) parameters that need to be sent to the service are as follows:
Parameter | Type | Required | Description |
---|---|---|---|
apikeypublic | string | Yes | The Public Key obtained from the merchant panel. |
apiclientpublic | string | Yes | The Public Client obtained from the merchant panel. |
The (BODY) parameters that need to be sent to the service are as follows:
Parameter | Type | Required | Description |
---|---|---|---|
ApmId | int | Yes | The connection identity information of the APM provider. Returned during listing. |
CurrencyId | int | Yes | The connection identity information of the APM provider. Returned during listing. See: Currencies |
MerchantUniqueCode | string | Yes | The unique number generated for the payment. |
MerchantSuccessBackUrl | string | Yes | The address where the successful result of the payment will be delivered. Post Body will receive the response. |
MerchantFailBackUrl | string | Yes | The address to which the successful outcome of the payment will be communicated. It will receive the response in the Post Body. |
Amount | decimal | Yes | The payment amount. |
Description | string | Yes | The payment description. Depending on the provider, this description may be displayed on the payment screen. |
An example JSON file to be sent to the service is as follows:
The parameters returned from the service are as follows:
Parameter | Type | Description |
---|---|---|
ErrorCode | int | Error code. It returns '0' if the operation is successful. |
Result | bool | It returns a 'true' or 'false' value. It returns 'true' if the operation is successful. |
Message | string | If the operation is unsuccessful, this is the specified error message, providing language support based on the 'locale' parameter. |
Body | object | If the operation fails, this is the error detail object. |
Last updated