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​
- Open your Swan Dashboard.
- Go to Developers > Event Simulator.
- Go to Merchant profiles.
- Go to the tab to update the merchant profile status.
- 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.
- Open your Swan Dashboard.
- Go to Developers > Event Simulator.
- Go to Merchant payments.
- Go to the tab to update the merchant payment method status.
- 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:
- Open the API Explorer.
- Go to the Testing API.
- Use the
simulateMerchantPaymentMethodRequestOutcomemutation. - 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: