Developer

Partner Docs

Merchant Docs

Getting Started with Payments

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:

  1. Prerequisites and Setup: Get your account and credentials ready
  2. Choose Your Payment Type: Understand single payments vs mandates
  3. Create Your First Payment: Make your first API call
  4. Handle Customer Flow: Guide customers through authorization
  5. Monitor and Test: Check payment status and test scenarios
  6. Error Handling: Implement robust error handling
  7. Go Live: Deploy to production with confidence

Step 1: Prerequisites and Setup

Account Requirements

Before you begin, ensure you have:

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:

json
{
  "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.

Step 3: Create Your First Payment

For one-time payments, create a payment session with complete payment details:

bash
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

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:

  1. Customer chooses their bank from the list of available providers
  2. Customer logs into their bank to authorize the payment
  3. Customer returns to your success or error URL depending on the payment status - see Redirects.

Choose your integration method:

Hosted Checkout

Complete hosted payment experience

Step 5: Monitor Payment Status

You can check the payment status at any time:

bash
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 yet
  • awaiting_authorization: Customer is authorizing with their bank
  • initiated: Bank has accepted the payment request
  • pending: Payment is processing
  • sent: Payment successful - money has left customer's account
  • failed: Payment unsuccessful
Full Payment States Guide

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

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
json
{
  "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 session
  • payment_result: Status of the payment (sent, failed, etc.)
  • banked-checkout-result: Result of the Banked checkout process
Checkout URL Handling Guide

Set Up Webhook Notifications (Recommended)

Set up webhooks to receive real-time payment status updates:

Key webhook events:

  • payment_session.initiated: Payment authorized by customer
  • payment_session.sent: Payment successful
  • payment_session.failed: Payment failed
  • payment_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
See `Payment Errors`

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.

bash
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
See `Security` for more information

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:

© 2025 Banked Ltd.

Dark Theme
PrivacyTerms