createPayment

This mutation allows the creation of payment for a given invoice.

mutation{
  createPayment(invoiceID:"af7649f8-5c6e-4de4-b688-20a97b316726"
  paymentMethodID:"b2f5cdfd-3550-47ab-a5a2-e21731724ea7"
  metadata:{
    creditCardData:{
      keyID:"key1"
      encryptedData:"1"
    }
    cryptoData:{
      name:""
      description:""
      localPrice:{
        amount:1
        currency:"Ethereum"
      }
      billingDetails:{
        name:"Tony Green"
        city:"Lemberg"
        address1:"Shop"
        address2:"1"
        country:"PL"
        district:"MZ"
        postalCode:"848585"
      }
      redirectURL:"https://www.google.com"
      cancelURL:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent"
    }
    destinationAddress:"0xd79e8c99cb47e0813f2f2b71e840183027991bbd"
  }){
    id
    userID
    invoiceID
    processorPaymentID
    paymentMethodID
    status
    details{
      ... on CryptoPaymentDetails{
        hostedURL
      }
    }
  }
}
{
  "data": {
    "createPayment": {
      "id": "1718a465-5870-4391-bc86-e2b0a0c489b2",
      "userID": "196f2a18-30d8-4781-a372-83cdc966004f",
      "invoiceID": "af7649f8-5c6e-4de4-b688-20a97b316726",
      "paymentMethodID": "b2f5cdfd-3550-47ab-a5a2-e21731724ea7",
      "circlePaymentID": "a38b78b8-9ad5-4515-86ec-0f8d225dc128",
      "status": "pending"
    }
  }
}

Arguments

Name

Type

Description

Required

invoiceID

UUID1

The invoice ID.

Yes

paymentMethodID

UUID1

The payment method ID.

Yes

metadata

Object

Contains information from CreatePaymentMetadataInput

Yes

Returns

Name

Type

Description

Payment

Object

Contains all the information from Payment.

Example