在PayPal中创建客户

I was working on PayPal and wanted to know some things about PayPal that we can do in Stripe through Golang API:

  1. can we create a customer through PayPal Go API and then attach card to it? Now What I have integrated is saved a card directly into PayPal vault and start transactions from the saved card. I have gone through the documentation of Go API and found no docs there about customer creation through API. PayPal API Docs
  2. When we fill card details, is it possible we return a card nonce/token from the PayPal api so that the token represents all the card info?
  3. Can I set a card to default card of the customer through PayPal Go API?

I need to know all of the above points through Go API. Can anyone guide me upon how can I do all of the above if is possible ??

From what I can gather you:

Create the order with intent to CAPTURE

POST /v2/checkout/orders
{
    "intent": "CAPTURE",
    "purchase_units": [
    {
      "amount": {
        "currency_code": "USD",
        "value": "1.00"
      }
    }
  ]
}

Then CAPTURE the order

POST /v2/checkout/orders/<OrderId>/capture
{
    "payment_source": {
     "token": {
       "id": "VAULT CARD ID HERE",
       "type": "PAYMENT_METHOD_TOKEN"
     }
   }
}

This is as far as I have gotten because I am getting a 500 error currently