{"openapi":"3.1.0","info":{"title":"Payments","version":"1.0.0","description":"API reference for accepting payments with PayMe — sales via hosted payment page, hosted fields or direct API, tokens, subscriptions, refunds and captures, 3D Secure, invoices and point-of-sale. Start with Getting Started for credentials, environments and a first sale."},"servers":[{"url":"https://sandbox.payme.io/api","description":"Sandbox"},{"url":"https://live.payme.io/api","description":"Production"}],"components":{"securitySchemes":{"merchantKey":{"type":"apiKey","in":"header","name":"PayMe-Merchant-Key"},"partnerKey":{"type":"apiKey","in":"header","name":"PayMe-Partner-Key"},"publicKey":{"type":"apiKey","in":"header","name":"PayMe-Public-Key"},"signature":{"type":"apiKey","in":"header","name":"PayMe-Signature"}}},"tags":[{"name":"Buyers Management"}],"paths":{"/buyers/{buyer_guid}":{"get":{"security":[{"merchantKey":[]}],"operationId":"get-buyers-guid","summary":"Get a buyer","tags":["Buyers Management"],"description":"Returns the saved details of a buyer: name, contact details and the masked card. Send the seller's MPL (`seller_payme_id`) in the `PayMe-Merchant-Key` header. The buyer must belong to that seller (error `605`).\n\nIn the path, send a buyer key (`BUYER…`) from [Capture a buyer token](/payments/tokenization/post-capture-buyer-token) or a sale callback, or a token UUID from `POST /tokens`. With a UUID, the response has no `buyer_key`.\n\nThe success body is the buyer object only, with no `status_code` or `session`. The card fields `club`, `type`, `organization` and `origin_country` come from the card's BIN and can be empty when PayMe doesn't recognize it.\n\n### Errors\n\nHTTP status | Error code | Message | When\n---|---|---|---\n`400` | `1` | Required parameter is missing | No seller was named. `status_additional_info` is `seller_payme_id`. \n`500` | `251` | Seller was not found | The seller key is unknown. \n`500` | `163` | Account settings problem - please contact Customer Support | The seller is not active. \n`500` | `600` | Buyer not found | No buyer has this ID. `status_additional_info` is the ID you sent. \n`500` | `604` | Buyer inactive | The buyer is inactive. \n`500` | `605` | The buyer was not captured using the provided seller | This seller may not read this buyer. \n\n\n","parameters":[{"name":"PayMe-Merchant-Key","in":"header","required":true,"description":"The seller's MPL (`seller_payme_id`), for example `MPLDEMO-MPLDEMO-MPLDEMO-1234567`. Not the seller's public key.","schema":{"type":"string"}},{"name":"buyer_guid","in":"path","required":true,"description":"A buyer key (`BUYER…`) or a token UUID. With a UUID, the response has no `buyer_key`.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string","description":"The buyer's token UUID."},"customer":{"type":"object","description":"The buyer's details.","properties":{"name":{"type":"string","description":"The buyer's name."},"email":{"type":"string","description":"The buyer's email address."},"phone":{"type":"string","description":"The buyer's phone number."},"social_id":{"type":"string","description":"The buyer's national ID number."}}},"payment":{"type":"object","description":"The saved card.","properties":{"display":{"type":"string","description":"The masked card number."},"expiry":{"type":"string","description":"Card expiry date, `MMYY`."},"brand":{"type":"string","description":"Card brand, for example `Visa`."},"club":{"type":"string","description":"Card club, from the BIN. Can be empty."},"type":{"type":"string","description":"Card type, for example `Credit`, from the BIN."},"organization":{"type":"string","description":"Card organization, from the BIN. Can be empty."},"origin_country":{"type":"string","description":"Country that issued the card, ISO 3166-1 alpha-2, from the BIN."}}},"buyer_key":{"type":"string","description":"The buyer key. Returned only when the path holds a buyer key."}}},"example":{"uuid":"6ac45306-1755-45e4-8b74-f6de3ea2239b","customer":{"name":"Example Buyer","email":"buyer@example.com","phone":"0500000001","social_id":"123456782"},"payment":{"display":"411111******1111","expiry":"1228","brand":"Visa","club":"","type":"Credit","organization":"","origin_country":"US"},"buyer_key":"BUYERDEMO-BUYERDEMO-BUYERDEMO-1234567"}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"Required parameter is missing","status_additional_info":"seller_payme_id","status_error_code":1,"session":"FhT3aXe7"}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"seller_payme_id","status_error_code":251,"session":"FhT3aXe7"}}}}}}}}}