Skip to main content

Sandbox for merchant profiles and payment methods

When testing your integration, you might need to simulate certain events with the Partner Testing API.

Simulate updating merchant profile status​

In Sandbox, you need to update the merchant profile status to Enabled.

Dashboard​

  1. Open your Swan Dashboard.
  2. Go to Developers > Event Simulator.
  3. Go to Merchant profiles.
  4. Go to the tab to update the merchant profile status.
  5. Change the merchant profile status to Enabled.

Testing API​

Enable a profile:

mutation SimulateProfileStatus {
simulateMerchantProfileRequestOutcome(input: {
merchantProfileId: "$YOUR_MERCHANT_PROFILE_ID"
merchantProfileStatus: Enabled
}) {
__typename
... on Rejection {
message
}
}
}

You can also test the rejection of a profile, by adding a rejection reason:

mutation SimulateProfileStatus {
simulateMerchantProfileRequestOutcome(input: {
merchantProfileId: "$YOUR_MERCHANT_PROFILE_ID"
merchantProfileStatus: Rejected
merchantProfileRejectionReason: SuspiciousBehavior
}) {
__typename
... on Rejection {
message
}
}
}

Simulate enabling a merchant payment method​

Dashboard​

In Sandbox, you need to update the merchant payment method status to Enabled.

  1. Open your Swan Dashboard.
  2. Go to Developers > Event Simulator.
  3. Go to Merchant payments.
  4. Go to the tab to update the merchant payment method status.
  5. Change the payment method status to Enabled.

Testing API​

mutation EnablePaymentMethod {
simulateMerchantPaymentMethodRequestOutcome(
input: {
merchantPaymentMethodId: "$PAYMENT_METHOD_ID"
merchantPaymentMethodStatus: Enabled
}
) {
__typename
... on Rejection {
message
}
}
}

Simulate requesting more information​

Swan may request extra information when reviewing a merchant payment method. To simulate these requests:

  1. Open the API Explorer.
  2. Go to the Testing API.
  3. Use the simulateMerchantPaymentMethodRequestOutcome mutation.
  4. Add merchantVerificationRequirements.
mutation SimulateRequestingMoreInfo {
simulateMerchantPaymentMethodRequestOutcome(
input: {
merchantPaymentMethodId: "$MERCHANT_PAYMENT_METHOD_ID"
merchantPaymentMethodStatus: WaitingForInformation
merchantVerificationRequirements: {
fields: [
MerchantWebsite
CustomerRegion
]
supportingDocumentPurposes: [
ProofOfCompanyIncome
CompanyRegistration
]
}
}
) {
__typename
... on Rejection {
message
}
... on ValidationRejection {
fields {
code
path
}
}
}
}

Simulate supporting documents​

When supportingDocumentPurposes are added to the verification requirements, a supporting documents collection is created on the merchant profile.

Refer to the guides: