Skip to main content

Get transaction details

Get transaction details for a Swan International Credit Transfer.

Use the internationalCreditTransferTransactionDetailsDynamicForm query to find out what information you'll need to include about your transaction when you initiate your transfer.

Example only

This example is for illustrative purposes only using United States Dollars (USD) and the FedwireLocal route.

The required key/value pairs change based on currency, country, and route. Additionally, the pairs aren't controlled by Swan and can change without advance notice.

Step 1: Call query​

  1. Call the internationalCreditTransferTransactionDetailsDynamicForm query.
  2. Enter the beneficiary's name, as well as the currency and route.
  3. Enter all beneficiary information, including the key/value pairs from the internationalBeneficiaryDynamicForms query (lines 8-16).
    • Note: Even if you are testing this feature in Sandbox, the abartn (Fedwire routing number) and accountNumber keys must contain valid numbers.
  4. In the amount object, enter the value and currency. Also, choose a language.
  5. Add all desired fields. Make sure to include remainingFieldsToRefreshCount for the whole query, plus refreshDynamicFieldsOnChange for each field type.

Note: The sample doesn't include all API unions, but they're included if you open the query in API Explorer.

🔎 Open the query in API Explorer

query TransactionDetailsDynamicForm {
internationalCreditTransferTransactionDetailsDynamicForm(
internationalBeneficiary: {
name: "Emilia Brunner"
currency: "USD"
route: FedwireLocal
details: [
{ key: "legalType", value: "PRIVATE" }
{ key: "abartn", value: "$FEDWIRE_ROUTING_NUMBER" }
{ key: "accountNumber", value: "$ACCOUNT_NUMBER" }
{ key: "accountType", value: "CHECKING" }
{ key: "address.country", value: "US" }
{ key: "address.city", value: "Utica" }
{ key: "address.firstLine", value: "1 Canoga Blvd" }
{ key: "address.state", value: "NY" }
{ key: "address.postCode", value: "13505" }
]
}
targetAmount: { value: "500", currency: "USD" }
language: en
) {
remainingFieldsToRefreshCount
fields {
key
name
required
}
}
}

Step 2: Review first payload​

The query example results in the following response.

In this case, there are no remainingFieldsToRefreshCount, and only one additional (optional) key/value pair. Please remember that your real query responses can be different.

{
"data": {
"internationalCreditTransferTransactionDetailsDynamicForm": {
"fields": [
{
"key": "reference",
"name": "Transfer reference",
"required": false,
"displayFormat": null,
"example": null,
"maxLength": 30,
"minLength": null,
"refreshDynamicFieldsOnChange": false,
"validationRegex": null
}
],
"remainingFieldsToRefreshCount": 0
}
}
}

Step 3: Repeat​

If remainingFieldsToRefreshCount isn't zero, update all dynamicFields with the required key/value pairs and run the query again. Refer to steps three and four of the beneficiary query guide for examples.

Repeat until "remainingFieldsToRefreshCount": 0.

Step 4: Compile beneficiary input​

Keep your list of transaction details key/value pairs ready. You'll need them to initiate your transfer.

Transaction details input example

{...}

internationalCreditTransferDetails: {
key: "reference"
value: "Your reference message"
}

{...}