connect_gateway

This endpoint generates an onboarding URL, allowing you to do OAuth-style payment gateway connections within your own platform. Use the generated URL in the browser to direct a user through the process. When the user completes the connection, they will be redirected to the final_redirect with a status parameter.

The status can be 0 or 1 through 5. 0 indicates success, whereas other values indicate an error. If you get a non-zero response, please contact us.

Also, in the gateway resource, you'll see a fx:connect_gateway link. This endpoint will allow a user to reconnect the payment gateway, and needs only the final_redirect parameter.

Actions

POST Generate a connection payment_gateway URL
OPTIONS Get a response explaining which HTTP methods are supported

Properties (2)

type String · Required

Payment gateway name. For example, stripe_connect.

final_redirect String · Required

URL to redirect the user to after completion of the process.

https://api.foxycart.com/connect_gateway/{id}
Available via fx:connect_gateway on hosted_payment_gateway·fx:connect_gateway on payment_method_set

Example Representation

{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ]
  },
  "connection_url": "https://connect.stripe.com/oauth/authorize?client_id=ca_BWHoVBQvOxyBHRPSTZQzonT2gqeebt65&state=..."
}