RailzwayDocs
API referenceFare API v1

Payments

GET
/v1/providerConnections

Query Parameters

pageSize?integer
Formatint32
pageToken?string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/providerConnections"
{  "nextPageToken": "string",  "providerConnections": [    {      "capabilities": {        "countryCodes": [          "string"        ],        "currencyCodes": [          "string"        ],        "paymentMethodTypes": [          "PAYMENT_METHOD_TYPE_UNSPECIFIED"        ],        "supportsOffSession": true,        "supportsRecurring": true      },      "createTime": "2019-08-24T14:15:22Z",      "displayName": "string",      "healthStatus": "PROVIDER_HEALTH_STATUS_UNSPECIFIED",      "name": "string",      "providerType": "string",      "status": "PROVIDER_CONNECTION_STATUS_UNSPECIFIED",      "updateTime": "2019-08-24T14:15:22Z"    }  ]}
POST
/v1/providerConnections

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/providerConnections" \  -H "Content-Type: application/json" \  -d '{    "credential": {},    "parent": "string",    "providerConnection": {      "displayName": "string",      "providerType": "string"    },    "providerConnectionId": "string"  }'
{  "capabilities": {    "countryCodes": [      "string"    ],    "currencyCodes": [      "string"    ],    "paymentMethodTypes": [      "PAYMENT_METHOD_TYPE_UNSPECIFIED"    ],    "supportsOffSession": true,    "supportsRecurring": true  },  "createTime": "2019-08-24T14:15:22Z",  "displayName": "string",  "healthStatus": "PROVIDER_HEALTH_STATUS_UNSPECIFIED",  "name": "string",  "providerType": "string",  "status": "PROVIDER_CONNECTION_STATUS_UNSPECIFIED",  "updateTime": "2019-08-24T14:15:22Z"}
GET
/v1/providerConnections/{name}

Path Parameters

name*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/providerConnections/string"
{  "capabilities": {    "countryCodes": [      "string"    ],    "currencyCodes": [      "string"    ],    "paymentMethodTypes": [      "PAYMENT_METHOD_TYPE_UNSPECIFIED"    ],    "supportsOffSession": true,    "supportsRecurring": true  },  "createTime": "2019-08-24T14:15:22Z",  "displayName": "string",  "healthStatus": "PROVIDER_HEALTH_STATUS_UNSPECIFIED",  "name": "string",  "providerType": "string",  "status": "PROVIDER_CONNECTION_STATUS_UNSPECIFIED",  "updateTime": "2019-08-24T14:15:22Z"}
PATCH
/v1/providerConnections/{provider_connection.name}

Path Parameters

provider_connection.name*string

Query Parameters

updateMask*string
requestId?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

ProviderConnection represents an organization's merchant account at a payment provider. It never contains provider credentials.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/providerConnections/string?updateMask=string" \  -H "Content-Type: application/json" \  -d '{    "displayName": "string",    "providerType": "string"  }'
{  "capabilities": {    "countryCodes": [      "string"    ],    "currencyCodes": [      "string"    ],    "paymentMethodTypes": [      "PAYMENT_METHOD_TYPE_UNSPECIFIED"    ],    "supportsOffSession": true,    "supportsRecurring": true  },  "createTime": "2019-08-24T14:15:22Z",  "displayName": "string",  "healthStatus": "PROVIDER_HEALTH_STATUS_UNSPECIFIED",  "name": "string",  "providerType": "string",  "status": "PROVIDER_CONNECTION_STATUS_UNSPECIFIED",  "updateTime": "2019-08-24T14:15:22Z"}
POST
/v1/providerConnections/{name}:disable

Path Parameters

name*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/providerConnections/string:disable" \  -H "Content-Type: application/json" \  -d '{    "reason": "string"  }'
{  "capabilities": {    "countryCodes": [      "string"    ],    "currencyCodes": [      "string"    ],    "paymentMethodTypes": [      "PAYMENT_METHOD_TYPE_UNSPECIFIED"    ],    "supportsOffSession": true,    "supportsRecurring": true  },  "createTime": "2019-08-24T14:15:22Z",  "displayName": "string",  "healthStatus": "PROVIDER_HEALTH_STATUS_UNSPECIFIED",  "name": "string",  "providerType": "string",  "status": "PROVIDER_CONNECTION_STATUS_UNSPECIFIED",  "updateTime": "2019-08-24T14:15:22Z"}
GET
/v1/routingPolicy

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/routingPolicy"
{  "name": "string",  "rules": [    {      "countryCodes": [        "string"      ],      "currencyCodes": [        "string"      ],      "paymentMethodTypes": [        "PAYMENT_METHOD_TYPE_UNSPECIFIED"      ],      "providerConnection": "string",      "requireOffSession": true,      "requireRecurring": true    }  ],  "updateTime": "2019-08-24T14:15:22Z"}
PATCH
/v1/routingPolicy

