Skip to main content

Testing Guideline and Scenarios

Overview

  1. To perform Accept Payment testing, start by retrieving the API Secret Key from Flip for Business dashboard.
  2. Configure your callback URL in the Callback section in Developer menu - Manage API.
  3. Follow and refer to our API Reference page for details on the request requirements.

Payment Flow

Send a 'POST' request to Create Bill API using your API Secret Key.

Sample Request :

curl -X POST 'https://bigflip.id/big_sandbox_api/v2/pwf/bill' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-H 'Authorization: Basic <Base64(YourSecretKey + :)>' \
-d 'title=Testing Payment 123' \
-d 'type=SINGLE' \
-d 'amount=150000' \
-d 'step=1'

If Create Bill successful you will receive a 200 response, where the link_id and link_url are provided and not null, and the status is ACTIVE.

Sample Response :

{
"link_id": 141815,
"link_url": "flip.id/pwf-sandbox/$testflip/#testingpayment123-2408",
"title": "Testing Payment 123",
"type": "SINGLE",
"amount": 150000,
"redirect_url": "",
"expired_date": null,
"created_from": "API",
"status": "ACTIVE",
"is_address_required": 0,
"is_phone_number_required": 0,
"step": 1
}
info

In Create Bill Step 3 or direct_api, the status parameter in the API response will be INACTIVE, as the transaction has already been created by this step.

2. Simulate Transaction and Payment

Open the payment link provided in the link_url parameter (e.g., https://flip.id/pwf-sandbox/$fliptechlenterainspirasipertiwi-1/#testnewbill-2536) and proceed to simulate a payment. Please be aware that in the production environment, if you're using the step 3 integration, the link_url will not be functional.

Image 1Image 2Image 3

In Sandbox/Test Mode the callback will be triggered after you click "Berhasil" or "Gagal" in the payment url. After that, you'll be redirected to the redirec_url and receive a payment callback.

data= {
"id": "PGPWF10117294788345481551",
"bill_link_id": 130110,
"bill_link": "flip.id/pwf-sandbox/$fliptechlenterainspirasipertiwi-1/#testnewbill-2536",
"bill_title": "Test New Bill ",
"sender_name": "User test",
"sender_email": "[email protected]",
"sender_bank": "cimb",
"sender_bank_type": "virtual_account",
"amount": 45000,
"status": "SUCCESSFUL",
"created_at": "2024-10-21 09:47:14"
}&token=$2y$13$LpNOJzwDLjamSn0C5.85u.F6IN67QC8JYcqDnuw5vD9ws68kXfN0i

Testing Scenarios

You can simulate positive and negative test scenario in Test Mode/Sandbox. Please refer to the list for supported scenarios below for testing.

Positive Scenarios

ScenarioCriteriaExpected Result
Success Create Bill - Checkout
  • type :SINGLE
  • amount : 10000
Bill created with status Active
Success Create Bill - Checkout Seamless
  • type : SINGLE
  • amount : 10000
  • step : 2 or checkout_seamless
Bill created with status Active
Success Create Bill - Direct API
  • type : SINGLE
  • amount : 10000
  • step : 3 or direct_api
Bill created and API response received with bill_payment information
Success Redirect to Flip's Checkout page
  • type : SINGLE
  • amount : 10000
  • step : 2 checkout_seamless or 3 direct_api
  • step : open or redirect user to the link_url
Payment link display Flip's checkout page
Successful Payment

Simulate payment and trigger callback by clicking Berhasil in Flip's checkout page or Force Success in Flip Dashboard

Callback with status SUCCESSFUL received

Negative Scenarios

ScenarioCriteriaExpected Result
Create Bill - Amount is less than minimum
  • type :SINGLE
  • amount : 1000
  • step : 3 or direct_api
  • sender_bank : mandiri
  • sender_bank_type : virtual_account
Create Bill API Response received with error message "The amount is less than the minimum amount for this payment method, please use another payment method"
Create Bill - Exceed max amount limit
  • type : SINGLE
  • amount : > 10.000.000
Create Bill API Response received with error message "Maximum transfer amount is Rp10.000.000"
Failed Payment

Simulate payment and trigger callback by clicking Gagal in Flip's checkout page or Force Failed in Flip Dashboard

Callback with status FAILED received
Create Bill - Failed using Bank Transfer
  • type : SINGLE
  • amount : 15000
  • step : 3 or direct_api
  • sender_bank : mandiri
  • sender_bank_type : bank_transfer
Create Bill API Response received with error message "Cannot create bank transfer transaction in bill link step 3"
Create Bill - Invalid sender_bank
  • type : SINGLE
  • amount : 15000
  • step : 3 or direct_api
  • sender_bank : permata_va
  • sender_bank_type : virtual_account
Create Bill API Response received with error message "Cannot create transaction with the chosen bank because it is not enabled"