payment_methods

Create a payment method

Changed on

Create a payment method

post/payment_methods

Request

  • Base URL
    https://{your_organization_slug}.commercelayer.io/api
  • URL
    https://{your_organization_slug}.commercelayer.io/api/payment_methods
  • Auth
    HTTP bearer

Request body

Example request

{
  "data": {
    "attributes": {
      "name": "Stripe Payment",
      "payment_source_type": "stripe_payments",
      "currency_code": "EUR",
      "require_capture": true,
      "auto_place": true,
      "_disable": true,
      "_enable": true,
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      }
    },
    "relationships": {
      "market": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "payment_gateway": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "store": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      }
    }
  }
}

Response

The created payment method object

Changes

    • breaking

      added the new required request property ///

    • breaking

      added the new required request property ///

    • breaking

      request property // was restricted to a list of enum values

    • breaking

      request property / was restricted to a list of enum values

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      the request property default value payment_methods was removed

    • info

      added the new adyen_payments enum value to the request property //

    • info

      added the new axerve_payments enum value to the request property //

    • info

      added the new braintree_payments enum value to the request property //

    • info

      added the new checkout_com_payments enum value to the request property //

    • info

      added the new external_payments enum value to the request property //

    • info

      added the new klarna_payments enum value to the request property //

    • info

      added the new payment_methods enum value to the request property /

    • info

      added the new paypal_payments enum value to the request property //

    • info

      added the new satispay_payments enum value to the request property //

    • info

      added the new stripe_payments enum value to the request property //

    • info

      added the new wire_transfers enum value to the request property //

    • info

      added the media type application/vnd.api+json for the response with the status