Skip to main content
GET
/
api
/
external
/
v2
/
associate-shopify-customer-to-external-payment-gateways
Associate external payment gateway customer with Shopify customer
curl --request GET \
  --url https://subscription-admin.appstle.com/api/external/v2/associate-shopify-customer-to-external-payment-gateways
import requests

url = "https://subscription-admin.appstle.com/api/external/v2/associate-shopify-customer-to-external-payment-gateways"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://subscription-admin.appstle.com/api/external/v2/associate-shopify-customer-to-external-payment-gateways', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const url = 'https://subscription-admin.appstle.com/api/external/v2/associate-shopify-customer-to-external-payment-gateways';
const options = {method: 'GET'};

fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/associate-shopify-customer-to-external-payment-gateways",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://subscription-admin.appstle.com/api/external/v2/associate-shopify-customer-to-external-payment-gateways"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://subscription-admin.appstle.com/api/external/v2/associate-shopify-customer-to-external-payment-gateways")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "data": {
    "customerPaymentMethodRemoteUserInfoCreate": {
      "customerPaymentMethod": {
        "id": "gid://shopify/CustomerPaymentMethod/abc123",
        "instrument": {
          "__typename": "CustomerCreditCard",
          "brand": "VISA",
          "lastDigits": "4242"
        }
      },
      "userErrors": []
    }
  }
}

Headers

X-API-Key
string

Query Parameters

paymentGateway
string
required

Possible values (stripe, braintree, paypal, authorize_net)

customerId
integer<int64>

Id of the customer to associate payment method with

email
string

Email of the customer to associate payment method with

customerProfileId
string

Id of customer in external payment gateway, not required for Paypal

paymentProfileId
string
required

Card Id or payment profile Id in external payment gateway

Response

Successfully associated external payment gateway customer with Shopify customer. Returns Shopify GraphQL raw response.