This guide walks you through everything you need to accept payments with Banked, from initial setup to processing your first transaction. Whether you're implementing single payments for e-commerce or recurring payments for e-commerce or subscriptions, this guide covers both payment types.
This guide will walk you through these key steps:
- Prerequisites and Setup: Get your account and credentials ready
- Choose Your Payment Type: Understand single payments vs mandates
- Create Your First Payment: Make your first API call
- Handle Customer Flow: Guide customers through authorization
- Monitor and Test: Check payment status and test scenarios
- Error Handling: Implement robust error handling
- Go Live: Deploy to production with confidence
Step 1: Prerequisites and Setup
Account Requirements
Before you begin, ensure you have:
- A Banked merchant account (create account here)
- Access to your API credentials (view authentication guide)
- Access to the Bank account Ids that have been setup for you (create account here)
- A development environment for testing (development environment)
API Credentials
You'll receive two sets of credentials:
- Test Credentials: For sandbox environment testing
- Live Credentials: For production payments (available after due diligence)
API Request Headers
All API requests require these headers:
{ "Authorization": "Bearer <OAuth_short_lived_scoped_token>", "Content-Type": "application/json", "Idempotency-Key": "unique-request-uuid" }
Basic Authentication: Use "Basic <base64_encoded_credentials>"
instead of OAuth authentication if your API account has been setup for Basic Auth
Idempotency keys prevent duplicate operations. Use unique values for each request.
Test Bank Account
For test payments use the test bank account id provided to you by our support team.
Bank accounts are specific per region and should match the region you are testing in.
Base URL
The base URL for all API requests in sandbox or production is:
https://api.banked.com
Step 2: Choose Your Payment Type
Banked supports two payment types, each suited for different scenarios and regions:
Best for: e-commerce, invoice payments, service fees, donations
- Trigger a one-time payment
- Customer authorizes each payment individually
- Settles within minutes (AU can settle within seconds)
Available in AU, UK, and EU regions.
Best for: e-commerce, Subscription services, membership fees, installment payments, account on file payments
Recurring payments is where multiple payments can be triggered against one PayTo agreement and this is done with our mandates API.
- Create Payment API calls can be made against an active mandate
- Customer authorizes once, then payments process automatically
- Requires mandate setup before first payment
- Currently available in Australia, expanding to other regions
Available only in Australia for now, with plans to expand to other regions soon.
Step 3: Create Your First Payment
For one-time payments, create a payment session with complete payment details:
curl --location --request POST 'https://api.banked.com/v2/payment_sessions' \ --header 'Authorization: Bearer <OAuth_short_lived_scoped_token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: unique-request-id-123' \ --data-raw '{ "currency": "AUD", "error_url": "http://example.com/error", "success_url": "http://example.com/success", "reference": "Order123", "amount": 100, "description" : "Description value which displays in the payers internet banking", "payee": { "bank_account_id": "{{bank_account_id}}", "ultimate_party": { "name": "{{company_trading_name}}" } } }'
Single payments should be deleted if the payment doesn't proceed for any reason. See the payment deletion section
For recurring payments, you'll need to set up a mandate first, then create payments against it.
Prerequisite: Make sure an active mandate exists see our Mandates Overview for details on setting up and managing mandates.
curl --location --request POST 'https://api.banked.com/v2/payment_sessions' \ --header 'Authorization: Bearer <OAuth_short_lived_scoped_token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: unique-request-id-123' \ --data-raw '{ "reference": "Order123", "amount": 100, "mandate": { "token": "{{mandate_token_id}}" }, "payee": { "bank_account_id": "{{bank_account_id}}", "ultimate_party": { "name": "{{company_trading_name}}" } }, "actions": [ { "action_type": "init_attempt" } ] }'
Key Differences:
- Mandate payments don't require the
payee
field if set in the mandate (inherited from mandate). You can still override it if needed. - No customer interaction needed after mandate is active
- Must include
init_attempt
action to process automatically other you will have to manually initiate each payment using the actions endpoint.
Note: All amounts are in minor currency units (cents for USD/EUR/AUD, pence for GBP).
Refer to the API Reference for detailed field descriptions and optional fields.
Step 4: Customer Authorization Flow
Once you create a payment session, customers complete the authorization process:
- Customer chooses their bank from the list of available providers
- Customer logs into their bank to authorize the payment
- Customer returns to your success or error URL depending on the payment status - see Redirects.
Choose your integration method:
For recurring payments using mandates, the flow is slightly different:
- One-time setup: Customer authorizes recurring payments during mandate creation
- Ongoing Authorization: Future payments process without the payer needing to re-authorize
- Merchant notification: Merchants receive payment status notifications and can present or notify customers of payment success as needed
Choose your integration method:
Step 5: Monitor Payment Status
You can check the payment status at any time:
curl --location --request GET 'https://api.banked.com/v2/payment_sessions/{payment_id}' \ --header 'Authorization: Bearer <OAuth_short_lived_scoped_token>'
Key Payment States
awaiting_provider
: Customer hasn't selected a bank yetawaiting_authorization
: Customer is authorizing with their bankinitiated
: Bank has accepted the payment requestpending
: Payment is processingsent
: Payment successful - money has left customer's accountfailed
: Payment unsuccessful
Testing with Mock Bank
To simulate different payment scenarios, you can use the Mock Bank provider in the test environment. Visit the Banked Demo to see the payment flow in action.
Testing with Mock Bank
To simulate different payment scenarios, you can use the Mock Bank provider in the test environment. Visit the Banked Demo to see the payment flow in action.
For payments processed in Australia, you will need to use different account numbers to trigger different scenarios.
Always use BSB 111114
with one of the following account numbers:
Available test scenarios:
- Successful Payment:
050511
- Failed Payment:
050512
- Delayed Success:
303011
For payments processed in the UK or EU, you can use the Mock Bank provider to test various scenarios without needing real bank accounts. When you select Mock Bank as your payment provider you will be taken to a mock bank demo environment. At the bottom of the page you select the payment scenario you want to test by clicking 'Developer Options'.
Available test scenarios:
- Successful Payment (Default)
- Initiated
- Pending
- Pending With Delay
- Pending External Authorization
- Failure Generic
- Failure Expired
- Failure Declined
- Failure Insufficient Funds
- Settlement Incomplete
Pro tip: Test all failure scenarios to ensure your error handling works correctly before going live.
Handle Success and Error URLs
Configure your success and error URLs to handle payment outcomes:
- Success URL: Process successful payment confirmation
- Error URL: Handle payment failures and guide customer to alternative payment methods
{ "success_url": "https://yoursite.com/payment/success", "error_url": "https://yoursite.com/payment/error" }
Banked append the following query parameters to the redirect url after the authorization journey is complete:
payment_id
: Unique ID of the payment sessionpayment_result
: Status of the payment (sent
,failed
, etc.)banked-checkout-result
: Result of the Banked checkout process
Set Up Webhook Notifications (Recommended)
Set up webhooks to receive real-time payment status updates:
Key webhook events:
payment_session.initiated
: Payment authorized by customerpayment_session.sent
: Payment successfulpayment_session.failed
: Payment failedpayment_session.pending
: Payment is processing
Step 6: Error Handling / Payment Deletion
Error Handling Best Practices
- Always implement comprehensive error handling
- Provide clear error messages to users
- Log errors for debugging and monitoring
- Have fallback payment methods available
- Monitor payment success rates and set up alerts
Payment Deletion
If your using single payments and the payer doesn't proceed with the payment or if your website or application isn't proceeding with the payment then you should delete the payment to avoid the risk of the payment being processed at a later date.
curl --location --request DELETE 'https://api.banked.com/v2/payment_sessions/{payment_id}' \ --header 'Authorization: Bearer <OAuth_short_lived_scoped_token>' \ --header 'Content-Type: application/json' \
Step 7: Go Live
Pre-Launch Checklist
Complete these steps before accepting live payments:
- [ ] Complete due diligence process with Banked
- [ ] Receive live API credentials
- [ ] Update API endpoints to use production environment
- [ ] Configure live webhook endpoints with proper security
- [ ] Update payee account details to live accounts
- [ ] Test complete payment flow in live environment
- [ ] Set up monitoring and alerting systems
- [ ] Verify all error handling works correctly
Production Testing: Always test your complete integration in production with small amounts before full launch.
Best Practices Summary
Security
- Always use HTTPS for all API requests
- Store API credentials securely (use environment variables)
- Implement webhook signature verification
- Use idempotency keys for all payment creation requests
User Experience
- Include customer name and email in payer field for faster checkout
- Use clear, descriptive payment references
- Set appropriate success/error URLs with meaningful content
- Provide alternative payment methods as fallback
Next Steps
Now that you've completed your first payment integration, explore these advanced features:
- Payment Webhooks - Set up real-time notifications
- Payment States - Understand all possible payment states
- Payment Errors - Comprehensive error handling guide