Purchase (Card)
Direct capture payment via card. The merchant collects card details and sends them to Moyasar's API to create an immediate purchase.
Amount is in the smallest currency unit (halalas). 10.00 SAR =
10001
Create a Card Payment
Enter the payment details and card information. The test card number 4111111111111111 is a Visa test card that works in the staging environment.
Verify in Dashboard
Open the Moyasar STAGING Dashboard to confirm the payment appears with the correct status and details.
What happened?
- You sent a
POST /v1/paymentsrequest with card details as thesourceobject. - Moyasar processed the card through the payment gateway and returned a payment object with a unique
id. - Because no
manualflag was set, the funds were captured immediately (purchase flow). - The
statusfield tells you if it succeeded (paid), failed, or is pending 3DS authentication (initiated).