Query Parameters

updateMask*string
requestId?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

RoutingPolicy contains the ordered provider rules for an organization.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/routingPolicy?updateMask=string" \  -H "Content-Type: application/json" \  -d '{    "rules": [      {        "providerConnection": "string"      }    ]  }'
{  "name": "string",  "rules": [    {      "countryCodes": [        "string"      ],      "currencyCodes": [        "string"      ],      "paymentMethodTypes": [        "PAYMENT_METHOD_TYPE_UNSPECIFIED"      ],      "providerConnection": "string",      "requireOffSession": true,      "requireRecurring": true    }  ],  "updateTime": "2019-08-24T14:15:22Z"}
GET
/v1/customers/{parent}/paymentMethods

Path Parameters

parent*string

Query Parameters

pageSize?integer
Formatint32
pageToken?string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/customers/string/paymentMethods"
{  "nextPageToken": "string",  "paymentMethods": [    {      "countryCode": "string",      "createTime": "2019-08-24T14:15:22Z",      "displayName": "string",      "name": "string",      "offSessionEnabled": true,      "providerConnection": "string",      "providerReference": "string",      "recurringEnabled": true,      "status": "PAYMENT_METHOD_STATUS_UNSPECIFIED",      "type": "PAYMENT_METHOD_TYPE_UNSPECIFIED",      "updateTime": "2019-08-24T14:15:22Z"    }  ]}
POST
/v1/customers/{parent}/paymentMethods

Path Parameters

parent*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/customers/string/paymentMethods" \  -H "Content-Type: application/json" \  -d '{    "paymentMethod": {      "providerConnection": "string",      "type": "PAYMENT_METHOD_TYPE_UNSPECIFIED"    },    "paymentMethodId": "string",    "setupToken": "string"  }'
{  "countryCode": "string",  "createTime": "2019-08-24T14:15:22Z",  "displayName": "string",  "name": "string",  "offSessionEnabled": true,  "providerConnection": "string",  "providerReference": "string",  "recurringEnabled": true,  "status": "PAYMENT_METHOD_STATUS_UNSPECIFIED",  "type": "PAYMENT_METHOD_TYPE_UNSPECIFIED",  "updateTime": "2019-08-24T14:15:22Z"}
GET
/v1/customers/{name}/paymentMethods/{name_1}

Path Parameters

name*string
name_1*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/customers/string/paymentMethods/string"
{  "countryCode": "string",  "createTime": "2019-08-24T14:15:22Z",  "displayName": "string",  "name": "string",  "offSessionEnabled": true,  "providerConnection": "string",  "providerReference": "string",  "recurringEnabled": true,  "status": "PAYMENT_METHOD_STATUS_UNSPECIFIED",  "type": "PAYMENT_METHOD_TYPE_UNSPECIFIED",  "updateTime": "2019-08-24T14:15:22Z"}
POST
/v1/customers/{name}/paymentMethods/{name_1}:disable

Path Parameters

name*string
name_1*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/customers/string/paymentMethods/string:disable" \  -H "Content-Type: application/json" \  -d '{    "reason": "string"  }'
{  "countryCode": "string",  "createTime": "2019-08-24T14:15:22Z",  "displayName": "string",  "name": "string",  "offSessionEnabled": true,  "providerConnection": "string",  "providerReference": "string",  "recurringEnabled": true,  "status": "PAYMENT_METHOD_STATUS_UNSPECIFIED",  "type": "PAYMENT_METHOD_TYPE_UNSPECIFIED",  "updateTime": "2019-08-24T14:15:22Z"}
GET
/v1/customers/{parent}/payments

Path Parameters

parent*string

Query Parameters

pageSize?integer
Formatint32
pageToken?string
filter?string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/customers/string/payments"
{  "nextPageToken": "string",  "payments": [    {      "amount": {        "amount": {          "value": "string"        },        "currencyCode": "string"      },      "createTime": "2019-08-24T14:15:22Z",      "failureCategory": "PAYMENT_FAILURE_CATEGORY_UNSPECIFIED",      "failureMessage": "string",      "idempotencyKey": "string",      "invoice": "string",      "name": "string",      "offSession": true,      "paymentMethod": "string",      "providerConnection": "string",      "recurring": true,      "status": "PAYMENT_STATUS_UNSPECIFIED",      "succeedTime": "2019-08-24T14:15:22Z",      "updateTime": "2019-08-24T14:15:22Z"    }  ]}
POST
/v1/customers/{parent}/payments

