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.
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​
- Call the
internationalCreditTransferTransactionDetailsDynamicForm
query. - Enter the beneficiary's
name
, as well as thecurrency
androute
. - 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) andaccountNumber
keys must contain valid numbers.
- Note: Even if you are testing this feature in Sandbox, the
- In the
amount
object, enter thevalue
andcurrency
. Also, choose alanguage
. - Add all desired fields. Make sure to include
remainingFieldsToRefreshCount
for the whole query, plusrefreshDynamicFieldsOnChange
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.
{...}
internationalCreditTransferDetails: {
key: "reference"
value: "Your reference message"
}
{...}