Paycose Docs
Payment Method
POST/onetime/payment_methods

Create OneTime Payment Method Session

Body — CreatePaymentMethodDTO: card_token, type.

Request

Example

curl -X POST 'https://api.paycose.com/api/v1/app1/platform/wallet/onetime/payment_methods/' \
  -H 'Content-Type: application/json' \
  -d '{
  "card_token": "",
  "cvc": "<string>",
  "type": "card",
  "metadata": {},
  "return_url": "<string>"
}'

Headers

NameValue
Content-Typeapplication/json

Body

NameTypeValue
card_tokenstring
cvcstring<string>
typestringcard
metadataobject{…}
return_urlstring<string>
{
  "card_token": "",
  "cvc": "<string>",
  "type": "card",
  "metadata": {},
  "return_url": "<string>"
}

Responses

200200 OK

Headers

NameValue
Content-Typeapplication/json

Body

{
  "id": "<string>",
  "object": "<string>",
  "livemode": false,
  "created_at": null,
  "updated_at": null,
  "customer_id": "<string>",
  "card_holder_name": "<string>",
  "last4": "<string>",
  "fingerprint": "<string>",
  "exp_month": 0,
  "exp_year": 0,
  "type": "<string>",
  "brand": "<string>",
  "card": {
    "brand": "<string>",
    "issuer": "<string>",
    "last4": "<string>",
    "exp_month": 0,
    "exp_year": 0
  },
  "billing_details": {},
  "allow_redisplay": "<string>",
  "reference_id": "<string>",
  "provider": "<string>",
  "metadata": {},
  "labels": "<core.Labels>",
  "customer": {
    "id": "<string>",
    "object": "<string>",
    "livemode": false,
    "created_at": null,
    "updated_at": null,
    "name": "<string>",
    "email": "<string>",
    "phone": "<string>",
    "address": {
      "city": "<string>",
      "country": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "postal_code": "<string>",
      "state": "<string>"
    },
    "shipping": {
      "name": "<string>",
      "phone": "<string>",
      "address": {
        "city": "<string>",
        "country": "<string>",
        "line1": "<string>",
        "line2": "<string>",
        "postal_code": "<string>",
        "state": "<string>"
      }
    },
    "is_system": false,
    "is_application_customer": false,
    "capabilities": {
      "charge": false,
      "transfer": false,
      "payout": false
    },
    "tax_ids": [
      {
        "type": "<string>",
        "value": "<string>",
        "country": "<string>",
        "verification_status": "<string>"
      }
    ],
    "metadata": {},
    "labels": "<core.Labels>",
    "invoice_settings": {},
    "tax_exempt": "<string>",
    "preferred_locales": [
      "<string>"
    ],
    "business_name": "<string>",
    "currency": "<string>"
  },
  "provider_connection_status": "<string>",
  "needs_recollection": false
}
202202 Accepted

Headers

NameValue
Content-Typeapplication/json

Body

{
  "object": "<string>",
  "setup_intent_id": null,
  "status": "<string>"
}
400400 Bad Request

Headers

NameValue
Content-Typeapplication/json

Body

{
  "object": "error",
  "code": "<string>",
  "key": "<string>",
  "i18n_key": "<string>",
  "message": "<string>",
  "request_id": "<string>"
}
500500 Internal Server Error

Headers

NameValue
Content-Typeapplication/json

Body

{
  "object": "error",
  "code": "<string>",
  "key": "<string>",
  "i18n_key": "<string>",
  "message": "<string>",
  "request_id": "<string>"
}

On this page