Path Parameters

parent*string

Query Parameters

paymentId*string
candidatePaymentMethods*array<string>
recurring?boolean
offSession?boolean
requestId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Payment represents collection of the immutable outstanding amount of one finalized invoice.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/customers/string/payments?paymentId=string&candidatePaymentMethods=string&requestId=string" \  -H "Content-Type: application/json" \  -d '{    "invoice": "string"  }'
{  "amount": {    "amount": {      "value": "string"    },    "currencyCode": "string"  },  "createTime": "2019-08-24T14:15:22Z",  "failureCategory": "PAYMENT_FAILURE_CATEGORY_UNSPECIFIED",  "failureMessage": "string",  "idempotencyKey": "string",  "invoice": "string",  "name": "string",  "offSession": true,  "paymentMethod": "string",  "providerConnection": "string",  "recurring": true,  "status": "PAYMENT_STATUS_UNSPECIFIED",  "succeedTime": "2019-08-24T14:15:22Z",  "updateTime": "2019-08-24T14:15:22Z"}
GET
/v1/customers/{name}/payments/{name_1}

Path Parameters

name*string
name_1*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/customers/string/payments/string"
{  "amount": {    "amount": {      "value": "string"    },    "currencyCode": "string"  },  "createTime": "2019-08-24T14:15:22Z",  "failureCategory": "PAYMENT_FAILURE_CATEGORY_UNSPECIFIED",  "failureMessage": "string",  "idempotencyKey": "string",  "invoice": "string",  "name": "string",  "offSession": true,  "paymentMethod": "string",  "providerConnection": "string",  "recurring": true,  "status": "PAYMENT_STATUS_UNSPECIFIED",  "succeedTime": "2019-08-24T14:15:22Z",  "updateTime": "2019-08-24T14:15:22Z"}
POST
/v1/customers/{name}/payments/{name_1}:retry

Path Parameters

name*string
name_1*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/customers/string/payments/string:retry" \  -H "Content-Type: application/json" \  -d '{    "requestId": "string"  }'
{  "amount": {    "amount": {      "value": "string"    },    "currencyCode": "string"  },  "createTime": "2019-08-24T14:15:22Z",  "failureCategory": "PAYMENT_FAILURE_CATEGORY_UNSPECIFIED",  "failureMessage": "string",  "idempotencyKey": "string",  "invoice": "string",  "name": "string",  "offSession": true,  "paymentMethod": "string",  "providerConnection": "string",  "recurring": true,  "status": "PAYMENT_STATUS_UNSPECIFIED",  "succeedTime": "2019-08-24T14:15:22Z",  "updateTime": "2019-08-24T14:15:22Z"}
GET
/v1/customers/{name}/payments/{name_1}/attempts/{name_2}

Path Parameters

name*string
name_1*string
name_2*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/customers/string/payments/string/attempts/string"
{  "createTime": "2019-08-24T14:15:22Z",  "failureCategory": "PAYMENT_FAILURE_CATEGORY_UNSPECIFIED",  "failureMessage": "string",  "idempotencyKey": "string",  "name": "string",  "outcome": "PAYMENT_ATTEMPT_OUTCOME_UNSPECIFIED",  "paymentMethod": "string",  "providerConnection": "string",  "providerTransactionReference": "string",  "updateTime": "2019-08-24T14:15:22Z"}
GET
/v1/customers/{parent}/payments/{parent_1}/attempts

Path Parameters

parent*string
parent_1*string

Query Parameters

pageSize?integer
Formatint32
pageToken?string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/customers/string/payments/string/attempts"
{  "nextPageToken": "string",  "paymentAttempts": [    {      "createTime": "2019-08-24T14:15:22Z",      "failureCategory": "PAYMENT_FAILURE_CATEGORY_UNSPECIFIED",      "failureMessage": "string",      "idempotencyKey": "string",      "name": "string",      "outcome": "PAYMENT_ATTEMPT_OUTCOME_UNSPECIFIED",      "paymentMethod": "string",      "providerConnection": "string",      "providerTransactionReference": "string",      "updateTime": "2019-08-24T14:15:22Z"    }  ]}