Payment Form
You can quickly begin accepting payments and take advantage of features like installment checks, front-end payment controls, BIN inquiry, payment with 3D secure, and card storage with the Craftgate payment form without having to incur additional development costs.
It takes two actions to use the common payment page. The Receiving Payment with Common Payment Page can be viewed.
- Receive payment using the common payment method
- Checking the outcome of the common payment form
Receiving Payment using Common Payment Form, Step 1
Initialize the Payment Form
The "pageUrl" and "token" arguments are returned to the merchant once the request to initialize a payment form is sent over the Craftgate API. After completing this step, the user will see the payment form when he accesses the URL value in the "pageUrl" argument in his browser. The 'iframe=true' argument can be added to this URL to show the page as an iframe if desired. Similar to how a card picture shaped by user input can be added to the common payment page when the 'animatedCard=true' option is added to the URL.
Customer Submits The Payment
After entering the card details and completing the appropriate fields on the page, the user submits the payment. The user has the choice to keep his card while using the payment form, or if the merchant fills out the 'cardUserKey' parameter before the payment form request is made, he can utilize his hidden cards.
Token Data Returns at the conclusion of the transaction
The "token" information generated based on the payment form request is returned to the URL address in the "callbackUrl" field that the member merchant fills out when establishing the payment form request, whether the payment process was successful or failed.
Step 2: Validate Payment Data After Payment Completes
Retrieve of Payment Information
You should use the Craftgate API to re-query the payment form result after sending the token information to the address specified in the "callbackUrl" parameter. By using token information in this query, you may view the payment's specifics, whether it encountered errors, and, if so, which errors it did.
Run a Security Check for the Payment Data
The merchant's "callbackUrl" can receive the token information from a low-value payment that malicious individuals previously completed. Here, the merchant must get the information about the transmitted payment from Craftgate using the "token" information, compare it to the data about the payment for their own order, and certify that the transmitted request originated from Craftgate.
Update payment information with the original result
When using the Common Payment Form, the end user makes decisions on transactions like using a wallet and selecting installment payments at the moment of payment. Using the data from the payment form result, the merchant must change the number of installments (installment), the amount collected (paidPrice), and the amount collected from the wallet (walletPrice) in its system.
The Receiving Payments with the Common Payment Page page contains information about the Common Payment Form.