Skip to main content

Initiate an International Credit Transfer

Send money around the world using an International Credit Transfer.

Prerequisites
  1. You ran the queries to get beneficiary information and transaction details, and have your key/value pairs ready to add to the mutation.
  2. Optional: You ran the internationalCreditTransferQuote query to understand how much you'll pay.
  3. You have a user access token.

Guide​

  1. Call the initiateInternationalCreditTransfer mutation.
  2. Add all beneficiary and transaction details key/value pairs.
  3. Add the route, as well as an optional Swan accountId or accountNumber.
  4. Add the InitiateInternationalCreditTransferResponseSuccessPayload success payload.
  5. Add the consent URL to the success payload (line 29): statusInfo > PaymentConsentPending > consent > consentUrl.
  6. Add rejections (not shown).

Mutation​

🔎 Open the mutation in API Explorer

mutation SendTransfer {
initiateInternationalCreditTransfer(
input: {
accountId: "$YOUR_ACCOUNT_ID"
internationalBeneficiary: {
name: "Emilia Brunner"
currency: "USD"
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" }
]
route: FedwireLocal
}
internationalCreditTransferDetails: {
key: "reference"
value: "Your reference message"
}
targetAmount: { value: "500", currency: "USD" }
consentRedirectUrl: "$YOUR_REDIRECT_URL"
}
) {
... on InitiateInternationalCreditTransferResponseSuccessPayload {
__typename
payment {
createdAt
id
statusInfo {
status
... on PaymentConsentPending {
__typename
consent {
consentUrl
}
}
}
}
}
}
}

Payload​

Assuming all required information was added correctly and there was no other reason for the mutation to fail (such as insufficient funds), you'll receive a success payload with all selected information.

This International Credit Transfer was initiated with the status ConsentPending (line 9). The consentUrl (line 12) is sent to your user by text message, unless your configuration is different.

{
"data": {
"initiateInternationalCreditTransfer": {
"__typename": "InitiateInternationalCreditTransferResponseSuccessPayload",
"payment": {
"createdAt": "2023-10-27T10:18:18.895Z",
"id": "fct_c64ada1e687a7e7cd6d24b32e0de0747",
"statusInfo": {
"status": "ConsentPending"
"__typename": "PaymentConsentPending",
"consent": {
"consentUrl": "https://identity.swan.io/consent?consentId=$CONSENT_ID&env=Sandbox",
},
"updatedAt": "2023-10-27T10:18:18.897Z"
}
}
}
}