Log inGet started
Airwallex logo
Home
Online Payments
Treasury
Transactional FX
Payouts
Issuing
Scale
Open Banking
Developer Tools
API Reference
Home
Developer Tools
Postman Collection
Make your first API call with no code
Event Simulations
Simulate deposits into your Global AccountSimulate payout status transitionSimulate connected account status transitionGenerate card issuing transactionsCode Block Demo (DON'T PUBLISH!!)

Code Block Demo (DON'T PUBLISH!!)

curl (shell)

multiple lines

curl --location --request POST 'https://api-demo.airwallex.com/api/v1/simulation/issuing/create' \
--header 'Authorization: Bearer [jwt_token]' \
--header 'Content-Type: application/json' \
--data-raw '{
    "card_id": "be816f8f-e9b1-4db9-9b5e-5a0c33a62099",
	"card_number": null,
	"transaction_amount": 1999,
	"transaction_currency": "AUD",
    "merchant_info": "Test transaction today 999"
}'

JavaScript

from api ref

import axios from 'axios';

const requestBody = {};

axios
  .request({
    url: 'https://api-demo.airwallex.com/api/v1/payments/create',
    method: 'post',
    headers: {
      'Authorization': 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNTI1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q',
      'Content-Type': 'application/json',
    },
    data: requestBody,
  })
  .then(({ data }) => { /* */ })
  .catch(error => { /* */ });

Python

from api ref

import http.client

conn = http.client.HTTPConnection("api-demo.airwallex.com:")

payload = """{
  "beneficiary": {
    "additional_info": {
      "business_area": "Travel"
    },
    "address": {
      "city": "Hong Kong",
      "country_code": "HK",
      "postcode": "999077",
      "state": "Hong Kong",
      "street_address": "38 Chengtu Rd"
    },
    "bank_details": {
      "account_currency": "HKD",
      "account_name": "John Walker",
      "account_number": "786005728434",
      "account_routing_type1": "bank_code",
      "account_routing_value1": "024",
      "bank_country_code": "HK",
      "bank_name": "Hang Seng Bank Limited"
    },
    "date_of_birth": "1976-08-26",
    "entity_type": "PERSONAL",
    "first_name": "John",
    "last_name": "Walker"
  },
  "payer": {
    "additional_info": {
      "business_registration_number": "EU300503"
    },
    "address": {
      "city": "Melbourne",
      "country_code": "AU",
      "postcode": "3000",
      "state": "VIC",
      "street_address": "15 Williams Street"
    },
    "company_name": "Complete Concrete Pty Ltd",
    "entity_type": "COMPANY"
  },
  "payment_amount": "10000",
  "payment_currency": "HKD",
  "payment_method": "LOCAL",
  "reason": "Travel",
  "reference": "PMT1936398",
  "request_id": "ff21c736-872d-45f6-a8c6-d8ccb664c641",
  "source_currency": "USD"
}"""

headers = {
  "Authorization": "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNTI1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q",
  "Content-Type": "application/json"
}

conn.request("POST", "/api/v1/payments/create", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

C#

from api ref

var client = new RestClient("https://api-demo.airwallex.com/api/v1/payments/create");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNTI1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", @"{
  ""beneficiary"": {
    ""additional_info"": {
      ""business_area"": ""Travel""
    },
    ""address"": {
      ""city"": ""Hong Kong"",
      ""country_code"": ""HK"",
      ""postcode"": ""999077"",
      ""state"": ""Hong Kong"",
      ""street_address"": ""38 Chengtu Rd""
    },
    ""bank_details"": {
      ""account_currency"": ""HKD"",
      ""account_name"": ""John Walker"",
      ""account_number"": ""786005728434"",
      ""account_routing_type1"": ""bank_code"",
      ""account_routing_value1"": ""024"",
      ""bank_country_code"": ""HK"",
      ""bank_name"": ""Hang Seng Bank Limited""
    },
    ""date_of_birth"": ""1976-08-26"",
    ""entity_type"": ""PERSONAL"",
    ""first_name"": ""John"",
    ""last_name"": ""Walker""
  },
  ""payer"": {
    ""additional_info"": {
      ""business_registration_number"": ""EU300503""
    },
    ""address"": {
      ""city"": ""Melbourne"",
      ""country_code"": ""AU"",
      ""postcode"": ""3000"",
      ""state"": ""VIC"",
      ""street_address"": ""15 Williams Street""
    },
    ""company_name"": ""Complete Concrete Pty Ltd"",
    ""entity_type"": ""COMPANY""
  },
  ""payment_amount"": ""10000"",
  ""payment_currency"": ""HKD"",
  ""payment_method"": ""LOCAL"",
  ""reason"": ""Travel"",
  ""reference"": ""PMT1936398"",
  ""request_id"": ""ff21c736-872d-45f6-a8c6-d8ccb664c641"",
  ""source_currency"": ""USD""
}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

Java

from api ref

HttpResponse<String> response = Unirest.post("https://api-demo.airwallex.com/api/v1/payments/create")
.header("Authorization", "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNTI1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q")
.header("Content-Type", "application/json")
.body("{
  \"beneficiary\": {
    \"additional_info\": {
      \"business_area\": \"Travel\"
    },
    \"address\": {
      \"city\": \"Hong Kong\",
      \"country_code\": \"HK\",
      \"postcode\": \"999077\",
      \"state\": \"Hong Kong\",
      \"street_address\": \"38 Chengtu Rd\"
    },
    \"bank_details\": {
      \"account_currency\": \"HKD\",
      \"account_name\": \"John Walker\",
      \"account_number\": \"786005728434\",
      \"account_routing_type1\": \"bank_code\",
      \"account_routing_value1\": \"024\",
      \"bank_country_code\": \"HK\",
      \"bank_name\": \"Hang Seng Bank Limited\"
    },
    \"date_of_birth\": \"1976-08-26\",
    \"entity_type\": \"PERSONAL\",
    \"first_name\": \"John\",
    \"last_name\": \"Walker\"
  },
  \"payer\": {
    \"additional_info\": {
      \"business_registration_number\": \"EU300503\"
    },
    \"address\": {
      \"city\": \"Melbourne\",
      \"country_code\": \"AU\",
      \"postcode\": \"3000\",
      \"state\": \"VIC\",
      \"street_address\": \"15 Williams Street\"
    },
    \"company_name\": \"Complete Concrete Pty Ltd\",
    \"entity_type\": \"COMPANY\"
  },
  \"payment_amount\": \"10000\",
  \"payment_currency\": \"HKD\",
  \"payment_method\": \"LOCAL\",
  \"reason\": \"Travel\",
  \"reference\": \"PMT1936398\",
  \"request_id\": \"ff21c736-872d-45f6-a8c6-d8ccb664c641\",
  \"source_currency\": \"USD\"
}")
.asString();

