English
API ReferenceSign In

Account Linking

Last updated 06/11/2020
SCENARIOSTEPS
Successful Initialization  - Debit CardSend a POST to `/linked_account_tokens/` with the following parameter values: channel_code: “DC_BRI”, customer_id: {{any}}, properties: {account_mobile_number: {{any +62 format}}, card_last_four: 8888, card_expiry: {{any in MM/YY format}}, account_email: test.email@xendit.co} Values for other parameters are arbitrary as long as they follow and consistent with validation rules. This should return a successful linked account token response. 
Successful Initialization  - Bank AccountSend a POST to `/linked_account_tokens/` with the following parameter values: channel_code: “BA_BPI”, customer_id: {{any}}, properties: {success_redirect_url: {{any}}, failure_redirect_url: {{any}}, callback_url: {{any}},} Values for other parameters are arbitrary as long as they follow and consistent with validation rules. This should return a successful linked account token response. 
Successful bank account authorization (single account)In the rendered “authorizer_url”, on the Money Bank login screen, input the following credentials:  Username: 91284 Password: strongpassword This should redirect you to the provided “success_redirect_url”
Simulate error while linking bank accountIn the rendered “authorizer_url”, on the MoneyBank login screen, input the following credentials:  Username: 28284 Password: badpassword This should redirect you to the provided “failure_redirect_url”
Bank failed to deliver OTP to end-customerSend a POST to `/linked_account_tokens/` with the following parameter values: channel_code: “DC_BRI”, customer_id: {{any}}, properties: { account_mobile_number: {{any +62 format}}, card_last_four: 0011, card_expiry: {{any in MM/YY format}}, account_email: {{any}}} Values for other parameters are arbitrary as long as they follow and consistent with validation rules. This should return an error:  “400 OTP_DELIVERY_ERROR” 
Issue with customer account, customer bank blocked account accessSend a POST to `/linked_account_tokens/` with the following parameter values: channel_code: “DC_BRI”, customer_id: {{any}}, properties: { account_mobile_number: {{any +62 format}}, card_last_four: 0012, card_expiry: {{any in MM/YY format}}, account_email: {{any}}} Values for other parameters are arbitrary as long as they follow and consistent with validation rules. This should return an error:  “400 ACCOUNT_ACCESS_BLOCKED”
Successful account linking - OTP successSend a POST to `/linked_account_tokens/{linked_account_token_id}/validate_otp` with the following parameter values: otp_code: 333000 Make sure that the provided `id` is a valid linked account token id. This should return a successful linked account token response
Customer enters expired OTPSend a POST to `/linked_account_tokens/{linked_account_token_id}/validate_otp` with the following parameter values: otp_code: 333001 Make sure that the provided `id` is a valid linked account token id. This should return an error:  “400 EXPIRED_OTP_ERROR”
Maximum OTP attempt has been reachedSend a POST to `/linked_account_tokens/{linked_account_token_id}/validate_otp` with the following parameter values: otp_code: 333002 Make sure that the provided `id` is a valid linked account token id. This should return an error:  “400 MAX_OTP_ATTEMPTS_ERROR”
Customer enters invalid OTPSend a POST to `/linked_account_tokens/{linked_account_token_id}/validate_otp` with the following parameter values: otp_code: {{any 6 digits not in 333000 - 333002}} Make sure that the provided `id` is a valid linked account token id. This should return an error:  “400 INVALID_OTP_ERROR”