How to add a new Authorised Charge

An authorised charge verifies that the credit card or bank account associated is valid and that there are enough funds available. All authorised payments can be captured or cancelled in the future.

From the PayDock Dashboard

  1. Log into your Paydock Production or Sandbox account;
  2. Navigate to Charges from the menu on the left;
  3. Switch to the Add new tab;
  4. Choose the Pre-Auth option from the drop-down list from the Select Payment Type section;

5. Fill in the details of the charge* ;

6. Click Create Charge.

Success! 

* Every service (gateway) has a set of required fields. If you miss one of them, the charge will not be created. To prevent it, please check here what fields are mandatory to fill in.

Note: Not all gateways support authorization. The list of gateways that support this type of charge can be found here: MasterCard, Stripe, Fiserv, EMS, CyberSource.

From the Paydock API

Make a POST /v1/charges?capture=false request passing in required parameters. The example of the request can be found here:

curl --location -g --request POST '{{url}}/v1/charges?capture=false' \
--header 'x-user-secret-key: {{secretkey}}' \
--header 'Content-Type: application/json' \
--data-raw '{
   "amount": "10.00",
   "currency": "AUD",
   "customer": {
       "payment_source": {
           "gateway_id": "5cbede1f151b842653e987be",
           "card_name": "Wanda Mertz",
           "card_number": "4242424242424242",
           "expire_month": "01",
           "expire_year": "21",
           "card_ccv": "123"
       }
   }
}'<br>

How to capture an authorised charge

If you need to capture an existing authorised charge, i.e. to make an actual payment, it is easy to process a payment:

  1. Log into your Paydock Production or Sandbox account;
  2. Navigate to Charges from the menu on the left;
  3. Find the authorised charge you would like to capture;
  4. Click Actions > Capture;
  5. Success! The charge is captured.

From the Paydock API

Make a POST /v1/charges/:id/capture request passing in required parameters. You can find the capture request below:

curl --location -g --request POST '{{url}}/v1/charges/charge_id/capture' \
--header 'x-user-secret-key: {{secretkey}}' \
--header 'Content-Type: application/json' \
--data-raw ''<br>

How to cancel an authorised charge

Should you need to cancel an authorisation or void a charge instead of completing the payment, please use these steps:

  1. Log into your Paydock Production or Sandbox account;
  2. Navigate to Charges from the menu on the left;
  3. Find the authorised charge you would like to cancel;
  4. Click Actions > Cancel;
  5. Success! The charge is canceled.

From the Paydock API

Make a DELETE /v1/charges/:id/capture request passing in required parameters. The cancel request can be found here:

curl --location -g --request DELETE '{{url}}/v1/charges/charge_id/capture' \
--header 'x-user-secret-key: {{secretkey}}' \
--header 'Content-Type: application/json' \
--data-raw ''<br>
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us