JSON

JSON highlighted as json

{
    "request_id": "41d31fc5-2072-42f7-b00b-7ea53e2fdf8e",
    "payment_id": "da5eea76-014e-4f6c-a26c-70d4204aab4b",
    "payment_currency": "CNY",
    "payment_amount": 1000.0,
    "source_amount": 157.2,
    "fee_currency": "USD",
    "fee_amount": 15,
    "fee_paid_by": "PAYER",
    "amount_payer_pays": 172.2,
    "amount_beneficiary_receives": 1000.0,
    "payment_date": "2022-03-25",
    "reason": "professional_business_services",
    "reference": "Test 37327415-c8ef-4ec5-9476-89e16f11e874",
    "payer": {
        "entity_type": "COMPANY",
        "company_name": "Alan API Test",
        "address": {
            "street_address": "Shanghai St, Shanghai St",
            "country_code": "CN",
            "postcode": "SH-09090",
            "state": "SH",
            "city": "Shanghai"
        },
        "additional_info": {
            "business_registration_type": "COMPANY",
            "business_registration_number": "665-01-1109",
            "business_incorporation_date": "1986-04-22"
        }
    },
    "beneficiary": {
        "entity_type": "COMPANY",
        "company_name": "Gulgowski and Sons",
        "address": {
            "street_address": "46894 Kevin Extensions",
            "country_code": "CN",
            "postcode": "25000",
            "state": "Olgaburgh",
            "city": "Arecibo"
        },
        "bank_details": {
            "bank_name": "Harvey - Wilkinson",
            "bank_country_code": "CN",
            "swift_code": "ABOCCNBJ",
            "account_name": "Robyn Quigley",
            "account_number": "39595870",
            "account_currency": "CNY"
        }
    },
    "short_reference_id": "P220325-066UTIE",
    "status": "FAILED",
    "failure_reason": "90202: Invalid SWIFT/BIC code",
    "failure_type": "INCORRECT_ROUTING",
    "created_at": "2022-03-25T01:33:19+0000",
    "last_updated_at": "2022-03-25T01:33:33+0000",
    "payment_method": "SWIFT",
    "swift_charge_option": "SHARED",
    "source_currency": "USD",
    "underlying_conversion_id": "a4272fc7-35b4-48f2-bf7a-33d20860a0e9",
    "additional_info": {
        "order_info_type1": [],
        "underlying_payments": []
    },
    "selling": true
}

JSON highlighted as javascript

