createPaymentMethod

This mutation allows the user to create a payment method.

Sample mutation

mutation{
  createPaymentMethod(orgID:"a1dc174d-abf4-47d3-be3c-9281c6eba456" input:{
    paymentType:CreditCard
    creditCardData:{
      keyID:"key1"
      encryptedData:"1"
      billingDetails:{
        name:"Tony Green"
        city:"Lemberg"
        address1:"Shop"
        address2:"1"
        country:"PL"
        district:"MZ"
        postalCode:"848585"
      }
      expirationYear:2025
      expirationMonth:4
      metadata:{
        email:"[email protected]"
        phoneNumber:"+146952354765"
      }
    }
  }){
    ... on CreditCardPaymentMethodOutput{
      id
      type
      status
      network
      last4Digit
      metadata{
        email
        phoneNumber
      }
      billingDetails{
        address1
        address2
        name
        country
        district
        city
        postalCode
      }
    }
  }
}

Arguments

NameTypeDescriptionRequired
orgIDUUID1The organization ID.Yes
inputObjectThe input to create payment method.Yes

Return

NameTypeDescription
PaymentMethodOutputObjectContains information from CreditCardPaymentMethodOutput, ACHPaymentMethodOutput ,and WirePaymentMethodOutput.