English
API ReferenceSign In

Making Payment

Last updated 06/11/2020
SCENARIOSTEPS
Simulate scenario wherein the channel is having a downtimeSend a POST to `/direct_debits/` with the following parameter values: payment_method_id: {{any valid payment method}}, amount: 11000 Values for other parameters are arbitrary as long as they follow and consistent with validation rules (e.g. consistent payment method currency and channel_code). This should return an error:  “503 CHANNEL AVAILABLE”
Simulate an end-customer doing a transaction that exceeds the channel’s allowed daily limitSend a POST to `/direct_debits/` with the following parameter values: payment_method_id: {{any valid payment method}}, amount: 11001 Values for other parameters are arbitrary as long as they follow and consistent with validation rules (e.g. consistent payment method currency and channel_code) This should return a JSON with pending status then sends a payment failure webhook with failure code :  “MAX_AMOUNT_LIMIT_ERROR”
Simulate a direct debit but fails due to having an insufficient balance on the end-customer’s account Send a POST to `/direct_debits/` with the following parameter values: payment_method_id: {{any valid payment method}}, amount: 11002 Values for other parameters are arbitrary as long as they follow and consistent with validation rules (e.g. consistent payment method currency and channel_code) This should return a JSON with pending status then sends a payment failure webhook with failure code :  “INSUFFICIENT_BALANCE”
Simulate scenario where the channel failed to send an OTP to the end-customerSend a POST to `/direct_debits/` with the following parameter values: payment_method_id: {{any valid payment method}}, amount: 11003 Values for other parameters are arbitrary as long as they follow and consistent with validation rules (e.g. consistent payment method currency and channel_code). This should return a JSON with pending status then sends a payment failure webhook with failure code :  “OTP_DELIVERY_ERROR”
Simulate a direct debit where the channel has blocked access to the account Send a POST to `/direct_debits/` with the following parameter values: payment_method_id: {{any valid payment method}}, amount: 11004 Values for other parameters are arbitrary as long as they follow and consistent with validation rules (e.g. consistent payment method currency and channel_code) This should return a JSON with pending status then sends a payment failure webhook with failure code :  “ACCOUNT_ACCESS_BLOCKED”
Simulate a successful payment using a correct OTPSend a POST to `/direct_debits/{direct_debit_id}/validate_otp` with the following parameter values: otp_code: 222000 Make sure that the direct debit ID provided is valid and PENDING. This should return a JSON with PENDING status. 
Simulate an incorrect OTP is providedSend a POST to `/direct_debits/{direct_debit_id}/validate_otp` with the following parameter values: otp_code: 222000 Make sure that the direct debit ID provided is valid and PENDING. This should return  “400 INVALID_OTP_ERROR”
Simulate an expired OTPSend a POST to `/direct_debits/{direct_debit_id}/validate_otp` with the following parameter values: otp_code: 222001 Make sure that the direct debit ID provided is valid and PENDING. This should return  “400 EXPIRED_OTP_ERROR”
Simulate when the end-customer reaches the channel’s limit on OTP attempts Send a POST to `/direct_debits/{direct_debit_id}/validate_otp` with the following parameter values: otp_code: 222002 Make sure that the direct debit ID provided is valid and PENDING. This should return  “400 MAX_OTP_ATTEMPTS_ERROR”
Simulate an incorrect OTP is providedSend a POST to `/direct_debits/{direct_debit_id}/validate_otp` with the following parameter values: otp_code: {{any otp_code not specified here}} Make sure that the direct debit ID provided is valid and PENDING. This should return  “400 INVALID_OTP_ERROR”