{
    "request_id": "41d31fc5-2072-42f7-b00b-7ea53e2fdf8e",
    "payment_id": "da5eea76-014e-4f6c-a26c-70d4204aab4b",
    "payment_currency": "CNY",
    "payment_amount": 1000.0,
    "source_amount": 157.2,
    "fee_currency": "USD",
    "fee_amount": 15,
    "fee_paid_by": "PAYER",
    "amount_payer_pays": 172.2,
    "amount_beneficiary_receives": 1000.0,
    "payment_date": "2022-03-25",
    "reason": "professional_business_services",
    "reference": "Test 37327415-c8ef-4ec5-9476-89e16f11e874",
    "payer": {
        "entity_type": "COMPANY",
        "company_name": "Alan API Test",
        "address": {
            "street_address": "Shanghai St, Shanghai St",
            "country_code": "CN",
            "postcode": "SH-09090",
            "state": "SH",
            "city": "Shanghai"
        },
        "additional_info": {
            "business_registration_type": "COMPANY",
            "business_registration_number": "665-01-1109",
            "business_incorporation_date": "1986-04-22"
        }
    },
    "beneficiary": {
        "entity_type": "COMPANY",
        "company_name": "Gulgowski and Sons",
        "address": {
            "street_address": "46894 Kevin Extensions",
            "country_code": "CN",
            "postcode": "25000",
            "state": "Olgaburgh",
            "city": "Arecibo"
        },
        "bank_details": {
            "bank_name": "Harvey - Wilkinson",
            "bank_country_code": "CN",
            "swift_code": "ABOCCNBJ",
            "account_name": "Robyn Quigley",
            "account_number": "39595870",
            "account_currency": "CNY"
        }
    },
    "short_reference_id": "P220325-066UTIE",
    "status": "FAILED",
    "failure_reason": "90202: Invalid SWIFT/BIC code",
    "failure_type": "INCORRECT_ROUTING",
    "created_at": "2022-03-25T01:33:19+0000",
    "last_updated_at": "2022-03-25T01:33:33+0000",
    "payment_method": "SWIFT",
    "swift_charge_option": "SHARED",
    "source_currency": "USD",
    "underlying_conversion_id": "a4272fc7-35b4-48f2-bf7a-33d20860a0e9",
    "additional_info": {
        "order_info_type1": [],
        "underlying_payments": []
    },
    "selling": true
}

JSON not highlighted

{
    "request_id": "41d31fc5-2072-42f7-b00b-7ea53e2fdf8e",
    "payment_id": "da5eea76-014e-4f6c-a26c-70d4204aab4b",
    "payment_currency": "CNY",
    "payment_amount": 1000.0,
    "source_amount": 157.2,
    "fee_currency": "USD",
    "fee_amount": 15,
    "fee_paid_by": "PAYER",
    "amount_payer_pays": 172.2,
    "amount_beneficiary_receives": 1000.0,
    "payment_date": "2022-03-25",
    "reason": "professional_business_services",
    "reference": "Test 37327415-c8ef-4ec5-9476-89e16f11e874",
    "payer": {
        "entity_type": "COMPANY",
        "company_name": "Alan API Test",
        "address": {
            "street_address": "Shanghai St, Shanghai St",
            "country_code": "CN",
            "postcode": "SH-09090",
            "state": "SH",
            "city": "Shanghai"
        },
        "additional_info": {
            "business_registration_type": "COMPANY",
            "business_registration_number": "665-01-1109",
            "business_incorporation_date": "1986-04-22"
        }
    },
    "beneficiary": {
        "entity_type": "COMPANY",
        "company_name": "Gulgowski and Sons",
        "address": {
            "street_address": "46894 Kevin Extensions",
            "country_code": "CN",
            "postcode": "25000",
            "state": "Olgaburgh",
            "city": "Arecibo"
        },
        "bank_details": {
            "bank_name": "Harvey - Wilkinson",
            "bank_country_code": "CN",
            "swift_code": "ABOCCNBJ",
            "account_name": "Robyn Quigley",
            "account_number": "39595870",
            "account_currency": "CNY"
        }
    },
    "short_reference_id": "P220325-066UTIE",
    "status": "FAILED",
    "failure_reason": "90202: Invalid SWIFT/BIC code",
    "failure_type": "INCORRECT_ROUTING",
    "created_at": "2022-03-25T01:33:19+0000",
    "last_updated_at": "2022-03-25T01:33:33+0000",
    "payment_method": "SWIFT",
    "swift_charge_option": "SHARED",
    "source_currency": "USD",
    "underlying_conversion_id": "a4272fc7-35b4-48f2-bf7a-33d20860a0e9",
    "additional_info": {
        "order_info_type1": [],
        "underlying_payments": []
    },
    "selling": true
}

Multi-Code Block

An error occurred while rendering this component.
On this page
  • curl (shell)
  • JavaScript
  • Python
  • C#
  • Java
  • JSON
  • Multi-Code Block