Deposits
To test card and PayJustNow payments you can use the details provided on the test cards page
Hosted Payment Page
To use the hosted you need to call the checkoutLink
query. This will generate a link to redirect your users
to.
Once the user has completed an action they will be redirected to the success or failure urls you provided when configuring your application.
Response
The url changes between Development/SIT and Production and is only valid for 15 minutes from point of creation and should not be cached or altered.
Payment Gateway Selection
While the list of available payment gateways can be controlled in the application settings it can also be set at an api level. This allows the payment options to be dynamically configured e.g. allow only specific payment options for some products.
The selection of payment gateways can be customised based on custom criteria by specifying the paymentMethods with the
request. This is passed as an array and can contain any of the following EFT
, INSTANT_EFT
, CARD
, SNAP
and PJN
methods.
Payment Thresholds
When making a payment different gateways are subject to different thresholds and may be hidden if the deposit amount exceeds the threshold.
EFT: No limit
Instant EFT: R50 - R 2 000 000
Card: R50 - R 25 000
SnapScan: R50 - R 25 000
PayJustNow: R5000 - R 100 000
Redirects
When using redirect urls additional information is now passed as part of the redirect in the form of query parameters.
Success
Parameters
status: Result of payment
method: Method of payment used
transactionId: ID of the transaction
reference: Custom ref set during transaction creation
Failure
Parameters
status: Result of payment
reason: Reason for the failed payment
transactionId: ID of the transaction
reference: Custom ref set during transaction creation
Cancelled
Parameters
status: Result of payment
reason: Reason for the failed payment
transactionId: ID of the transaction
reference: Custom ref set during transaction creation
Embedding the payment page
Embedding is a relatively new feature and we welcome any feedback to help improve this feature.
The payment page can also be embedded in your application. This can be done by adding the embed
option in the request.
Response
Notifications
When using the embed page in a frame the page will call parent.postMessage
for success, failure and cancelled results.
Your app will require a listener to capture the statues.
The origin url will change between development/sandbox and production.
The following information is sent with each response is as follows:
Success
Failure
Cancelled
Using funds from a Wallet
If a token has a sufficient balance, the funds can be used to pay for a transaction, the deposit will not be processed otherwise.
You can check the available balance of token by querying the token directly.
Create a deposit using funds from the buyers wallet
Query
Result
After the deposit is created a deposit object is returned. The initial processing status will be false while TradeSafe checks the buyers wallet and allocates the funds to the transaction.
Once the funds are allocated a callback is sent with a FUNDS_RECEIVED
state.
The deposit can be checked by querying the transaction.